/*
*	h.js
*
*	CSS Development Made by CATÂ®
* 	http://www.madebycat.com
*/
$(window).load(function(){
	if(window.location.hash == "#andmagform"){
		$("#andmag-basvur-bg").slideDown();
		$("#andmag-basvur-cont").animate({
			width: 902
		}, 1000);
	}
});
var externalLinks = function(){
	$("a[rel='external']").click(function(){
		window.open(this.href);
		return false;
	});
};

function $get(key,url){  
 if(arguments.length < 2) url =location.href;  
 if(arguments.length > 0 && key != ""){  
     if(key == "#"){  
         var regex = new RegExp("[#]([^$]*)");  
     } else if(key == "?"){  
         var regex = new RegExp("[?]([^#$]*)");  
     } else {  
         var regex = new RegExp("[?&]"+key+"=([^&#]*)");  
     }  
     var results = regex.exec(url);  
     return (results == null )? "" : results[1];  
 } else {  
     url = url.split("?");  
     var results = {};  
         if(url.length > 1){  
             url = url[1].split("#");  
             if(url.length > 1) results["hash"] = url[1];  
             url[0].split("&").each(function(item,index){  
                 item = item.split("=");  
                 results[item[0]] = item[1];  
             });  
         }  
     return results;  
 }  
};

function benefits_close(){
	$("#indirim-absolute-bg").slideUp();
	$("#indirim-flash-cont").css("display", "none");
	$("#indirim-banner").css("display", "block");
	setTimeout('$("#indirim-flash-cont").css("width", "0")', 500);
};

function ajandaHeightfix() {
	if ($("#ajanda")){
		maxa = 0
		$(".ajanda-col").each(function(){
	    a = $(this).height();
		    if (a>maxa){
		        maxa = a;
		    }
		});
		maxa = maxa + 40;
		ajandaHeight = maxa + "px";
		$("#ajanda").css("height", ajandaHeight);
	}
};

function accAjaxloader(obj){
	if ($(obj).attr("ajaxcls") == "virgin") {
		loadid = $(obj).attr("id").substring(6,$(obj).attr("id").length);
		PageUrl = "/plugins/pc/" + loadid;
		$.ajax({
			url			: PageUrl, 
			cache		: true,
			dataType	: "html",
			success		: function(html){
				$('#contentoftitle-' + loadid).html(html);
				html = $('#contentoftitle-' + loadid).html();
				$('#contentoftitle-' + loadid).html(html);
				$('#contentoftitle-' + loadid + ' .seyahat-info:first').css("width", "465px");
				seheyahatHeight = $('#contentoftitle-' + loadid + ' .seyahat-info:first').height();
					$('#contentoftitle-' + loadid + ' .seyahat-info:first').parent().parent().animate({
						height: seheyahatHeight
					}, 100);
					$("#contentoftitle-"+ loadid).css("display", "block");
				 jQuery('#mycarousel-' + loadid).jcarousel({
			        wrap: 'circular',
			        itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback},
			        itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback-loadid}
				});
			}
		});
		$(obj).attr("ajaxcls", "loaded");
	}else if ($(obj).attr("ajaxcls") == "loaded"){
		return true;
	};
};

function accordione(aobj) {
		containerID = $(aobj).attr("acc")+"cont";
		contDIV = $("div[acc=" +containerID +"]");
		if (contDIV.css("display") == "none" ) {
			if ($("#cty-inner").height() != 0) {
				$("#cty-inner h5").css("background-position", "0 0");
				$("#cty-inner div[acc]").slideUp();	
			};
//			$(".accordion h5").css("background-position", "0 0");
			$(aobj).css("background-position", "0 100%");
//			$(".accordion h5 + div").slideUp();
			contDIV.slideDown();
		}else{
			contDIV.slideUp();
			$(aobj).css("background-position", "0 0");
		};
		return false;
};

function validate_email(o) {
    if (o.attr("value") != undefined){
	    var email  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (o.attr("value").match(email)) {
			alert("go");
		}else{
			alert('LÃ¼tfen geÃ§erli bir e-mail adresi yazÄ±nÄ±z.');
		};
    }else{
    	alert('LÃ¼tfen geÃ§erli bir e-mail adresi yazÄ±nÄ±z.');
    };
};

