$(document).ready(function(){
	if (location.href.indexOf("?") > 0){
		$(".srcwrap ul li a").attr("href",($(".srcwrap ul li a").attr("href") + location.href.substring(location.href.indexOf("?"))))
	}
	
	if($("#article_6008").hasClass("active") || $("#article_6444").hasClass("active")){
		//Anasayfa
		var flashvars = {};
		var params = {wmode: "transparent", loop: "true"};
		var attributes = {id: "bgflash"};
		var expressInstallSwfurl = '';
		swfobject.embedSWF('/i/Assets/BGVideo.swf?xmlPath=/i/Assets/xml/content.xml&videoPath=http://www.akbanksanat.com/i/Assets/1.flv', 'bgflash', '100%', '100%', '9.0.0', expressInstallSwfurl,  flashvars, params, attributes);
		$(".bgpattern").remove();
	}
	if($("#article_6012").hasClass("active") || $("#article_6446").hasClass("active")){
		//Tiyatrolar
		var flashvars = {};
		var params = {wmode: "transparent", loop: "true"};
		var attributes = {id: "bgflash"};
		var expressInstallSwfurl = '';
		swfobject.embedSWF('/i/Assets/BGVideo.swf?xmlPath=/i/Assets/xml/content1.xml&videoPath=http://www.akbanksanat.com/i/Assets/2.flv', 'bgflash', '100%', '100%', '9.0.0', expressInstallSwfurl,  flashvars, params, attributes);
		$(".bgpattern").remove();
	}
	if($("#article_6010").hasClass("active") || $("#article_6448").hasClass("active")){
		//Caz Festivali
		var flashvars = {};
		var params = {wmode: "transparent", loop: "true"};
		var attributes = {id: "bgflash"};
		var expressInstallSwfurl = '';
		swfobject.embedSWF('/i/Assets/BGVideo.swf?xmlPath=/i/Assets/xml/content2.xml&videoPath=http://www.akbanksanat.com/i/Assets/3.flv', 'bgflash', '100%', '100%', '9.0.0', expressInstallSwfurl,  flashvars, params, attributes);
		$(".bgpattern").remove();
	}
	if($("#article_6014").hasClass("active") || $("#article_6462").hasClass("active")){
		//Dans
		var flashvars = {};
		var params = {wmode: "transparent", loop: "true"};
		var attributes = {id: "bgflash"};
		var expressInstallSwfurl = '';
		swfobject.embedSWF('/i/Assets/BGVideo.swf?xmlPath=/i/Assets/xml/content3.xml&videoPath=http://www.akbanksanat.com/i/Assets/4.flv', 'bgflash', '100%', '100%', '9.0.0', expressInstallSwfurl,  flashvars, params, attributes);
		$(".bgpattern").remove();
	}
	
	
	
	if($("body").attr("lang") == "en"){
		var namesurename = "Name Surname";
		var email = "E-mail Address";
		var fnamesurename = "Friend Name Surname";
		var fmail = "His/Her E-mail Address";
		var msg = "Your Message";
		var sbmt_btn = "basvur_btn_eng.png";
		var share_close = "share_close_eng.png";
	}
	else if($("body").attr("lang") == "tr"){
		var namesurename = "Adınız Soyadınız";
		var email = "E-posta Adresiniz";
		var fnamesurename = "Arkadaşınızın Adı Soyadı";
		var fmail = "E-posta Adresi";
		var msg = "Mesajınız";
		var sbmt_btn = "sbmt_btn.png";
		var share_close = "share_close.png";
	}
	var itemheight = 33;
	var itemnextcount = 3;
	var currentitemdisplaycount = 4;	
	
	$(".rolltop").click(function(){
		actionid = $(this).attr("row");
		selector = "ul[row='"+actionid+"content']";
		
		CurrentContainerHeight = $(selector).height() - (itemheight * currentitemdisplaycount);
		CurrentContainerTop = parseFloat($(selector).css("top"));
		
		GotoCssTop = CurrentContainerTop + (itemheight * itemnextcount);
					
		if (GotoCssTop >= 0){
			GotoCssTop = 0;
		};
		
		$(selector).animate({
			'top' : GotoCssTop
		},500)
				
		return false;
	});
	

	$(".rollbottom").click(function(){
		
		actionid = $(this).attr("row");
		selector = "ul[row='"+actionid+"content']";
		
		CurrentContainerHeight = $(selector).height() - (itemheight * currentitemdisplaycount);
		CurrentContainerTop = parseFloat($(selector).css("top"));
		
		GotoCssTop = CurrentContainerTop + (itemheight * itemnextcount)*-1;
		
		if (GotoCssTop < CurrentContainerHeight*-1){
			GotoCssTop = CurrentContainerHeight * -1;
		};
		
		$(selector).animate({
			'top' : GotoCssTop
		},500)
		
		return false;
	});
	
//	$("li.ul-container ul li").hover(function(){
//			if( $(this).parent("div").parent("ul").hasClass('glr') ){ $(this).css({backgroundColor: '#f4791f', color: '#ffffff'}); }
//			else if( $(this).parent('ul').hasClass('clt') ){ $(this).css({backgroundColor: '#2bb673', color: '#ffffff'}); }
//			else if( $(this).parent('ul').hasClass('trd') ){ $(this).css({backgroundColor: '#ee5ba0', color: '#ffffff'}); }
//			else if( $(this).parent('ul').hasClass('msm') ){ $(this).css({backgroundColor: '#00b6f0', color: '#ffffff'}); }
//	},
//	function(){
//			$(this).css({backgroundColor: 'transparent', color: '#bababa'});
//	});
	
	
	$(".back a").click(function(){
		history.back(1);
		return false;
	});
	$("input[type='radio']").custCheckBox();
	$("#cdopt").selectbox();
	
	$("div.media a#share").click(function(){
		var _title = $(".opc .title").text();
		var _encoded_title = encodeURIComponent(_title);
		var _url = window.location;
		if($("div#share_media").width() == null){
			htmls= '<div id="share_media"><a class="close" href="#"><img src="i/Assets/images/' + share_close + '" alt="" /></a><p class="title">' + _title + '</p><ul class="media"><li class="m1"><a href="http://www.flickr.com/account/prefs/sharing?from=' + _url + '" target="_blank">Flickr</a></li><li class="m2"><a href="http://twitter.com/home?status=@AkbankSanat%20' + _encoded_title + '%20' + _url + '" target="_blank">Twitter</a></li><li class="m3"><a href="http://delicious.com/post?url=' + _url + '&title=' + _encoded_title + '" target="_blank">Delicious</a></li><li class="m4"><a href="http://www.facebook.com/share.php?u=' + _url + '" target="_blank">Facebook</a></li><li class="m5"><a href="http://www.stumbleupon.com/submit?url=' + _url + '&title=' + _encoded_title + '" target="_blank">Stumble Upon</a></li><li class="m6"><a href="http://www.myspace.com/Modules/PostTo/Pages/?u=' + _url + '&t=' + _encoded_title + '&c=' + _url + '" target="_blank">My Space</a></li><li class="m7"><a href="http://www.akbanksanat.com/rss/20/4/" target="_blank">RSS</a></li></ul><form action="' + _url + '" method="POST" id="shared" onSubmit="return sendshared(this);"><input type="hidden" name="form-type" value="stf"><input type="hidden" name="link" value="'+ window.location.href +'"><input type="hidden" name="headline" value="'+ document.title +'"><div class="share_form"><div class="form_itm"><label for="namesurename">' + namesurename + '</label><input type="text" name="namesurename" class="textbox" id="namesurename"></div><div class="form_itm"><label for="clientmail">' + email + '</label><input type="text" name="clientmail" class="textbox" id="clientmail"></div><div class="form_itm"><label for="fnamesurename">' + fnamesurename + '</label><input type="text" name="fnamesurename" class="textbox" id="fnamesurename"></div><div class="form_itm"><label for="fmail">' + fmail + '</label><input type="text" name="fmail" class="textbox" id="fmail"></div><div class="form_itm_msg"><label for="msg">' + msg + '</label><textarea name="msg" id="msg" class="textarea" rows="2" cols="20"></textarea></div><input type="image" src="i/Assets/images/' + sbmt_btn + '" class="sbmt" /></div></div></form>';
			if($("div.gcnt").hasClass("active")){
				$("div.gcnt.active").append(htmls);
				}else{
				$("div.gcnt").append(htmls);
			};
		}
		if ($("#share_media").is(":hidden")) {
			$("#share_media").slideDown("slow");
		}
		else{
			$("#share_media").hide();
		}
		return false;
	});
	
	$("div.gcnt div#share_media a.close").live("click", function(){
		$("#share_media").hide();
		return false;
	});
	$("div.foot a#share").click(function(){
		var _title = $("div.artmapdtl").children("div.title").text();
		var _encoded_title = encodeURIComponent(_title);
		var _url = window.location;
		if($("div#share_media").width() == null){
			htmls = '<div id="share_media"><a class="close" href="#"><img src="i/Assets/images/' + share_close + '" alt="" /></a><p class="title">' + _title + '</p><ul class="media"><li class="m1"><a href="http://www.flickr.com/account/prefs/sharing?from=' + _url + '" target="_blank">Flickr</a></li><li class="m2"><a href="http://twitter.com/home?status=@AkbankSanat%20' + _encoded_title + '%20' + _url + '" target="_blank">Twitter</a></li><li class="m3"><a href="http://delicious.com/post?url=' + _url + '&title=' + _encoded_title + '" target="_blank">Delicious</a></li><li class="m4"><a href="http://www.facebook.com/share.php?u=' + _url + '" target="_blank">Facebook</a></li><li class="m5"><a href="http://www.stumbleupon.com/submit?url=' + _url + '&title=' + _encoded_title + '" target="_blank">Stumble Upon</a></li><li class="m6"><a href="http://www.myspace.com/Modules/PostTo/Pages/?u=' + _url + '&t=' + _encoded_title + '&c=' + _url + '" target="_blank">My Space</a></li><li class="m7"><a href="http://www.akbanksanat.com/rss/20/4/" target="_blank">RSS</a></li></ul><form action="' + _url + '" method="POST" id="shared-foot" onSubmit="return sendshared(this);"><input type="hidden" name="form-type" value="stf"><input type="hidden" name="link" value="'+ window.location.href +'"><input type="hidden" name="headline" value="'+ document.title +'"><div class="share_form"><div class="form_itm"><label for="namesurename">' + namesurename + '</label><input type="text" name="namesurename" class="textbox" id="namesurename"></div><div class="form_itm"><label for="clientmail">' + email + '</label><input type="text" name="clientmail" class="textbox" id="clientmail"></div><div class="form_itm"><label for="fnamesurename">' + fnamesurename + '</label><input type="text" name="fnamesurename" class="textbox" id="fnamesurename"></div><div class="form_itm"><label for="fmail">' + fmail + '</label><input type="text" name="fmail" class="textbox" id="fmail"></div><div class="form_itm_msg"><label for="msg">' + msg + '</label><textarea name="msg" id="msg" class="textarea" rows="2" cols="20"></textarea></div><input type="image" src="i/Assets/images/' + sbmt_btn + '" class="sbmt" /></div></div></form>';
			$("div.mapper").append(htmls);
		}
		if ($("#share_media").is(":hidden")) {
			$("#share_media").slideDown("slow");
		}
		else{
			$("#share_media").hide();
		 }
		return false;
	});
	$("div.mapper div#share_media a.close").live("click", function(){
		$("#share_media").hide();
		return false;
	});

	$("input[name='keyword']").focus(function(){
		if($(this).val() == "ARAMA" || $(this).val() == "SEARCH"){
			$(this).val("");
		}
	});
	$("input[name='keyword']").blur(function(){
		if($(this).val() == ""){
			//$(this).val("ARAMA");
		}
	});	
	
	$("input[name='cmail']").focus(function(){
		if($(this).val() == "E-posta adresiniz" || $(this).val() == "E-mail"){
			$(this).val("");
		}
	});
	$("input[name='cmail']").blur(function(){
		if($(this).val() == ""){
			//$(this).val("E-posta adresiniz");
		}
	});
	
	$("input[name='actv']").focus(function(){
		if($(this).val() == "ETKYNLYK ARAMA" || $(this).val() == "EVENT SEARCH"){
			$(this).val("");
		}
	});
	$("input[name='actv']").blur(function(){
		if($(this).val() == ""){
			//$(this).val("ETKYNLYK ARAMA");
		}
	});
	$("input[name='txtsearch']").click(function(){
		if($("input[name='ara']").val() == "ARAMA" || $("input[name='ara']").val() == "SEARCH" || $("input[name='ara']").val() == ""){
			$("input[name='ara']").focus();
			return false;
		}
	});
	$("input[name='actsearch']").click(function(){
		if($("input[name='actv']").val() == "ETKYNLYK ARAMA" || $("input[name='actv']").val() == "EVENT SEARCH" || $("input[name='actv']").val() == ""){
			$("input[name='actv']").focus();
			return false;
		}
	});
		
	
});


	
$(document).ready(function(){
	if($("body").attr("lang") == "en"){
		var share_btn = "share_button_eng.png";
		var share_btn_close = "share_button_close_eng.png";
		var gallery_btn = "gallery_button_open_eng.png";
		var gallery_btn_close = "gallery_button_eng.png";
	}
	else if($("body").attr("lang") == "tr"){
		var share_btn = "share_button.png";
		var share_btn_close = "share_button_close.png";
		var gallery_btn = "gallery_button_open.png";
		var gallery_btn_close = "gallery_button.png";
	}
	if ($("#photos").attr("class") == ""){
		$("a#gallery").addClass("hidden");
	}else{
		$(".gallery_ul li:first").addClass("active");
	};
	var sWidth;
	var sHeight;
	
	function getBackgroundSize(){
		var proportions = 1.5;
		sWidth = $(window).width();
		sHeight = Math.floor(sWidth / proportions);
		if(sHeight < $(window).height()){
			var tHeight = $(window).height() - sHeight;
			sWidth = $(window).width() + ( Math.floor(tHeight * proportions) );
			sHeight = $(window).height();
		}
	}


	var background = {
			"ANASAYFA" : [
				{"bg": "/i/Assets/images/backgrounds/1-ANASAYFA/anasayfa-1.jpg"},
				{"bg": "/i/Assets/images/backgrounds/1-ANASAYFA/anasayfa-4.jpg"}
			],
			"BEYOGLU" : [
				{"bg": "/i/Assets/images/backgrounds/2-BEYOGLU/1-beyoglu.jpg"},
				{"bg": "/i/Assets/images/backgrounds/2-BEYOGLU/2-beyoglu.jpg"},
				{"bg": "/i/Assets/images/backgrounds/2-BEYOGLU/3-beyoglu.jpg"},
				{"bg": "/i/Assets/images/backgrounds/2-BEYOGLU/4-beyoglu.jpg"}
			],
			"GALERI" : [
				{"bg": "/i/Assets/images/backgrounds/3-GALERI/1-galeri.jpg"},
				{"bg": "/i/Assets/images/backgrounds/3-GALERI/2-galeri.jpg"},
				{"bg": "/i/Assets/images/backgrounds/3-GALERI/4-galeri.jpg"},
				{"bg": "/i/Assets/images/backgrounds/3-GALERI/5-galeri.jpg"},
				{"bg": "/i/Assets/images/backgrounds/3-GALERI/6-galeri.jpg"}
			],
			"COKAMACLISALON" : [
				{"bg": "/i/Assets/images/backgrounds/4-COK-AMACLI-SALON/1-cok-amacli-salon.jpg"},
				{"bg": "/i/Assets/images/backgrounds/4-COK-AMACLI-SALON/2-cok-amacli-salon.jpg"},
				{"bg": "/i/Assets/images/backgrounds/4-COK-AMACLI-SALON/3-cok-amacli-salon.jpg"},
				{"bg": "/i/Assets/images/backgrounds/4-COK-AMACLI-SALON/4-cok-amacli-salon.jpg"}
			],
			"MUZIKODASI" : [
				{"bg": "/i/Assets/images/backgrounds/5-MUZIK-ODASI/1-muzik-odasi.jpg"},
				{"bg": "/i/Assets/images/backgrounds/5-MUZIK-ODASI/2-muzik-odasi.jpg"}
			],
			"KUTUPHANE" : [
				{"bg": "/i/Assets/images/backgrounds/6-KUTUPHANE/1-kutuphane.jpg"}
			],
			"DANSATOLYESI" : [
				{"bg": "/i/Assets/images/backgrounds/7-DANS-ATOLYESI/1-dans-atolyesi.jpg"},
				{"bg": "/i/Assets/images/backgrounds/7-DANS-ATOLYESI/2-dans-atolyesi.jpg"}
			],
			"COCUK" : [
				{"bg": "/i/Assets/images/backgrounds/8-COCUK/1-cocuk.jpg"},
				{"bg": "/i/Assets/images/backgrounds/8-COCUK/2-cocuk.jpg"},
				{"bg": "/i/Assets/images/backgrounds/8-COCUK/3-cocuk.jpg"}
			],
			"KAFE" : [
				{"bg": "/i/Assets/images/backgrounds/9-KAFE/2-kafe.jpg"},
				{"bg": "/i/Assets/images/backgrounds/9-KAFE/3-kafe.jpg"}
			],
			"CAZFESTIVALI" : [
				{"bg": "/i/Assets/images/backgrounds/10-CAZ-FESTIVALI/1-caz-festivali.jpg"},
				{"bg": "/i/Assets/images/backgrounds/10-CAZ-FESTIVALI/2-caz-festivali.jpg"},
				{"bg": "/i/Assets/images/backgrounds/10-CAZ-FESTIVALI/3-caz-festivali.jpg"}
			],
			"SANATCILAR" : [
				{"bg": "/i/Assets/images/backgrounds/11-SANATCILAR/1-sanatcilar.jpg"},
				{"bg": "/i/Assets/images/backgrounds/11-SANATCILAR/2-sanatcilar.jpg"},
				{"bg": "/i/Assets/images/backgrounds/11-SANATCILAR/3-sanatcilar.jpg"},
				{"bg": "/i/Assets/images/backgrounds/11-SANATCILAR/4-sanatcilar.jpg"}
			],
			"PROGRAM" : [
				{"bg": "/i/Assets/images/backgrounds/12-PROGRAM/1-program.jpg"},
				{"bg": "/i/Assets/images/backgrounds/12-PROGRAM/2-program.jpg"},
				{"bg": "/i/Assets/images/backgrounds/12-PROGRAM/12-program.jpg"}
			],
			"KISAFILMFESTIVALI" : [
				{"bg": "/i/Assets/images/backgrounds/13-KISA-FILM-FESTIVALI/14-kisa-film-fest.jpg"},
				{"bg": "/i/Assets/images/backgrounds/13-KISA-FILM-FESTIVALI/16-kisa-film-fest.jpg"}
			],
			"TIYATROLAR" : [
				{"bg": "/i/Assets/images/backgrounds/14-TIYATROLAR/15-tiyatrolar.jpg"},
				{"bg": "/i/Assets/images/backgrounds/14-TIYATROLAR/16-tiyatrolar.jpg"},
				{"bg": "/i/Assets/images/backgrounds/14-TIYATROLAR/17-tiyatrolar.jpg"}
			],
			"ODAORKESTRASI" : [
				{"bg": "/i/Assets/images/backgrounds/15-ODA-ORKESTRASI/15-oda-orkestrasi.jpg"},
				{"bg": "/i/Assets/images/backgrounds/15-ODA-ORKESTRASI/16-oda-orkestrasi.jpg"}
			],
			"DANS" : [
				{"bg": "/i/Assets/images/backgrounds/16-DANS/1-dans.jpg"},
				{"bg": "/i/Assets/images/backgrounds/16-DANS/2-dans.jpg"},
				{"bg": "/i/Assets/images/backgrounds/16-DANS/3-dans.jpg"}
			],
			"YAYINLAR" : [
				{"bg": "/i/Assets/images/backgrounds/17-YAYINLAR/1-yayinlar.jpg"},
				{"bg": "/i/Assets/images/backgrounds/17-YAYINLAR/2-yayinlar.jpg"},
				{"bg": "/i/Assets/images/backgrounds/17-YAYINLAR/3-yayinlar.jpg"}
			],
			"SPONSORLUKLAR" : [
				{"bg": "/i/Assets/images/backgrounds/18-SPONSORLUKLAR/1-sponsorluklar.jpg"},
				{"bg": "/i/Assets/images/backgrounds/18-SPONSORLUKLAR/2-sponsorluklar.jpg"}
			]
		};
	
	var bodyClass = $("body").attr("class");
	bodyClass = (bodyClass == '') ? "ANASAYFA":$("body").attr("class");

	if(!$("#article_6008").hasClass("active") && !$("#article_6010").hasClass("active") && !$("#article_6012").hasClass("active") && !$("#article_6014").hasClass("active") && !$("#article_6444").hasClass("active") && !$("#article_6446").hasClass("active") && !$("#article_6448").hasClass("active") && !$("#article_6462").hasClass("active")){
		randomNumber = Math.floor(Math.random()* eval("background." + bodyClass + ".length"));
		SetBackground(eval("background." + bodyClass + "[" + randomNumber +"].bg"));
	}
	
	function SetBackground(RandomSrc){
		getBackgroundSize();
		$("<img>").attr({src: RandomSrc, alt: ''}).css({width: sWidth, height: sHeight}).appendTo("div.background");
		$("div.background").css({height: $(window).height()});
	};
	
	
	$(window).bind("resize", function(){
		getBackgroundSize();
		$("div.background img").css({width: sWidth, height: sHeight});
		$("div.background").css({height: $(window).height()});
	});
	

	if($.browser.msie && $.browser.version == "6.0"){
		$("a.caz_adv").css({
			background: 'transparent',
			filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/i/Assets/images/tbg7.png", sizingMethod="crop")'
		});
		$("a#share").css({
			background: 'transparent',
			filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/i/Assets/images/' + share_btn_close + '", sizingMethod="crop")'
		});
		$("a#gallery").css({
			background: 'transparent',
			filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/i/Assets/images/' + gallery_btn + '", sizingMethod="crop")'
		});
	}
	else{
		$("a.caz_adv").css("background","transparent url(/i/Assets/images/tbg7.png) no-repeat left top");
		$("a#share").css("background","transparent url(/i/Assets/images/" + share_btn_close + ") no-repeat left top");
		$("a#gallery").css("background","transparent url(/i/Assets/images/" + gallery_btn + ") no-repeat left top");
	}
	$("a.caz_adv").hover(function(){
		if($.browser.msie && $.browser.version == "6.0"){
			$(this).css({
				background: 'transparent',
				filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/i/Assets/images/tbg33.png", sizingMethod="scale")'
			});
		}
		else{
			$(this).css("background","transparent url(/i/Assets/images/tbg33.png) repeat left top");
		}
	},
	function(){
		if($.browser.msie && $.browser.version == "6.0"){
			$(this).css({
				background: 'transparent',
				filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/i/Assets/images/tbg7.png", sizingMethod="scale")'
			});
		}
		else{
			$(this).css("background","transparent url(/i/Assets/images/tbg7.png) repeat left top");
		}
	});
	$("a#share").hover(function(){
		if($.browser.msie && $.browser.version == "6.0"){
			$(this).css({
				background: 'transparent',
				filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/i/Assets/images/' + share_btn + '", sizingMethod="crop")'
			});
		}
		else{
			$(this).css("background","transparent url(/i/Assets/images/" + share_btn + ") repeat left top");
		}
	},
	function(){
		if($.browser.msie && $.browser.version == "6.0"){
			$(this).css({
				background: 'transparent',
				filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/i/Assets/images/' + share_btn_close + '", sizingMethod="crop")'
			});
		}
		else{
			$(this).css("background","transparent url(/i/Assets/images/" + share_btn_close + ") repeat left top");
		}
	});
	
	$("#gallery").hover(function(){
		if($.browser.msie && $.browser.version == "6.0"){
			$(this).css({
				background: 'transparent',
				filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/i/Assets/images/' + gallery_btn_close + '", sizingMethod="crop")'
			});
		}
		else{
			$(this).css("background","transparent url(/i/Assets/images/" + gallery_btn_close + ") no-repeat left top");
		}
	},
	function(){
		if($.browser.msie && $.browser.version == "6.0"){
			$(this).css({
				background: 'transparent',
				filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/i/Assets/images/' + gallery_btn + '", sizingMethod="crop")'
			});
		}
		else{
			$(this).css("background","transparent url(/i/Assets/images/" + gallery_btn + ") repeat left top");
		}
	});
	//akbanksanat opacity - color change
	$("div.artc").children("img.altimg").css({opacity: '0.7'});
	$("div.artc").hover(function(){
		$(this).children("img.altimg").css({opacity: '1'});
		$(this).children("div.artcnt a").css("color","#ffffff");
	},
	function(){
		$(this).children("img.altimg").css({opacity: '0.7'});
		$(this).children("div.artcnt a").css("color","#bababa");		
	});
	//anasayfa date color change
	$("div.cntwrap div.cnt").hover(function(){
		$(this).children("div.date").css("background-color","#ff0033");
	},
	function(){
		$(this).children("div.date").css("background-color","transparent");
	});
	
	//home
/*
	if ($("#activity_cal")){
		var slider1 = $("#activity_cal").Slider({
			duration:500,
			width: 455,
			Mask: '.dates-wrp',
			ItemContainer: '.dates',
			Item: '.slide_cnt',
			LeftArrow: '#roll-left',
			RightArrow: '#roll-right'
		});
	}
*/	
	if ($("#activity_cal2")){	
		var slider2 = $("#activity_cal2").Slider({
			duration:500,
			Mask: '.slider',
			ItemContainer: '.slider-item-container',
			Item: '.activities',
			LeftArrow: '#roll-left2',
			RightArrow: '#roll-right2',
			AutoSlide: 'on',
			AutoSlideTime : 7500
		});
	}
	
	if ($("#activity_cal3")){	
		var slider4 = $("#activity_cal3").Slider({
			duration:500,
			Mask: '.slider2',
			ItemContainer: '.slider-item-container2',
			Item: '.item',
			LeftArrow: '#roll-left3',
			RightArrow: '#roll-right3',
			AutoSlide: 'on'
		});
	}
	
	$("div.cntwrap div.cnt img.preimg").css({opacity: '0.7'});
	
	$("div.cntwrap div.cnt").hover(function(){
		$(this).children("div.date").css("background-color","#ff0033");
		$(this).children("img.preimg").css({opacity: '1'});
		$(this).css("background-color", "#242424");
	},
	function(){
		$(this).children("div.date").css("background-color","transparent");
		$(this).children("img.preimg").css({opacity: '0.7'});
		$(this).css("background-color", "#030303");
	});
	
	//etkinlik takvimi color change
	$("div.act_top div.activities img.actimg").css({opacity: '0.7'});
	
	$("div.act_top div.activities").hover(function(){
		$(this).css("background-color","#242424");
		$(this).children("img.actimg").css({opacity: '1'});
	},
	function(){
		$(this).css("background-color","#030303");
		$(this).children("img.actimg").css({opacity: '0.7'});
	});
	
	//etkinlik color change
	$("div.act_details div.acnt").hover(function(){
		$(this).css("background-color","#d10029");
		$(this).children("div.wcnt").children("p.rt").css("color","#000000");
	},
	function(){
		$(this).css("background-color","#030303");
		$(this).children("div.wcnt").children("p.rt").css("color","#ff0032");
	});
	/*
	var datelength = $("div.roll_cnt div.roll a").size();
	var margins = datelength - 23;
	$("div.roll a").each(function(i){
		if($(this).hasClass("active")){
			if(i <= 22){
				$("div.roll").css({marginLeft: '0px'});
			}
			else{
				$("div.roll").css({marginLeft:  -38 * margins });
			}
			return false;
		}
	});
	$("div.rol-wrap a.rol-right").click(function(){
		$("div.roll").animate({marginLeft: -38 * margins});
		return false;
	});
	$("div.rol-wrap a.rol-left").click(function(){
		$("div.roll").animate({marginLeft: '0px'},500);
		return false;
	});	
	*/
	$("div.media #gallery").click(function(){
		$("#gallery_splash").css({display: 'block',height: $(document).height()});
		$("#gallery_splash_content").css({display: 'block'});
		return false;
	});
	$("#gallery_splash").click(function(){
		$(this).css("display","none");
		$("#gallery_splash_content").css({display: 'none'});
	});
	$("a#close_gallery").click(function(){
		$("#gallery_splash").css("display","none");
		$("#gallery_splash_content").css({display: 'none'});
		return false;
	});
	
	$('.gallery_ul').galleria({
		history   : false, // activates the history object for bookmarking, back-button etc.
		clickNext : true, // helper for making the image clickable
		insert    : '#main_image', // the containing selector for our main image
		onImage   : function(image,caption,thumb) { // let's add some image effects for demonstration purposes
							
			// fetch the thumbnail container
			var _li = thumb.parents('li');
			
			// fade out inactive thumbnail
			_li.siblings().children('img.selected').fadeTo(500,0.3);
			
			// fade in active thumbnail
			thumb.fadeTo('fast',1).addClass('selected');
			
			// add a title for the clickable image
			image.attr('title','Next image >>');
		},
		onThumb : function(thumb) { // thumbnail effects goes here
			
			// fetch the thumbnail container
			var _li = thumb.parents('li');
			
			// if thumbnail is active, fade all the way.
			var _fadeTo = _li.is('.active') ? '1' : '0.3';
			
			// fade in the thumbnail when finnished loading
			thumb.css({display:'none',opacity:_fadeTo}).fadeIn(1500);
			
			// hover effects
			thumb.hover(
				function() { thumb.fadeTo('fast',1); },
				function() { _li.not('.active').children('img').fadeTo('fast',0.3); } // don't fade out if the parent is active
			)
		}
	});	
});