$(document).ready(function(){

	FLIR.init( { path: 'facelift/' } );

	$(".urun_cats .item").each( function() {
		//$(this).css("font-size","18px");
		//FLIR.replace( this , new FLIRStyle({ cFont:'myriad_cond' }) );
	});

	$(".header_menu .item").hover(

	function(){
		$(this).addClass("header_menu, active");
	},

	function(){
		$(this).removeClass("header_menu, active");
	}

	);

	$(".languages_menu .item").hover(
	function(){
		$(this).addClass("languages_menu, active");
	},

	function(){
		$(this).removeClass("languages_menu, active");
	}
	);

	$(".languages_menu .seperator:last").remove();

	$(".item div").hover(
	function(){

		var bp = $(this).css("background-position");
		var split = bp.split(" ");
		var bp_left = split[0];
		var bp_top = split[1];

		$(this).animate({backgroundPosition: bp_left+' -46px'},{duration:0});

	},
	function(){

		var bp = $(this).css("background-position");
		var split = bp.split(" ");
		var bp_left = split[0];
		var bp_top = split[1];
		$(this).animate({backgroundPosition: bp_left+' 0'},{duration:0});

	}
	);

	$(".tumurunler_button").hover(

	function(){
		$(this).addClass("tumurunler_button_hover");
	},
	function(){
		$(this).removeClass("tumurunler_button_hover");

	}
	);

	$(".yenilikler_block .items .item").hover(
	function(){
		$(this).addClass("item_hover");
	},
	function(){
		$(this).removeClass("item_hover");
	}
	);

	$(".yenilikler_block .items .item").click(function(){

		var id = $("div",this).html();
		//alert(id);
		$(".yenilikler_block .items .item").removeClass("item_active");
		$(this).addClass("item_active");
		$(".yenilikler_block .content").scrollTo($("#c"+id+""),450);
	});

	$(".yenilikler_block .items .item:first").addClass("item_active");

	$(".yeni_urunler_block .buttons .geri").click(function(){

		$(".yeni_urunler_block .items").scrollTo('-=74px',450);
	});

	$(".yeni_urunler_block .buttons .ileri").click(function(){

		$(".yeni_urunler_block .items").scrollTo('+=74px',450);
	});

	$(".yeni_urunler_block .items .item:last").css("border-bottom","none");
	$(".yeni_urunler_block .items .item:last").height(62);

	var yeni_urun_item_count = $(".yeni_urunler_block .items .item").size();

	if(yeni_urun_item_count<=2){
		$(".yeni_urunler_block .buttons").hide();
	}

	$(".yukodekoiletisim_block .gonders").click(function(){

		<!--$(this).addClass("gonder_click");-->
		form1.submit();
		
		
	});

	$(".bayimizolun_page_content .form .gonder").hover(
	function(){
		$(this).addClass("gonder_hover");
	},
	function(){
		$(this).removeClass("gonder_hover");
	});

	$(".yukodekoyaulasin_page_content .form .gonder").hover(
	function(){
		$(this).addClass("gonder_hover");
	},
	function(){
		$(this).removeClass("gonder_hover");
	});

	$(".yenilikler_table .items .item").hover(
	function(){
		$(this).addClass("hover");
	}
	,function(){
		$(this).removeClass("hover");

	});

	$(".yenilikler_table .items .item").click(function(){
		$(".yenilikler_table .items .item").removeClass("active");
		$(this).removeClass("hover");
		$(this).addClass("active");
		var id = $(this).attr("id");
		$(".yenilik_details_block").scrollTo($("#"+id+"c"),450);
	});

	$(".yenilikler_table .items .item:first").addClass("active");
	$(".yenilik_details_block").scrollTo($("#i1c"),450);

	$(".teknikyardimalin_page_content .teknikyardimalinconteigner .left .item").hover(
	function(){
		$(this).addClass("hover");
	}
	,function(){
		$(this).removeClass("hover");

	});

	$(".urunlerimizDetay_page_content .item_revious").hover(
	function(){
		$(this).addClass("item_revious_hover");
	},
	function(){
		$(this).removeClass("item_revious_hover");
	}
	);

	$(".urunlerimizDetay_page_content .item_next").hover(
	function(){
		$(this).addClass("item_next_hover");
	},
	function(){
		$(this).removeClass("item_next_hover");
	}
	);

	$(".urunlerimizDetay_page_content .item_revious").hover(
	function(){
		$(this).children(".c").show();
	},
	function(){
		$(this).children(".c").hide();
	}
	);

	$(".urunlerimizDetay_page_content .item_next").hover(
	function(){
		$(this).children(".c").show();
	},
	function(){
		$(this).children(".c").hide();
	}
	);

	$("#search_string").keyup(function(){

		var lenght = $(this).val().length;
		if(lenght>2){
			$.ajax({
				type: "POST",
				url: "search.php",
				data: "q="+$(this).val(),
				success: function(results){
					$(".search_results").html(results);
				}
			});
			$(".search_results_cont").show();
		}else{
			$(".search_results_cont").hide();
		}

	});

	hs.graphicsDir = 'highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.outlineType = 'rounded-white';
	hs.fadeInOut = true;
	hs.showCredits = false;
	hs.easing = 'easeInCirc';

});