   function init_promo(){
    $('#promoAction').hide();
    $('.promoButton').click(function(e) {
        e.preventDefault();
        name = $(this).attr('name');
        path=url +"inc/ajax/apromo.php?promo="+name;
      //  alert(path);
        getData(path,"promoAction");
        document.getElementById("promoAction").display = "block";
        $('#promoAction').modal({
            close:false,
            onClose: $.modal.close()
         });
    });
    }
    
    function set_pager_url(){
 if ($('#actual_page').val()) {
 
    var href = document.location.href.replace(/#.*$/, '');
    href = href + "#" + $('#actual_page').val();
  //  alert(href);
    document.location.replace(href);
	}
	}
    
	/*function pageloadHis(hash) {
		if(hash) {	pager(hash); } else {	pager(1); }		
	}*/

 $(document).ready(function(){
 /*	if ($('#actual_page').val()) {
		$.history.init(pageloadHis);
    $.history.load(document.location.hash.replace(/^.*#/, ''));
	}*/
	 if ($('#actual_page').val()) {
	set_pager_url();
  var hash = document.location.hash.replace(/^.*#/, '');
 //alert(hash);
  if(hash) {	pager(hash); }
  }
	
	
 	function myokfunc(){}

    init_promo();
	$('.sendToFriend').click(function (e) {
		e.preventDefault();
		// load the contact form using ajax
		$.get(url + "inc/sendfriend.php?product="+window.location, function(data){
			// create a modal dialog with the data
			$(data).modal({
				close: false,
				overlayId: 'contact-overlay',
				containerId: 'contact-container',
				onOpen: contact.open,
				onShow: contact.show,
				onClose: contact.close
			});
		});
	});
			 	 
	$('.availability').click(function (e) {
		e.preventDefault();
		// load the contact form using ajax
		var code = $('.kod').html();
		codeElems = code.split(':');
		$.get(url + "inc/ajax/checkAvailability.php?product="+window.location+'&code='+codeElems[1], function(data){
			// create a modal dialog with the data
			$(data).modal({
				close: false,
				overlayId: 'contact-overlay',
				containerId: 'contact-container',
				onOpen: availability.open,
				onShow: availability.show,
				onClose: availability.close
			});
		});
	});
				 	 
   animatedcollapse.addDiv('menuCont', 'fade=0');
   animatedcollapse.addDiv('schranka', 'fade=0');
   animatedcollapse.addDiv('basketId', 'fade=0');
   animatedcollapse.addDiv('infoBox', 'fade=0');
   animatedcollapse.addDiv('log', 'fade=0');
   animatedcollapse.addDiv('glossatyList', 'fade=0');
   animatedcollapse.addDiv('ANKETA', 'fade=0');
   animatedcollapse.addDiv('NEWS', 'fade=0');
   animatedcollapse.addDiv('NEWSL', 'fade=0');
   animatedcollapse.addDiv('quickContact', 'fade=0');
   animatedcollapse.addDiv('productHistory', 'fade=0');
   animatedcollapse.addDiv('currencyCalc', 'fade=0');
   animatedcollapse.addDiv('categoryHistory', 'fade=0');
   animatedcollapse.addDiv('actionProducts', 'fade=0');
   animatedcollapse.addDiv('newProducts', 'fade=0');
   animatedcollapse.addDiv('monitoredProducts', 'fade=0');
   animatedcollapse.addDiv('mostWantedProducts', 'fade=0');
   animatedcollapse.addDiv('recommendProducts', 'fade=0');
   animatedcollapse.addDiv('saleProducts', 'fade=0');
   animatedcollapse.addDiv('specSearch', 'fade=0');   	   	
   animatedcollapse.addDiv('catDownl', 'fade=0');   	    	
   animatedcollapse.addDiv('pay', 'fade=0');   	    	    	
   animatedcollapse.addDiv('tagClouds', 'fade=0');    	    	
   animatedcollapse.addDiv('menuDes', 'fade=0');   	
   //animatedcollapse.addDiv('detInfobox', 'fade=0');   	  	  
   //animatedcollapse.addDiv('detTechnology', 'fade=0'); 
   //animatedcollapse.addDiv('plashRocket', 'fade=0'); 
   animatedcollapse.init();
   pageReloadBlock();

    $(".delivery_date").datepicker({ changeFirstDay: false, showOn: "both", buttonImage: "images/calendar.png", buttonImageOnly: true, onSelect: function (input, date) { changeDeliveryDate(input, date); }});

	$(".jCarouselLite").jCarouselLite({
	    auto: 1000,
	    visible: 5,
	    speed: 2000
	});
	
	
	var unique = $('input.unique1');
  unique.click(function() {
    unique.removeAttr('checked');
    $(this).attr('checked', true);
});


  	var unique2 = $('input.unique2');
  unique2.click(function() {
    unique2.removeAttr('checked');
    $(this).attr('checked', true);
});


	var unique3 = $('input.unique3');
  unique3.click(function() {
    unique3.removeAttr('checked');
    $(this).attr('checked', true);
});

	var unique4 = $('input.unique4');
  unique4.click(function() {
  unique4.removeAttr('checked');
  $(this).attr('checked', true);
});
	
	
	
    $('#browser').html('Používáte <strong>' + $.browser.name + '</strong> ve verzi <strong>' + $.browser.version + '</strong> ' + $.os.name); 
 });

