 $(document).ready(function(){
 
 	function myokfunc(){
	}

	//init colorpicker:
	//$.ColorPicker.init();
 
	$('.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.init();
   
   pageReloadBlock();
   
    $(".delivery_date").datepicker({ changeFirstDay: false, showOn: "both", buttonImage: "images/calendar.png", buttonImageOnly: true });

	$(".jCarouselLite").jCarouselLite({
	    auto: 1000,
	    visible: 5,
	    speed: 2000
	});

/*
    $("*", document.body).mousemove(function (e) {
      var offset = $(this).offset();
      e.stopPropagation();
      ttXpos = offset.left;
      ttYpos = offset.top;
    });
    */
    /*
	$('*[title]').tooltip({ 
    	delay: 0, 
    	showURL: false
    });
	*/	
    $('#browser').html('Používáte <strong>' + $.browser.name + '</strong> ve verzi <strong>' + $.browser.version + '</strong> ' + $.os.name); 
 });
