

$(document).ready(function(){


	$("#menu-v1 ul").hide();
    $("#menu-v1 .active").show();
	$("#menu-v1 .active ul").show();    
    
    
    $("#select-menu a:eq(0)").click(function () {
    	$("#menu-v1 ul:eq(1)").hide();	
    	$("#menu-v1 ul:eq(0)").show();
    	$("#menu-v1 ul:eq(0) ul").show();
		$(this).addClass("active");
		$("#select-menu a:eq(1)").removeClass("active");
		return false;       
    });
    
    $("#select-menu a:eq(1)").click(function () {
    	$("#menu-v1 ul:eq(0)").hide();
		$("#menu-v1 ul:eq(1)").show();	
    	$("#menu-v1 ul:eq(1) ul").show();    	
		$(this).addClass("active");
		$("#select-menu a:eq(0)").removeClass("active"); 
		return false;        
    }); 
    

  });
  
  
// JavaScript Document
$(document).ready(function(){
	$(".box").hover(function(){
   $(this).addClass("box-hover");
 },function(){
   $(this).removeClass("box-hover");
 });
});  
  
  
// košík
$(document).ready(function(){	
	$(".cart-img").hover(
      function () {       
       var src =  $(this).siblings(".cart-hover").attr("href");	   
       $(this).load(src +" .detail-img");
       $(this).addClass("cart-img-hover");
      }, 
      function () {
    	$(".cart-img").empty();
	$(this).removeClass("cart-img-hover");
      }
    ); 
    
    //voucher
    $(".voucherTr2").hide();	
    $("#voucher_input").click(function () {
    		if ($(this).is(":checked")) 
				{$(".voucherTr2").show();}
       		else
       			{$(".voucherTr2").hide();}
        })
        
     // wrap input
	$("#quick_form table").addClass("cart-content");
	$("#quick_form input[type='text']").wrap("<div class='input'><span class='s2'></span></div>");	
	$("#quick_form .input").prepend("<span class='s1'></span>").append("<span class='s3'></span>");
	$("#quick_form table td:has(span.alert_form)").wrapInner("<div class='alert'></div>");
	$("#quick_form input[class='send_form']").wrap("<div class='cart-submit'><span class='s2'></span></div>");
	$("#quick_form .cart-submit").prepend("<span class='s1'></span>").append("<span class='s3'></span>").append("<span class='submit-text'>Souhrn a kontrola objednávky</span>");   
    $("#quick_form .header_form:eq(1)").html("<b><label><input type='checkbox' name='' />&nbsp;&nbsp;Fakturační adresa (zaškrtněte pouze v případě, že je fakturační adresa odlišná od dodací)</a></label></b>");  
	  
	    
    //skryvani fakturacni adresy
    $(".cart-content tr").slice(8,15).hide();
	$(".header_form input").click(function () {
			if ($(this).is(":checked")) 
				{$(".cart-content tr").slice(8,15).show();}
       		else
       			{$(".cart-content tr").slice(8,15).hide();}		
	  })  
	  
	$(".cart-content tr:last").addClass("white");  
});	



// stripované tabulky
$(document).ready(function(){
	$(".stripped tr:even").addClass("strippedRow2");
	$(".best-product tr:even").addClass("strippedRow3");
});
