$(document).ready(function(){
	$("#icon-op img[title]").tooltip({ 
	
		predelay: 100,
		// tweak the position
		position: "top center",
		offset: [1, 0]
});
	
		$("#icon-op1 img").tooltip({
		// each trashcan image works as a trigger
		tip: '#mitooltip1',
		// custom positioning
		position: 'bottom left',
		// move tooltip a little bit to the right
		offset: [5, 10],
		// there is no delay when the mouse is moved away from the trigger
		delay: 0
	});
	
		$("#icon-op2 ").tooltip({
		// each trashcan image works as a trigger
		tip: '#mitooltip2',
		predelay: 400,
		effect: 'slide',

	// custom opacity setting
		opacity: 1,

		// custom positioning
		position: 'bottom rigth',
		// move tooltip a little bit to the right
		offset: [45, -410],
		// there is no delay when the mouse is moved away from the trigger
		delay: 0
	});
	
	
	
	
	
	
	$("img[rel]").overlay(); //box1, box2
	
	$("a[rel]").overlay({
	
		
		loadSpeed: 'fast',
		onBeforeLoad: function() {
			// grab wrapper element inside content
			var wrap = this.getOverlay().find(".contentWrap");
			// load the page specified in the trigger
			wrap.load(this.getTrigger().attr("href"));
		}

	});


// initialize validator and add a custom form submission logic
	$(".destacar").click(function() {

		// perform exposing for the clicked element
		$(this).expose();

	});

});


/* TIMER jquery.countdown.js */
$(function () {
	var austDay = new Date();
	austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26);
	$('#defaultCountdown').countdown({until: austDay, format: 'yowdHMS'});
	
	
	
/* VALIDAR FORMULAIO */


	
	
	/* CARGAR MAS 
	function last_msg_funtion() 
		{ 
		   
           var ID=$(".producto-items:last").attr("id");
		   var IDT=$(".producto-items-idt:last").attr("idt");
			$('div#last_msg_loader').html('sebas <img src="bigLoader.gif">');
			$.post("tienda.php?action=get&last_msg_id="+ID+"&idt="+IDT,
			
			function(data){
				if (data != "") {
				$(".producto-items:last").after(data);			
				}
				$('div#last_msg_loader').empty();
			});
		};  
		
		/*$(window).scroll(function(){
			if  ($(window).scrollTop() == $(document).height() - $(window).height()){
			   last_msg_funtion();
			}
		});*/ 
		/*
		$('#carga').click(function(){
		  last_msg_funtion();
		});
	*/
	
	// perform JavaScript after the document is scriptable.
	$(function() {
		// setup ul.tabs to work as tabs for each div directly under div.panes
		$("ul.tabs").tabs("div.panes > div");
	});
	
	
	
	
	$(".slidetabs").tabs(".images > div", {

	// enable "cross-fading" effect
	effect: 'fade',
	fadeInSpeed: "fast",
	fadeOutSpeed: "fast",

	// start from the beginning after the last tab
	rotate: true

// use the slideshow plugin. It accepts its own configuration
	}).slideshow();
	
	
	
	
	
	
	

	
	
	
});




