document.write('<style>#attributes .radio input {display:none;}</style>');

$(window).ready(function() {
 $("#attributes .fieldset .radio label:not(.soldout)").click(function() {
	 findCombination();
 	$(this).parents(".fieldset").find("label:not(.soldout)").removeClass("active").removeClass('flir-replaced').removeAttr('cufid'); 	
 	
 	$("#attributes fieldset  .radio label:not(.soldout)").each( function() { 
 		$(this).html($(this).attr("title")); 		
 	});
 		
 	$(this).addClass("active");		 	 	 		  
    $("#attributes .fieldset  .radio label:not(.soldout)").each( function(){
    //FLIR.replace(this);
    	Cufon.replace(this, {hover: true });    
    	$(this).css({visibility:"visible"});
    });
    
    
 });
 
 $(".gallery-case img").click(function() {
		$("#next").click();
 })
 
 $("#attributes .radio label:not(.hover)").hover(
		  function() {
			  $(this).addClass("hover");		 	 	 
			  Cufon.replace(this, {hover: false }); 
			  },
			  function(){		     
		     $(this).removeClass("hover");		 	 	 
			 Cufon.replace(this, {hover: false });
})


 $(".doporucujeme .item").hover(
		  function() {
			  $(this).children('.item-text').addClass("hover").css({cursor:"pointer"});			  
			  },
			  function(){		     
		     $(this).children('.item-text').removeClass("hover");		 	 	 
			 })

$(".doporucujeme .item").click(function() {
	location.href=$(this).children("a").attr("href");
})

$(".payment_module").hover(
		  function() {
			  $(this).addClass("hover");		 	 	 
			  },
			  function(){		     
		     $(this).removeClass("hover");		 	 	 
}) 
 
 $(".tlacica,.home-lang a:not(.active) img").hover(
		  function() {
			var file_array = ($(this).attr("src")).split(".");
			var file_ext = file_array[file_array.length-1];
			var file = ($(this).attr("src")).replace("."+file_ext, "-hover."+file_ext);
			$(this).attr({src:file});			
		  },
		  function(){
			var file_array = ($(this).attr("src")).split(".");
			var file_ext = file_array[file_array.length-1];
			var file = ($(this).attr("src")).replace("-hover."+file_ext,"."+file_ext);
			$(this).attr({src:file});
		}) 
 
 
  $("div.detail-product .basket-form .submit").hover(
  function() {
  	$(this).addClass("submit-hover");
  },
  function(){
  	$(this).removeClass("submit-hover");
  }) 
  
  $(".submit").click(function() {  	 
  	$(this).children("input").click();
  })
  
  $("#iback").hover(
		  function() {
				var file_array = ($(this).children("img.layer").attr("src")).split(".");
				var file_ext = file_array[file_array.length-1];
				var file = ($(this).children("img.layer").attr("src")).replace("."+file_ext, "-hover."+file_ext);
				$(this).children("img.layer").attr({src:file});			
			  },
			  function(){
				var file_array = ($(this).children("img.layer").attr("src")).split(".");
				var file_ext = file_array[file_array.length-1];
				var file = ($(this).children("img.layer").attr("src")).replace("-hover."+file_ext,"."+file_ext);
				$(this).children("img.layer").attr({src:file});
			}) 
  
})