// JavaScript Document  
$(document).ready(function(){
	//linklerin kenar cizgilerini kaldiriyor
	$("a").bind("focus",function(){if(this.blur)this.blur();});
	//$(document).pngFix();
	
	//Toplam div sayisina göre menünün uzunlugunu ayarliyoruz.
	var t_div=$(".menu_bg").children().length-1; 
	var yeni_genislik=(1000/parseInt(t_div));
	$(".menu_link_bg").css("width",parseFloat(yeni_genislik)-1+"px");
	
	//resmi boyutlandiriyoruz.
	//$(".resize").aeImageResize({height: 249, width: 1000});
	
	/*//Banner slider
	var t_banner=$(".banner_big").children().length;
	$("#b-big_1").css("display","block");
	$("#button_1").css("color","#990000");
	$(".slide_button").click(function(){
	var num=$(this).attr("id").replace("button_","");
	$(".banner").hide();
	//$("#b-big_"+num).slideup('slow',function()
	$("#b-big_"+num).fadeIn(500);
	$(".slide_button").css("color","#333");
	$("#button_"+num).css("color","#990000");
	});*/
	
	//------Sol Bolum Menu------//
	$(".sol_bolum .ana_menu ul").hide();
	if($.cookie("cookieMenuID")==null || $.cookie("cookieMenuID")==""){
		cookieMenuID=0;
	}else{
		cookieMenuID=$.cookie("cookieMenuID");
	}
	$(".sol_bolum .ana_menu #ana_menu_id-"+cookieMenuID).parent().find("ul").show();
	$(".sol_bolum .ana_menu #ana_menu_id-"+cookieMenuID).addClass("aktif");
	$(".sol_bolum .ana_menu div").click(function(){
		if($.cookie("cookieMenuID")==null || $.cookie("cookieMenuID")==""){
			cookieMenuID=0;
		}else{
			cookieMenuID=$.cookie("cookieMenuID");
		}
		iMenuID=this.id.replace("ana_menu_id-","");
		if(iMenuID==cookieMenuID){
			$(this).parent().find("ul").slideUp(300);
			$(this).removeClass("aktif");
			$.cookie("cookieMenuID",0);
		}else{
			$(this).parent().find("ul").slideDown(300);
			$(this).addClass("aktif");
			$(".sol_bolum .ana_menu #ana_menu_id-"+cookieMenuID).parent().find("ul").slideUp(300);
			$(".sol_bolum .ana_menu #ana_menu_id-"+cookieMenuID).removeClass("aktif");
			$.cookie("cookieMenuID",iMenuID);
		}
	});
	//------/Sol Bolum Menu------//
});

/*function Slider(sira)
	{
	window.setTimeout(function() {
		$(".banner").hide();
		$("#b-big_"+sira).fadeIn(500);
		i++;
		Slider(i);
 			 }, 3000);
	
	}*/
