jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeInOutSine',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {return c*(t/=d)*t + b;},
	easeOutQuad: function (x, t, b, c, d) {	return -c *(t/=d)*(t-2) + b;},
	easeInOutQuad: function (x, t, b, c, d) {		if ((t/=d/2) < 1) return c/2*t*t + b;		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {		return c*(t/=d)*t*t + b;	},
	easeOutCubic: function (x, t, b, c, d) {		return c*((t=t/d-1)*t*t + 1) + b;	},
	easeInOutCubic: function (x, t, b, c, d) {		if ((t/=d/2) < 1) return c/2*t*t*t + b;		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {		return c*(t/=d)*t*t*t + b;	},
	easeOutQuart: function (x, t, b, c, d) {		return -c * ((t=t/d-1)*t*t*t - 1) + b;	},
	easeInOutQuart: function (x, t, b, c, d) {		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {		if (t==0) return b;		if (t==d) return b+c;		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {		var s=1.70158;var p=0;var a=c;		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {		var s=1.70158;var p=0;var a=c;		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {		var s=1.70158;var p=0;var a=c;		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {		if (s == undefined) s = 1.70158;		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {		if (s == undefined) s = 1.70158;		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {if ((t/=d) < (1/2.75)) {return c*(7.5625*t*t) + b;} else if (t < (2/2.75)) {	return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});



function setCookie(c_name,value,expiredays)
{ var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString());}
function getCookie(c_name)
{ 
	if (document.cookie.length>0)
	{ c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1)
	{ c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end));}
	}
	return "";
}
ea1="easeOutQuint"; 
time=900;
function otomatik2(yon,div,artis)
{ 
  div1=$('#'+div); 
	
	if(!div1.is(":animated"))
	{
		
	if((parseInt(div1.css('left'))>=0 && yon=="+") || (parseInt(div1.css('left'))+div1.width()<=artis && yon=='-')) 
		div1.animate({left:'0px'}, time,ea1,function(){lightButton()}); 
	else 
		div1.animate({left:yon+'='+artis+'px'},time,ea1,function(){lightButton()});
	}
	
}

function otomatik3(yon,div,artis)
{ 
  div1=$('#'+div); 
	
	if(!div1.is(":animated"))
	{
		
	if((parseInt(div1.css('top'))>=0 && yon=="+") || (parseInt(div1.css('top'))+div1.height()<=artis && yon=='-')) 
		div1.animate({top:'0px'}, time,ea1,function(){lightButton()}); 
	else 
		div1.animate({top:yon+'='+artis+'px'},time,ea1,function(){lightButton()});
	}
	
}


function sonra(yon)
{ if(yon=="-" && (start+1)*3<toplamyazar)
{ start++; $('#yazar3 tr:first').append("<td valign=top></td>"); $('#yazar1 table').width($('#yazar1 table').width()+300); $('#yazar3 td:last').load("ajax.php?page=yazar&start="+start,"",function(){otomatik2(yon,"yazar3",300)});}
else otomatik2(yon,"yazar3",300);}
function galeri(indis)
{ $('.galeri td:first').html(Gdizi[indis]); $('#gkay img').removeClass("renk2"); $('#gkay img').addClass("renk1"); $('#gkay img').eq(indis).addClass("renk2");}
function ara(sayi)
{ $('#search a').removeClass("koyu"); $('#search a:eq('+sayi+')').addClass("koyu");}
function AJ(div,urlx)
{ eski=$('#'+div).html(); $('#'+div).html('<table height=100% width=100% align=center><tr><td align=center><img src=aw/basoda/i/6.gif></td></tr></table>'); $('#'+div).load(urlx);}
function havadurum(sehir)
{ $('#secilisehir').html(sehir); sehir=sehirtemizle(sehir); AJ('derece','ajax.php?page=hava&sehir='+sehir); setCookie('sehir',sehir); $('#hdimg_0').attr('src','http://www.dmi.gov.tr/sunum/tahmingor-a1.aspx?g=2&m='+sehir); $('#hdimg_1').attr('src','http://www.dmi.gov.tr/sunum/tahmingor-a1.aspx?g=3&m='+sehir); $('#hdimg_2').attr('src','http://www.dmi.gov.tr/sunum/tahmingor-a1.aspx?g=4&m='+sehir); $('#hdimg_3').attr('src','http://www.dmi.gov.tr/sunum/tahmingor-a1.aspx?g=5&m='+sehir);}
function namazVakti(gelen)
{ $('#secilisehir2').html(gelen); setCookie('sehir',gelen); AJ('namaz1','ajax.php?page=namaz&sehir='+gelen);}
function sehirtemizle(gelen)
{ gelen=gelen.replace(String.fromCharCode(304),"I"); gelen=gelen.replace(String.fromCharCode(304),"I"); gelen=gelen.replace(String.fromCharCode(214),"O"); gelen=gelen.replace(String.fromCharCode(214),"O"); gelen=gelen.replace(String.fromCharCode(220),"U"); gelen=gelen.replace(String.fromCharCode(220),"U"); gelen=gelen.replace(String.fromCharCode(286),"G"); gelen=gelen.replace(String.fromCharCode(286),"G"); gelen=gelen.replace(String.fromCharCode(350),"S"); gelen=gelen.replace(String.fromCharCode(350),"S"); gelen=gelen.replace(String.fromCharCode(199),"C"); gelen=gelen.replace(String.fromCharCode(199),"C"); return gelen;}
function mansetdegistir2(id)
{ $('#manset1 span').fadeOut(1500); $('#manset1 span:eq('+id+')').fadeIn(1500); $('#manset1 .numara img').attr('src','i/beyaz.png'); $('#manset1 .numara img:eq('+id+')').attr('src','i/kirmizi.png');}
function mansetdegistir3(id)
{ 
	$('#manset2 span:eq('+id+')').fadeIn(400); 
	$('#manset2 span').not(':eq('+id+')').slideUp(400); 
	//rx=id*67; 
	//$('#manset2 .numara').css('background-position','0px '+rx+'px')
	$('#manset2 .numara img').css('border','4px solid #fff')
	$('#manset2 .numara img').eq(id).css('border','4px solid #A5252D');
}
i3=0; function degistir()
{ var arg = degistir.arguments; for(j=1;j<arg.length;j++)
{ var rows=document.getElementById(arg[j]).getElementsByTagName('span'); for(i=0;i<rows.length;i++) rows[i].style.display='none'; rows[arg[0]].style.display='block';}
}
function degistir2()
{ var arg = degistir2.arguments; for(j=2;j<arg.length;j++)
{ var rows=document.getElementById(arg[j]).getElementsByTagName(arg[1]); for(i=0;i<rows.length;i++) rows[i].style.display='none'; rows[arg[0]].style.display='block';}
}
function resimdegistir(sayi,dizi,div)
{ document.getElementById(div).src=dizi[sayi]; sayi=parseInt(sayi+1); if(parseInt(dizi.length-sayi)>0)
{ var a=new Image(); a.src=dizi[sayi];}
}
function renk(sayi,div)
{ arg=document.getElementById(div).getElementsByTagName('a'); for(i=0;i<10;i++) arg[i].className=''; arg[sayi].className='renkli';}
function odaklan(tag,value)
{ if(tag.value==value) tag.value="";}
function ayril(tag,value)
{ if(tag.value=="") tag.value=value;}
function form_kontrol()
{ var arg = form_kontrol.arguments; for(j=1;j<arg.length;j=j+1)
{ var deger=document.forms[arg[0]].elements[arg[j].name].value
if(deger.length<2 || deger==arg[j].value)
{alert('L&tfen en az 2 karakterli arama kelimesini giriniz.'); return false;}
}
}
function popup(url,w,h)
{ window.open(url,"deneme","menubar=0,resizable=1,scrollbars=1,width="+w+",height="+h);}
function radio_kontrol(toplam)
{ sayi=0; for(i=0;i<toplam;i++)
{ if(window.document.poll[i].checked) sayi=sayi+1;}
document.getElementById('oyver').style.visibility='visible';}
function bookmarksite(title, url)
{ if(document.all) window.external.AddFavorite(url, title); else if (window.sidebar) alert("Sitemizi s�k kullan�lanlara eklemek i�in Ctrl ve D tu�lar�na (Ctrl+D) bas�n�z.");}



$(document).ready(function()
{
	$('.haber2').mousemove(function(e){
		
		file=$(this).children('img').attr('src');
		file=file.replace('thm/','');
		
		$('#zoom').html('<img src='+file+' width=400>').css("top",(e.pageY-$('#zoom').children('img').height()/2) + "px").css("left",(e.pageX+20) + "px").slideDown();
	});
	$('.haber2').mouseleave(function(e){
		
		$('#zoom').hide();
	});
	

	$('.ytymenu li').hover(	
	function(){
		if(!$(this).children("ul").is(':animated'))
		{
			$(this).children("ul").slideDown(100,ea1);
			$(this).addClass("top2");
			$(this).children("a").addClass("a2")
		} 
	
	},
	function(){
		$(this).children("ul").slideUp(100,ea1);
		$(this).removeClass("top2");
		$(this).children("a").removeClass("a2")} ); 
		
		
	$('a.zoom').zoombox({
		theme       : 'zoombox',        //available themes : zoombox,lightbox, prettyphoto, darkprettyphoto, simple
		opacity     : 0.8,              // Black overlay opacity
		duration    : 400,              // Animation duration
		animation   : true,             // Do we have to animate the box ?
		width       : 500,              // Default width
		height      : 400,              // Default height
		gallery     : false,             // Allow gallery thumb view
		autoplay : false                // Autoplay for video
	});
	
});



function lightButton()
{
	leftx=$('#items').css('left');
	leftx=parseInt(leftx)/-900;
	
	$('.itemButtons a').removeClass('red');
	$('.itemButtons a').eq(leftx).addClass('red');
}
function AutoSlideV1(yon,parent,px,kayan)
{
	rnd=Math.floor(Math.random()*11222);
	eval("dk_"+rnd+"=setInterval(function(){otomatik2('"+yon+"','"+kayan+"',"+px+")},3000);"+parent+".hover(function(){clearInterval(dk_"+rnd+")},function(){dk_"+rnd+"=setInterval(function(){otomatik2('"+yon+"','"+kayan+"',"+px+")},3000);})");
}
function AutoSlideH1(yon,parent,px,kayan)
{
	rnd=Math.floor(Math.random()*11222);
	eval("dk_"+rnd+"=setInterval(function(){otomatik3('"+yon+"','"+kayan+"',"+px+")},3000);"+parent+".hover(function(){clearInterval(dk_"+rnd+")},function(){dk_"+rnd+"=setInterval(function(){otomatik3('"+yon+"','"+kayan+"',"+px+")},3000);})");
}