function stf() {
    alert("oldu");
    setTimeout('$("#stf").animate({height: 0}, 500);', 100);
	return false;
};

function fotogaleri370() {
	ahtmlstrt = '<ul id="fotogaleri-list">'
	ahtmlend = "</ul>"
	ahtml = ""
	$("#fotogaleri-cont img").each(function(i){
	    ahtml += '<li><a class="fotoslide" href="#" slide="' + (i*-370) + '">' +(i+1) +'</a></li>';
	    nmbr = i;
	})
	if (nmbr != 0) {
		text = ahtmlstrt + ahtml + ahtmlend
		$("#fotogaleri-370").append(text);		
	}else{
		return false;
	};
	$("#fotogaleri-list li:first").addClass("active");
};

function fotogaleri600() {
	ahtmlstrt = '<ul id="fotogaleri-list">'
	ahtmlend = "</ul>"
	ahtml = ""
	$("#fotogaleri-cont img").each(function(i){
	    ahtml += '<li><a class="fotoslide2" href="#" slide="' + (i*-265) + '">' +(i+1) +'</a></li>';
	    nmbr = i;
	})
	if (nmbr != 0) {
		text = ahtmlstrt + ahtml + ahtmlend
		$("#fotogaleri-600").append(text);		
	}else{
		return false;
	};
	$("#fotogaleri-list li:first").addClass("active");
};

function selectOnChange(){
	
};


function campaignLoader(campid) {
	if ($("#splash").css("display") == "none"){
		PageUrl = "/plugins/pc/" + campid;
		$.ajax({
			url			: PageUrl,
			cache		: true,
			dataType	: "html",
			success		: function(html){
				$('#splash').html(html);
				k = ($(window).width()/2) - (parseInt(parseFloat($("#splash").css("width"))))/2;
				$("#splash").animate({	
					left: k+"px"
				}, 500);
				$("#splash").fadeIn("slow");
			}
		});
	}else{
		PageUrl = "/plugins/pc/" + campid;
		$.ajax({
			url			: PageUrl, 
			cache		: true,
			dataType	: "html",
			success		: function(html){
				$('#splash').html(html);
				k = ($(window).width()/2) - (parseInt(parseFloat($("#splash").css("width"))))/2;
				$("#splash").animate({	
					left: k+"px"
				}, 500);
				name = "#splash";
				offset = menuYloc+$(document).scrollTop()+"px";
				if ($.browser.mozilla) {
					offset = (10)+$(document).scrollTop()+"px";
					$(name).animate({top:offset},{duration:500,queue:false});
				}else{
					offset = (menuYloc-170)+$(document).scrollTop()+"px";
					$(name).animate({top:offset},{duration:500,queue:false});
				};
			}
		});
	}
};





