/*************************************************
K3 WEB TEKNOLOJİLERİ

Kurumsal ve Bireysel Yazılım Hizmetleri

http://www.k3.web.tr

*************************************************/

$(function(){
	
	$("input, textarea, select, button").uniform();
	
	$('#slideshow').before('<div id="nav">').cycle({ 
    fx:     'fade',
    timeout: 6000, 
    pager:  '#nav' 
	});
	
	Cufon.replace('.efefont', { fontFamily: 'efefont', hover: true });
	Cufon.replace('.defefont', { fontFamily: 'efefont', hover: true, textShadow:'1px 1px #000'});
	
	$('#logo').click(function(){
		location.href='./';
	});
	
	$('.sf-menu li').corner('top 10px');
	$('ul.tabs li, ul.tabs li a').corner('tl bl 7px');
	
	$('.sf-menu dd dl').corner(' 10px');
	$('.sf-menu li li, .sf-menu li li li').uncorner();
	$('.sf-menu li ul li').corner('bottom 10px');
	
	$('*').each(function(){
		
		/// FONT SİZE
		if($(this).attr('fsize') != null){
			$(this).css('font-size' , $(this).attr('fsize') + 'px');	
		}
		/// FONT SİZE END
		
		/// FONT SİZE
		if($(this).attr('ffloat') != null){
			$(this).css('text-align' , $(this).attr('ffloat'));	
		}
		/// FONT SİZE END
		
		///////////////////////////////////////////////////////////////////////////////
		
		/* #### KOLON #### */
		
		/// COLL
		if($(this).attr('coll') != null){
			$(this).css('width' , $(this).attr('coll'));	
		}
		/// COLL END
		
		/// ROLL
		if($(this).attr('roll') != null){
			$(this).css('height' , $(this).attr('roll'));	
		}
		/// ROLL END
		
		/// LROLL
		if($(this).attr('lroll') != null){
			$(this).css('line-height' , $(this).attr('lroll'));	
		}
		/// LROLL END
		
		/// FLOAT
		if($(this).attr('float') != null){
    		$(this).css('float' , $(this).attr('float'));
		}
		/// FLOAT END
		
		/// HIGHT
		if($(this).attr('height') != null){
    		$(this).css('height' , $(this).attr('height'));
		}
		/// HIGHT END
		
		/// MIN HIGHT
		if($(this).attr('minh') != null){
    		$(this).css('min-height' , $(this).attr('minh'));
		}
		/// MIN HIGHT END
		
		/// MAX HIGHT
		if($(this).attr('maxh') != null){
    		$(this).css('max-height' , $(this).attr('maxh'));
		}
		/// MAX HIGHT END
		
		/* #### KOLON END #### */
		
		///////////////////////////////////////////////////////////////////////////////
		
		/* #### MARGIN #### */
		
		/// MARGIN
		if($(this).attr('margin') != null){
    		$(this).css('margin' , $(this).attr('margin'));
		}
		/// MARGIN END
		
		/// MARGIN TOP
		if($(this).attr('mt') != null){
    		$(this).css('margin-top' , $(this).attr('mt'));
		}
		/// MARGIN TOP END
		
		/// MARGIN LEFT
		if($(this).attr('ml') != null){
    		$(this).css('margin-left' , $(this).attr('ml'));
		}
		/// MARGIN LEFT END
		
		/// MARGIN BOTTOM
		if($(this).attr('mb') != null){
    		$(this).css('margin-bottom' , $(this).attr('mb'));
		}
		/// MARGIN BOTTOM END
		
		/// MARGIN RIGHT
		if($(this).attr('mr') != null){
    		$(this).css('margin-right' , $(this).attr('mr'));
		}
		/// MARGIN RIGHT END
		
		/* #### MARGIN END #### */
		
		///////////////////////////////////////////////////////////////////////////////
		
		/* #### PADDING #### */
		
		/// PADDING
		if($(this).attr('padding') != null){
    		$(this).css('padding' , $(this).attr('padding'));
		}
		/// PADDING END
		
		/// PADDING TOP
		if($(this).attr('pt') != null){
    		$(this).css('padding-top' , $(this).attr('pt'));
		}
		/// PADDING TOP END
		
		/// PADDING LEFT
		if($(this).attr('pl') != null){
    		$(this).css('padding-left' , $(this).attr('pl'));
		}
		/// PADDING LEFT END
		
		/// PADDING BOTTOM
		if($(this).attr('pb') != null){
    		$(this).css('padding-bottom' , $(this).attr('pb'));
		}
		/// PADDING BOTTOM END
		
		/// PADDING RIGHT
		if($(this).attr('pr') != null){
    		$(this).css('padding-right' , $(this).attr('pr'));
		}
		/// PADDING RIGHT END
		
		/* #### PADDING END #### */
		
		///////////////////////////////////////////////////////////////////////////////
		
		/* #### CONNER #### */
		
		/// CONNER
		if($(this).attr('corner') != null){
    		$(this).corner($(this).attr('corner'));
		}
		/// CONNER END
		
		/* #### CONNER END #### */
		
		$('.resim').fancybox({
				'autoScale'			: true,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
		});	
		
		$('.iframe').fancybox({
				'width'				: '90%',
				'height'			: '90%',
				'autoScale'			: true,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
		});	
		$('.canli').fancybox({
				'width'				: '60%',
				'height'			: '60%',
				'autoScale'			: true,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
		});		
	});
	
$("#online_date").datepicker({minDate: 0, dateFormat:'d MM yy DD',showOn: 'both', buttonImage: 'media/img/date.png', buttonImageOnly: true });

});

jQuery(function($){
		$.datepicker.regional['tr'] = {
		closeText: 'kapat',
		prevText: '&#x3c;geri',
		nextText: 'ileri&#x3e',
		currentText: 'bugün',
		monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
		'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
		monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
		'Tem','Ağu','Eyl','Eki','Kas','Ara'],
		dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
		 dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
		dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
		weekHeader: 'Hf',
		dateFormat: 'dd.mm.yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
		$.datepicker.setDefaults($.datepicker.regional['tr']);
});


// BLOKUI

function msj(msj){
	$.blockUI({ message: msj ,css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#333', 
            '-webkit-border-radius': '10px', 
            '-moz-border-radius': '10px',
            color: '#FFF',
			'cursor':'default'
        } });
}

function iframe(url,title){
	if(title == 'newWin'){ title = 'EFE TUR Online Bilet Satış';}
	$('#iframe').attr('href',url);
	$('#iframe').attr('title',title);
	$('#iframe').click();
}

$(document).ready(function() {
 
	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});
	/*
	if($.cookie("efetur_splash") != 'on'){
	$('.resim').click();
	$.cookie("efetur_splash", 'on', {expires: 1});
	}
	*/
 
});
