		$(document).ready(function() {
/*		
    $("img").lazyload({ 
    effect : "fadeIn",
    threshold : 0,
    failurelimit : 10
 
});
*/ 
		var COOKIE_NAME = 'zobrazeni';
		var COOKIE_NAME2 = 'zobrazenidva';
		var options = { path: '/', expires: 10 };
      $('#vsichni').click(function() {
                    $.cookie(COOKIE_NAME, 'vsichni', options);
                    $.cookie(COOKIE_NAME2, null);
                    $('#vyrobciseznam').hide('slow');
                    $('#obleceni').show('slow'); 
                    return false;
                });
      $('#avyrobci').click(function() {
                    $.cookie(COOKIE_NAME2, 'vyrobci', options);
                    $.cookie(COOKIE_NAME, null);
                    
                    $('#obleceni').hide('slow');
                    $('#vyrobciseznam').show('slow');
                    
                    return false;
                });
		


		$("table.produkt")
			.tablesorter({widthFixed: false})
		.tablesorterPager({container: $("#pagerTable")});
       
			$("#registrace").validationEngine({
				success :  false,
				failure : function() {}
			})
		$("#scroller").simplyScroll({
			speed: 5
		});
			
	var options = {
	    zoomWidth: 300,
	    zoomHeight: 253,
            xOffset: 10,
            yOffset: 0,
            position: "right" //and MORE OPTIONS
};
	$('.jqzoom').jqzoom(options);
  	
		});
		jQuery(function($){
			$("#u_ic").mask("99999999");
			$("#u_telefon").mask("+999 999 999 999");
			$("#d_ic").mask("99999999");
			$("#d_telefon").mask("+999 999 999 999");
		});

	function lookup(inputString) {
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#suggestions').hide();
		} else {
			$.post("/Pages/autocomplete.php", {queryString: ""+inputString+""}, function(data){
				if(data.length >0) {
					$('#suggestions').show();
					$('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup
	
	function fill(thisValue) {
		$('#hledam2').val(thisValue);
		setTimeout("$('#suggestions').hide();", 200);
	}
	function fake_load() {
  var cur_value = 1;
  var progress;
  // Make a loader.
  var loader = $.pnotify({
 pnotify_title: "Zboží bylo přidáno do košíku.",
 pnotify_text: "<div class=\"progress_bar\" />",
 pnotify_notice_icon: 'picon picon_16x16_throbber',
 pnotify_hide: false,
 pnotify_closer: false,
 pnotify_history: false,
 pnotify_before_open: function(pnotify){
 progress = pnotify.find("div.progress_bar");
 progress.progressbar({value: cur_value});
 // Pretend to do something.
 var timer = setInterval(function(){
 if (cur_value >= 100) {
 // Remove the interval.
 window.clearInterval(timer);
 loader.pnotify_remove();
 return;
 }
 //cur_value += Math.ceil(3 * ((100 - cur_value) / 100));
 cur_value += 1.6;
 progress.progressbar('option', 'value', cur_value);
 }, 2);
 }
 });
 }