$(document).ready(function(){
	externalLinks();
//	validate_email($(".emailvalidate"));
	
	$(".fotoslide").live("click", function(){
		$("#fotogaleri-list li").removeClass("active");	
		$(this).parent().addClass("active");
		slide = $(this).attr("slide");
		$("#fotogaleri-370-maxw").animate({
			left: slide
		}, 500);
		return false;
	});

	$(".fotoslide2").live("click", function(){
		$("#fotogaleri-list li").removeClass("active");	
		$(this).parent().addClass("active");
		slide = $(this).attr("slide");
		$("#fotogaleri-600-maxw").animate({
			top: slide
		}, 500);
		return false;
	});

//	$("input").focus(function(){
//		oldTXT = $(this).attr("value");
//		$(this).attr("value","");
//	});	
//	$("input").blur(function(){
//		newTXT = $(this).attr("value") == "" ? oldTXT : "";
//		if(newTXT != ""){
//			$(this).attr("value",newTXT);
//		};
//	});
	
	$("#agenda-splash-container .blue-close").live("click", function(){
		$("#splash").fadeOut("slow");
		return false;
	});
	
	//$("#btn-abone-ol").click(function(){
	//	$(this).addClass("active");
	//	$("#abone-ol-bubble").fadeIn();
	//	setTimeout('$("#abone-ol-bubble").fadeOut();$("#btn-abone-ol").removeClass("active");', 5000);
	//	return false;
	//});
	
	$("#btn-quint-merkez").click(function(){
		$("#quint-merkez-bg").slideDown();
		$("#quint-merkez-cont").animate({
			width: 876
		}, 500);
		return false;
	});
	
	$("#btn-conc-deneyim").click(function(){
		$("#deneyim-bg").slideDown("slow");
		return false;
	});
	$("#deneyim-cont .blue-close").click(function(){
		$("#deneyim-bg").slideUp("slow");
		return false;
	});
		
	$("#quint-merkez .blue-close").click(function(){
		$("#quint-merkez-bg").slideUp();
		$("#quint-merkez-cont").animate({
			width: 0
		}, 1000);
		setTimeout('$("#quint-merkez-cont").css("display", "none")', 1500);
		return false;
	});
	
	$("#btn-quint-ne").click(function(){
		$("#quint-merkez-bg").slideUp();
		$("#quint-merkez-cont").animate({
			width: 0
		}, 1000);
		setTimeout('$("#quint-merkez-cont").css("display", "none")', 1500);
		$("#ne-dediler").slideDown();
		return false;
	});
	
	$("#ne-dediler .blue-close").click(function(){
		$("#ne-dediler").slideUp();
		return false;
	});
	
	$("#abone-ol-bubble #basvur").click(function(){
		$("#andmag-basvur-bg").slideDown();
		$("#andmag-basvur-cont").animate({
			width: 902
		}, 1000);
		return false;
	});
	
	$("#btn-indirim-noktalari").click(function(){
		$("#indirim-banner").css("display", "none");
		$("#indirim-absolute-bg").slideDown();
		$("#indirim-flash-cont").animate({
			width: 900
		}, 500);
		return false;
	});
	
//	$("#indirim-flash img").click(function(){
//		$("#indirim-absolute-bg").fadeOut();
//		$("#indirim-flash-cont").animate({
//			width: 0
//		}, 500);
//		return false;
//	});
	
	$(".campaign-container a").click(function(){
		campid = $(this).attr("campid");
		campaignLoader(campid);
		return false;
	});
	
	$("#andmag-basvur .blue-close").click(function(){
		$("#andmag-basvur-bg").slideUp();
		$("#andmag-basvur-cont").animate({
			width: 0
		}, 1000);
		setTimeout('$("#andmag-basvur-cont").css("display", "none")', 1500);
		setTimeout('$("#andmag-basvuru-form").css("display", "block")', 1500);
		setTimeout('$("#andmag-result").css("display", "none")',1500);
		return false;
	});
	
	$("#club-hizmet").click(function(){
		$(".head-nav ul li").removeClass("active");
		$(this).addClass("active");
		$("#andclub-hizmetleri-bg").slideDown();
		$("#quint-ayricalik-txt").fadeOut("fast");
		setTimeout('$("#quint-ayricalik-txt").css("width", "0")', 1000);
		$("#andclub-hizmetleri").animate({
			width: 902
		}, 1000);
		return false;
	});
	
//	$("#quint-ayricalik").click(function(){
//		$(".head-nav ul li").removeClass("active");
//		$(this).addClass("active");
//		$("#andclub-hizmetleri-bg").slideDown();
//		$("#andclub-hizmetleri").fadeOut("fast");
//		setTimeout('$("#andclub-hizmetleri").css("width", "0")', 1000);
//		$("#quint-ayricalik-txt").animate({
//			width: 902
//		}, 1000);
//		return false;
//	});
	
	
	$("#conc-back").click(function(){
		deneyimleft = parseInt(parseFloat($("#deneyim-inner").css("left")));
		if (deneyimleft < 0) {
			deneyimleft = deneyimleft + 452;
			$(this).css("display", "none");
			$("#deneyim-inner").animate({
				left: deneyimleft
			}, 500);
			setTimeout('$("#conc-back").css("display", "block");', 700);
		};
		return false;
	});
	
	$("#conc-next").click(function(){
		deneyimleft = parseInt(parseFloat($("#deneyim-inner").css("left")));
		if (deneyimleft > -2712) {
			deneyimleft = deneyimleft - 452;
			$(this).css("display", "none");
			$("#deneyim-inner").animate({
				left: deneyimleft
			}, 500);
			setTimeout('$("#conc-next").css("display", "block");', 700);
		};
		return false;
	});
	
	$("#andclub-hizmetleri .blue-close").click(function(){
		$("#club-hizmet").removeClass("active");
		$("#quint-ayricalik").addClass("active");
		$("#andclub-hizmetleri-bg").slideUp();
		$("#andclub-hizmetleri").fadeOut();
		setTimeout('$("#andclub-hizmetleri").css("width","0")', 500);
		return false;
	});
	
	$("#quint-ayricalik-txt .blue-close").click(function(){
		$("#quint-ayricalik").removeClass("active");
		$("#andclub-hizmetleri-bg").slideUp();
		$("#quint-ayricalik-txt").fadeOut();
		setTimeout('$("#quint-ayricalik-txt").css("width","0")', 500);
		return false;
	});
	
	$(".acc-nav ul li a").click(function(){
		accid = $(this).parent().attr("id");
		subacc = $(".acc-nav #"+ accid +" ul");
		if ( subacc.css("display") == "block" ) {
			$(this).parent().removeClass("active");
			$(".acc-nav #"+ accid +" ul").slideUp();
		}else{
			if ($(this).parent().parent().parent().parent().attr("id") != "zone_9" && $(this).parent().parent().parent().parent().attr("id") != "zone_10"){
				$(".acc-nav ul li").removeClass("active");
				$(this).parent().addClass("active");
				$("#main #sidebar div.acc-nav ul li ul").addClass("cls")
				$(".acc-nav li ul#zone_28, .acc-nav li ul#zone_29, .acc-nav li ul#zone_30, .acc-nav li ul#zone_31, .acc-nav li ul#zone_32, .acc-nav li ul#zone_33, .acc-nav li ul#zone_34, .acc-nav li ul#zone_35, .acc-nav li ul#zone_36, .acc-nav li ul#zone_37").slideUp();
				$(".acc-nav #"+ accid +" ul").slideDown();	
			}
		};
		return false;
	});
	
	$(".acc-nav ul li ul li a").click(function(){
		$("#main").addClass("loading");
		$(".acc-nav ul li ul li").removeClass("active");
		article_id = $(this).parent().attr("id").substring(8,$(this).parent().attr("id").length);
		PageUrl = "/plugins/pc/" + article_id;
		$.ajax({
			url			: PageUrl, 
			cache		: true,
			dataType	: "html",
			success		: function(html){
				$('#content').html("");
				$('#content').html(html);
				html = $('#content').html();
				$('#content').html(html);
				accordionID();
				$("#cty-inner h5 + div").css("padding", "10px 22px 15px 22px");
				$("#cty-inner h5:first").css("background-position", "0 100%");
				$("#cty-inner div[acc]:first").slideDown();
			}
		});	
		$(this).parent().addClass("active");
		setTimeout('$("#main").removeClass("loading")', 3000);
	});
	
	$("#ajanda-next,#ajanda-back").click(function(){
		$("#ajanda").addClass("ajandaloading");
		setTimeout('$("#ajanda").removeClass("ajandaloading")', 2500);
	});
	
	$(".acc-nav ul li.active").parent().css("display", "block");
	$(".acc-nav ul li:even a").addClass("dark");
	$(".acc-nav ul li#article_20 a, .acc-nav ul li#article_22 a, .acc-nav ul li#article_24 a").addClass("dark");
	$(".acc-nav ul li#article_21 a, .acc-nav ul li#article_23 a").removeClass("dark");
	$(".accordion2 h5:even").addClass("dark");
	$(".accordion h5:even").addClass("dark");
	
	$("#city-acc h5").click(function(){
		$("#city-acc h5").css("background-position", "0 0");
		$("#city-acc div[acc]").slideUp();
		accAjaxloader(this);
	});
		
	$("#hiphot-acc h5").click(function(){
		$("#hiphot-acc h5").css("background-position", "0 0");
		$("#hiphot-acc div[acc]").slideUp();
		accAjaxloader(this);
	});
	
	$(".accordion h5").live("click", function(){
		accordione(this);
	});
	
	$(".accordion2 h5").live("click", function(){
		accordione(this);
	});

	function accordionID() {
		acctitles = $(".accordion h5");
		acccont = $(".accordion h5 + div");
		$(".accordion h5").each(function(i){
			$(acctitles[i]).attr("acc", "acc"+i);
			$(acccont[i]).attr("acc", "acc"+i+"cont");
			$(acctitles[i]).attr("ajaxcls", "virgin");
		});
	};
	function accordionID2() {
		acctitles = $(".accordion2 h5");
		acccont = $(".accordion2 h5 + div");
		$(".accordion2 h5").each(function(i){
			$(acctitles[i]).attr("acc", "acc2"+i);
			$(acccont[i]).attr("acc", "acc2"+i+"cont");
			$(acctitles[i]).attr("ajaxcls", "virgin");
		});
	};
	$("#stf-s").live("click", function(){
		if ($("#stf").height() == 0) {
			$("#stf").animate({
				height: 140
			}, 500);
		}else{
			$("#stf").animate({
				height: 0
			}, 500);
		};
		return false;
	});

	$(".carousel-a").live("click", function(){
		caroID = "#" + $(this).attr("accid");
		caroIDparent = $("#" + $(this).attr("accid")).parent().parent().attr("id")
		if ($(caroID).css("width") == "0px") {
			$("#" + caroIDparent + " .seyahat-info").animate({
				width: 0
			}, 500);
			$(caroID).animate({
				width: 465
			}, 500);
			caroHeight = $(caroID).height()
			$("#" + $(this).attr("accid")).parent().parent().animate({
				height: caroHeight
			}, 100);
		}else{
			return false;
		};
		return false;
	});
	
	var Totalw = 0;
	function nexttimer(){
		
		if(Totalw == 0){
			 $("#special-width > img").each(function(i){
			   Totalw += $(this).width();
			 });
		 }
		
		var l = parseInt(parseFloat($('.special-fotogaleri').css("left")));
		var maxl = (Totalw - 780) * -1;

		nextt = setTimeout(function(){
			if (l > maxl) {
				l = l - 10 ;
				$('.special-fotogaleri').css("left",l);
				nexttimer();
			}else{
				clearTimeout(nextt);
			};
		}, 10);
	};
	
	function prevtimer(){
		var l = parseInt(parseFloat($('.special-fotogaleri').css("left")));
		var width = (parseInt(parseFloat($('#special-width').css("width"))) - 960)* -1;
		prevv = setTimeout(function(){
			if (l < 0 ) {
				l = l + 10 ;
				$('.special-fotogaleri').css("left",l);
				prevtimer();
			}else{
				clearTimeout(prevv);
			};
		}, 10);
	};
	
//	function cityguidefirstload(loadid){
//		if ($("#title-"+ loadid).attr("ajaxcls") == "virgin") {
//			PageUrl = "/plugins/pc/" + loadid;
//			$.ajax({
//				url			: PageUrl, 
//				cache		: true,
//				dataType	: "html",
//				success		: function(html){
//					$('#contentoftitle-' + loadid).html(html);
//					html = $('#contentoftitle-' + loadid).html();
//					$('#contentoftitle-' + loadid).html(html);
//					$('#contentoftitle-' + loadid + ' .seyahat-info:first').css("width", "465px");
//					seheyahatHeight = $('#contentoftitle-' + loadid + ' .seyahat-info:first').height();
//					$('#contentoftitle-' + loadid + ' .seyahat-info:first').parent().animate({
//						height: seheyahatHeight
//					}, 100);
//					$("#contentoftitle-"+ loadid).css("display", "block");
//					 jQuery('#mycarousel-' + loadid).jcarousel({
//				        wrap: 'circular',
//				        itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback},
//				        itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback-loadid}
//					});
//				}
//			});
//			$("#title-"+ loadid).attr("ajaxcls", "loaded");	
//		};
//	};
	
	$("#special-next").live("mouseover", function(){
		nexttimer();
	}).live("mouseout", function(){
		clearTimeout(nextt);
	});
	
	$("#special-back").live("mouseover", function(){
		prevtimer();
	}).live("mouseout", function(){
		clearTimeout(prevv);
	});
	
	$('.small-gallery-item').mouseover(function(){
		$(this).css("opacity", "1");
	}).mouseout(function(){
		$(this).css("opacity", ".5");
	}).click(function(){
		loadid = $(this).attr("id").substring(7,$(this).attr("id").length);
		PageUrl = "/plugins/pc/" + loadid;
		$('#specialGalleryLoad').html("");
		$.ajax({
			url			: PageUrl, 
			cache		: true,
			dataType	: "html",
			success		: function(html){
				$('#specialGalleryLoad').html(html);
				$(".small-gallery-item").removeClass("active");
				$("#atitle-"+ loadid).addClass("active");
			}
		});
	});
	
	
	$('#small-gallery-back').click(function(){
		leftof = parseInt(parseFloat($(".small-gallery-overflow").css("left")));
		if (leftof >= 0) {
			return false;
		}else{
			$("#small-gallery-back").css("display", "none");
			if (leftof > -161) {
				leftof = leftof + 160 + "px";
			}else{
				leftof = leftof + 320 + "px";	
			};
			$(".small-gallery-overflow").animate({
				left: leftof
			}, 500);
			setTimeout('$("#small-gallery-back").css("display", "block")', 700);
		};
		
		return false;
	});
	
	$('#small-gallery-next').click(function(){
		leftof = parseInt(parseFloat($(".small-gallery-overflow").css("left")));
		widthof = $(".small-gallery-width").width();
		if (leftof + widthof < 810) {
			return false
		}else{
			$("#small-gallery-next").css("display", "none");
			if (leftof == -1600) {
				leftof = leftof - 160 + "px"
			}else{
				leftof = leftof - 320 + "px"	
			};
			$(".small-gallery-overflow").animate({
				left: leftof
			}, 500);
			setTimeout('$("#small-gallery-next").css("display", "block")', 700);
		};
		return false;
	});
	
	$("#special-container .blue-close").live("click", function(){
		$("#special-absolute-bg").slideUp();
		$("#special-absolute").animate({
			width: 0
		}, 500);
		return false;
	});
	
	$(".special-list ul li a").click(function(){
		loadid = $(this).attr("id").substring(6,$(this).attr("id").length);
		PageUrl = "/plugins/pc/" + loadid;
		$('#specialGalleryLoad').html("");
		$.ajax({
			url			: PageUrl, 
			cache		: true,
			dataType	: "html",
			success		: function(html){
				$('#specialGalleryLoad').html(html);
				$("#special-absolute-bg").slideDown();
				$("#special-absolute").animate({
					width: 882
				}, 500);
			}
		});
		return false;
	});
	
	var name = "#splash";
	menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")));
	$(window).scroll(function () { 
			offset = menuYloc+$(document).scrollTop()+"px";
			if ($(document).scrollTop() < 209){
				offset= "209px";
				$(name).animate({top:offset},{duration:500,queue:false});
			}else{
				if ($.browser.mozilla) {
					offset = (menuYloc+10)+$(document).scrollTop()+"px";
					$(name).animate({top:offset},{duration:500,queue:false});
				}else{
					offset = (menuYloc-170)+$(document).scrollTop()+"px";
					$(name).animate({top:offset},{duration:500,queue:false});
				};
			};
	});	
	
	k = ($(window).width()/2) - (parseInt(parseFloat($("#splash").css("width"))))/2 + "px";
	$("#splash").animate({left:k},{duration:500,queue:false});
	menuXloc = parseInt($(name).css("left").substring(0,$(name).css("left").indexOf("px")));
	$(window).scroll(function () { 
			if ($(document).scrollLeft() == 0){
				offsetx = ($(window).width()/2) - (parseInt(parseFloat($("#splash").css("width"))))/2 + "px";
				$(name).animate({left:offsetx},{duration:500,queue:false});
			}else{
					offsetx = ($(window).width()/2) - (parseInt(parseFloat($("#splash").css("width"))))/2 +$(document).scrollLeft() +"px";
				$(name).animate({left:offsetx},{duration:500,queue:false});
			};
	});
		
//	$("#splash").draggable();
	$('#splash').draggable({ handle: '#agenda-splash-title' });
		
	$(window).bind('resize', function() {
		k = ($(window).width()/2) - (parseInt(parseFloat($("#splash").css("width"))))/2 + "px";
		$("#splash").animate({left:k},{duration:500,queue:false});
	});
	
//	$('#seyahat-mask .seyahat-info:first').css("width", "465px");
//	$('.accordion h5 + div:first').slideDown();
	accordionID();
	accordionID2();
	
	/*$('.style-selectbox').selectbox();*/
	$('.style-selectbox').selectbox({onchange: function(inVal){selectOnChange(this.name,inVal);}});
	
//	if ($("#city-acc")){
//		cityguidefirstload(15);
//	};
//	if ($("#hiphot-acc")){
//		cityguidefirstload(20);
//	};

	ajandaHeightfix();	

	if ($get("specialid") != "") {
		specialid = $get("specialid");
		PageUrl = "/plugins/pc/" + specialid;
		$('#specialGalleryLoad').html("");
		$.ajax({
			url			: PageUrl, 
			cache		: true,
			dataType	: "html",
			success		: function(html){
				$('#specialGalleryLoad').html(html);
				$("#special-absolute-bg").slideDown();
				$("#special-absolute").animate({
					width: 882
				}, 500);
			}
		});
		return false;
	};
	
	if ($get("agendaid") != "") {
		agenda_id = $get("agendaid");
		if ($("#splash").css("display") == "none"){
			$.ajax({
				url			: '/web/8-14/?agendaid=' + $get("agendaid"), 
				type: 'POST',
				cache		: true,
				dataType	: "html",
				data: {XSSID:'',inType:'agenda-detail',agendaid:agenda_id},
				success		: function(html){
					$('#splash').html(html);
					k = ($(window).width()/2) - (parseInt(parseFloat($("#splash").css("width"))))/2;
					$("#splash").animate({	
						left: k+"px"
					}, 500);
					$("#splash").fadeIn("slow");
				}
			});
		}else{
			$.ajax({
				url			: '/web/8-14/?agendaid=' + $get("agendaid"),
				type: 'POST',
				cache		: true,
				dataType	: "html",
				data: {XSSID:'',inType:'agenda-detail',agendaid:agenda_id},
				success		: function(html){
					$('#splash').html(html);
					k = ($(window).width()/2) - (parseInt(parseFloat($("#splash").css("width"))))/2;
					$("#splash").animate({	
						left: k+"px"
					}, 500);
					name = "#splash";
					offset = menuYloc+$(document).scrollTop()+"px";
					if ($.browser.mozilla) {
						offset = (10)+$(document).scrollTop()+"px";
						$(name).animate({top:offset},{duration:500,queue:false});
					}else{
						offset = (menuYloc-170)+$(document).scrollTop()+"px";
						$(name).animate({top:offset},{duration:500,queue:false});
					};
				}
			});
		}
	};
	
	
	if ($get("campid") != "") {
		camp_id = $get("campid");
		campaignLoader(camp_id);
	};
	
	$("#cty-inner h5 + div").css("padding", "10px 22px 15px 22px")
	$("#cty-inner h5:first").css("background-position", "0 100%");
	$("#cty-inner div[acc]:first").slideDown();
	
});

function OmnitureTrackSingleClick(pagename,eventname,eventdescription,obj){
	var s = s_gi('euromsgdev');
	OmnitureClearParams(s);
	s.linkTrackVars = 'eVar6,prop6,events';
	s.linkTrackEvents = eventname;
	s.prop6=pagename;
	s.eVar6=pagename;
	s.events = eventname;
	s.tl(this, 'o', 'web:' + eventdescription);
	OmnitureClearParams(s);
	window.location.href = obj.href;
	/*
	if (obj!=undefined)
	{
		if(obj.attributes['rel'] == undefined)
		{
			window.location.href = obj.href;
		}

		if(obj.attributes['rel'].nodeValue == 'external')
		{
				window.open(obj.href);
				return false;
		}
	}
	*/
}

function OmnitureClearParams(s){
	//empty omniture parameters
	for (i=1;i<50;i++){
		eval("s.eVar" + i + "=''");
		eval("s.prop" + i + "=''");	
	}
	s.pageName = '';
	s.channel = '';
	s.events = '';
	s.prop6 = '';
	s.campaign = '';
}
