$(document).ready(function () {
	
	//acordeon
	$('LI.acordeon DIV:not(:first)').hide();
	$('LI.acordeon DIV:first').addClass('open');
	$('H2.acordeon-handle').click(function () {
		$('LI.acordeon DIV:visible').hide("slow");
		$('H2.open').removeClass('open');
		$(this).next().show("slow");
		$(this).addClass('open');
	});
	
	//lazyload
	$(".imagenProducto").lazyload({ 
    	placeholder : "images/ajax-loader.gif",
    	effect : "fadeIn" 
	});
	
	//tooltip
	$('.tooltipText').tooltip({
	    showURL: false,
	    delay: 0,
	    track: true
	});
	$('.tooltipImg').tooltip({
	    showURL: false,
	    delay: 0,
	    track: true,
	    bodyHandler: function() {
	    	//tooltipText recoge el atributo title de la imagen original
	    	return $("<img/>").attr("src", this.tooltipText);
	    }
	});

});