
function pencereAc(theURL,winName,features) {
  window.open(theURL,winName,features);
}

Cufon.replace('.Cfont', {
	fontFamily:'Avalon'
});


$(document).ready(function () {
		$("#dlink").click(function () {
$('#doviz').css('display', 'block');
$('#hava').css('display', 'none');
});			
$("#hlink").click(function () {
$('#doviz').css('display', 'none');
$('#hava').css('display', 'block');
});					
$("a.zoom").fancybox({
		'hideOnOverlayClick': false
});
$('.blocklist li:odd').css('background-color', '#fbfbfb');
});

jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

jQuery(function( $ ){
	$( ".accordion" ).accordion({
			autoHeight: false,
			navigation: true,
			active: 'none'
		});

$('#mansetler').serialScroll({
		items:'li',
		prev:'a#NewsArrowLeft',
		next:'a#NewsArrowRight',
		offset:0,
		start:0,
		duration:1000,
		force:false,
		lock:false,
		lazy:false,
		axis:'x',
		cycle:true,
		step:1,
		easing:'easeOutQuart', //use this easing equation for a funny effect
		jump:true,
		interval:4000
	});


$('#AltSlider').serialScroll({
		items:'li',
		prev:'#AltBoxLeft',
		next:'#AltBoxRight',
		offset:0,
		start:0,
		duration:1000,
		force:true,
		stop:true,
		lock:false,
		lazy:false,
		axis:'x',
		cycle:true,
		step:1,
		easing:'easeOutQuart', //use this easing equation for a funny effect
		jump:false,
		exclude:1,
		interval:4000
	});
$('#DuyuruSlider').serialScroll({
		items:'li',
		duration:2000,
		force:true,
		axis:'y',
		easing:'easeOutQuart',
		lazy:false,// NOTE: it's set to true, meaning you can add/remove/reorder items and the changes are taken into account.
		interval:5000, // yeah! I now added auto-scrolling
		step:2 // scroll 2 news each time
	});
	
});

// TKA Menu Baslangic 
$(document).ready(function(){

closetimer = 0;
	if($("#nav")) {
		$("#nav b").mouseover(function() {
		clearTimeout(closetimer);
			if(this.className.indexOf("hover") != -1) {
				$("#nav ul ul ul:visible").slideUp(300);
				$("#nav u").removeClass("hover");
				$("#nav i").removeClass("hover");

				$(this).removeClass("hover");
			}
			else {
				$("#nav b").removeClass();
				$(this).addClass("hover");
				$("#nav ul ul ul:visible").slideUp(300);
				$("#nav u").removeClass("hover");
				
				$("#nav i").removeClass("hover");
				$("#nav ul:visible").fadeOut("slow");
				$(this).parent().next().fadeIn("slow");
			}
			return false;
		});

		$("#nav i").mouseover(function() {
		clearTimeout(closetimer);
			if(this.className.indexOf("hover") != -1) {
				$("#nav ul ul ul:visible").slideUp(500);
				$("#nav u").removeClass("hover");
				$(this).parent().next().slideUp(500);
				$(this).removeClass("hover");
			}
			else {
				$("#nav i").removeClass();
				$(this).addClass("hover");
				$("#nav ul ul ul:visible").slideUp(500);
				$("#nav u").removeClass("hover");
				$("#nav ul ul:visible").slideUp(500);
				$(this).parent().next().slideDown(500);
			}
			return false;
		});

		$("#nav u").mouseover(function() {
		clearTimeout(closetimer);
			if(this.className.indexOf("hover") != -1) {
				$(this).parent().next().fadeOut("slow");
				$(this).removeClass("hover");
			}
			else {
				$("#nav u").removeClass();
				$(this).addClass("hover");
				$("#nav ul ul ul:visible").fadeOut("slow");
				$(this).parent().next().fadeIn("slow");
			}
			return false;
		});

		$("#nav").mouseover(function() {
		clearTimeout(closetimer);
		});

		$("#nav").mouseout(function() {
			closetimer = window.setTimeout(function(){
			$("#nav ul ul ul:visible").fadeOut("slow");
			$("#nav u").removeClass("hover");
			$("#nav ul ul:visible").slideUp(500);
			$("#nav i").removeClass("hover");
			}, 2000);
		}); 
	}
});
