function checkNumber(element)
{
  if (element.value > 0 && element.value < 100)
   {
     return true;
   }
  else
   {
     element.value = 0;
     return false;
   } 
}

/* jQuery is ready ...
-------------------------------------- */
$(function(){
    
/*   
$("#switcher .menu li a").click(function(){
    
    var href = $(this).attr("href");
    $("#tab1, #tab2").addClass("nod");
    
    $(href).removeClass("nod");
    
    $("#switcher .menu li a").removeClass("active");
    $(this).addClass("active");

    return false;

});

*/
   
   
   
$(".tabber li a").click(function(e){

    e.preventDefault();

    var tabCont = $(this).closest('.tab-cont');

    tabCont.find(".tabber a.active").removeClass("active");
    $(this).addClass("active");

    var url = this.href.replace(/.+#/, '');

    tabCont.find(".tab").hide();
    tabCont.find("#" + url).show();
    
    return false;
});

// po spusteni
$(".tab-cont").each(function(index, element){
    if($(this).find(".tabber li a.active").length){
        $(this).find(".tabber li a.active:first").click();
    }else{
        $(this).find(".tabber li a:first").click();
    }
});

   
    
    
});

 

function addToBasket(btn) {

    var form = $(btn).closest('form');
    //form.find('[name="action[eshop]"]').val('addToBasket');
    var $link = $(form).attr('action');
    $.ajax({
        url: $link,
        data: $(form).serialize(),
        type: 'GET',
        success: function(data) {
           $('#jquery-basket').html(data);
        alert('Zboží přidáno do košíku!'); }
    });
    
}



