/*...........................................    

   General funciotns

...........................................*/	

jQuery.fn.toggleText = function(a, b) {
	return this.each(function() {
		jQuery(this).text(jQuery(this).text() == a ? b : a);
	});
};


jQuery.fn.equalHeights=function() {
	var maxHeight=0;
	this.each(function(){
		if (this.offsetHeight>maxHeight) {maxHeight=this.offsetHeight;}
	});
	this.each(function(){
		$(this).height(maxHeight + "px");
		if (this.offsetHeight>maxHeight) {
			$(this).height((maxHeight-(this.offsetHeight-maxHeight))+"px");
		}
	});
};


$(document).ready(function(){
	
	$(".accessori").css({'float':'left'});
	
 	$(document).pngFix(); 
	
	$(".on").parent().show();
	
	$(".stripe").fadeTo(0, 0.7);
	
	/*$('.avviso').cycle({ 
    	fx:    'fade', 
    	speed:  2500,
		timeout:  8000 
 	});*/
	
	$('.gallHome').cycle({ 
    	fx:    'fade', 
    	speed:  2500,
		timeout:  8000 
 	});
	
	$('.thickbox').click(function(){ 
	$(window).scrollTop(0);
	});

	
	 $(".biblioteca").tablesorter();
	
/*...........................................    

   Structure

...........................................*/


//$(".menuleft,.accessories").equalHeights();


/*...........................................    

   Q&A

...........................................*/

$(".answer").hide();
$(".question").css("cursor","pointer").click(function(){
	$(this).next('.answer').slideToggle();
});

	
	
});



