jQuery(function(){
    jQuery('a[href*=#]').click(function() {
        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
        && location.hostname == this.hostname) {
            var target = jQuery(this.hash);
            target = target.length && target
            || jQuery('[name=' + this.hash.slice(1) +']');
            if (target.length) {
                var targetOffset = target.offset().top;
                jQuery('html,body')
                .animate({scrollTop: targetOffset}, 1000);
                return false;
            }
        }
    });
});

/************************************************************************************************************/
jQuery(function(){
	
jQuery('.tabs').tabs({
		fx: { opacity: 'toggle', duration:200 },
		cookie: {
			expires: 1
		}
	});

	jQuery('.tabs .prodotto_preview').each(function(){
		jQuery(this).tabs({
			fx: { opacity: 'toggle', duration:200 },
			cookie: {
				expires: 1
			},
			select: function(event, ui) { 
				jQuery( '.ui-state-default a', this ).animate({'opacity':1},0);
				jQuery( ui.tab ).animate({'opacity':.5});
			}
		});
		jQuery('.ui-state-active a',this).animate({'opacity':.5},0);
	});

	jQuery('.tabs .scheda_tecnica').each(function(){
		jQuery('tr:odd td',this).css({'background-color':'#ddd'});

		jQuery(this).tabs({
			fx: { opacity: 'toggle', duration:200 },
			cookie: {
				expires: 1
			}
		});
	});
});
/************************************************************************************************************/
jQuery(function() {
    jQuery('input[type=text]').not('.noDefault').addClass('onBlur');
    jQuery('textarea').not('.noDefault').addClass('onBlur');
	jQuery('input[type=text]').not('.noDefault').focus(function() {
		jQuery(this).removeClass('onBlur');
        if (this.value == this.defaultValue){
        	this.value = '';
    	}
        if(this.value != this.defaultValue){
	    	this.select();
        }
    });
    jQuery('input[type=text]').not('.noDefault').blur(function() {
        if (this.value == ''){
			jQuery(this).addClass('onBlur');
        	this.value = (this.defaultValue ? this.defaultValue : '');
    	}
    });
	jQuery('textarea').not('.noDefault').focus(function() {
		jQuery(this).removeClass('onBlur');
        if (this.value == this.defaultValue){
        	this.value = '';
    	}
        if(this.value != this.defaultValue){
	    	this.select();
        }
    });
    jQuery('textarea').not('.noDefault').blur(function() {
        if (this.value == ''){
			jQuery(this).addClass('onBlur');
        	this.value = (this.defaultValue ? this.defaultValue : '');
    	}
    });
    jQuery('#password_clear').show();
    jQuery('#pwd').hide();
    
    jQuery('#password_clear').focus(function() {
        jQuery('#password_clear').hide();
        jQuery('#pwd').show();
        jQuery('#pwd').focus();
        jQuery('#password_clear').blur();
    });
    jQuery('#pwd').blur(function() {
        if(jQuery('#pwd').val() == '') {
            jQuery('#password_clear').show();
            jQuery('#pwd').hide();
        }
    });
});

/************************************************************************************************************/
jQuery(function() {
    if(jQuery('#shop_on_online').length>0){
		var w = jQuery('#shop_on_online').width()+20;
		jQuery('#shop_on_online').css('background-position',w+'px 24px');
    }
});

/******************************************************
*
*	Full page slideshow
*
******************************************************/
jQuery.fn.espresslide = function(opts) {
	
	var defaults = {
		navElem			: null,
		navCont			: 'li',
        controlsCont	: null,
		prev			: null,
		next			: null,
		play			: null,
		pause			: null,
		thumbs			: false,
        credits			: null,
		time			: 7000,    //lunghezza della transizione
		fadeperiod		: 700    //lunghezza della transizione
    };
	
	
	var opts = jQuery.extend({}, defaults, opts);
	
	var h = jQuery(window).height();    //altezza della pagina
	var w = jQuery(window).width();    //larghezza della pagina
	
	var elem = this;    //elemento trigger
	
if(elem.length!=0){
	jQuery('body').prepend(elem);
	
	var allSrc = new Array();    //creo l'array vuoto
	var amountSlide = elem.find('a').length;    //il numero di immagine della slideshow
	
	elem.find('a').each(function() {    //lo riempio con gli 'a' contenuti nell'elemento selezionato
		allSrc.push(jQuery(this));
	});
	var nav;
    if(amountSlide > 1) {
        jQuery(opts.navElem).wrap('<div id="navgallery_wrap" />');
    }
	jQuery(opts.navElem).parent().hide();
	jQuery(opts.controlsCont).hide();
	jQuery(opts.credits).hide();

	jQuery.each(allSrc, function(index, value) { 
		if(opts.thumbs==true){
			jQuery(opts.navElem).append('<'+opts.navCont+' id="espress'+opts.navCont+'_'+index+'" class="espress'+opts.navCont+'" style="overflow:hidden; position:relative"><img src="'+allSrc[index].attr('data-thumb')+'"></li>');
		} else {
			jQuery(opts.navElem).append('<'+opts.navCont+' id="espress'+opts.navCont+'_'+index+'" class="espress'+opts.navCont+'">'+(index+1)+'</li>');
		}
		jQuery('.espress'+opts.navCont).hover(function(){
			jQuery(this).addClass('espresshover');
		},function(){
			jQuery(this).removeClass('espresshover');
		});
	});
		jQuery('.espress'+opts.navCont).click(function(){
			if(!jQuery(opts.navElem).hasClass('espressliding')){
				var idNum = parseFloat(jQuery(this).attr('id').replace('espress'+opts.navCont+'_','')); 
				var vis = parseFloat(jQuery('.espr_block:visible').attr('id').replace('espr_block_',''));    //la variabile è il numero del div partendo da 0
				if(idNum!=vis){
					clearInterval(set);
					nextSlide(idNum+1);
				}
			}
		});

		jQuery(opts.prev).click(function(){
			if(!jQuery(opts.navElem).hasClass('espressliding')){
				var idNum = parseFloat(jQuery('.espresscurrent').attr('id').replace('espress'+opts.navCont+'_','')); 
				var lastNum = parseFloat(jQuery('.espress'+opts.navCont+':last').attr('id').replace('espress'+opts.navCont+'_','')); 
				if(idNum!=0){
					clearInterval(set);
					nextSlide(idNum);
				} else {
 					clearInterval(set);
					nextSlide(lastNum+1);
               }
			}
		});

		jQuery(opts.next).click(function(){
			if(!jQuery(opts.navElem).hasClass('espressliding')){
				var idNum = parseFloat(jQuery('.espresscurrent').attr('id').replace('espress'+opts.navCont+'_','')); 
				var lastNum = parseFloat(jQuery('.espress'+opts.navCont+':last').attr('id').replace('espress'+opts.navCont+'_','')); 
				if(idNum==lastNum){
					clearInterval(set);
					nextSlide(1);
				} else {
 					clearInterval(set);
					nextSlide(idNum+2);
               }
			}
		});

        jQuery(opts.play).hide();
		jQuery(opts.play).click(function(){
			if(!jQuery(opts.navElem).hasClass('espressliding')){
				nextSlide();
                jQuery(this).fadeOut(100,function(){
                	jQuery(opts.pause).fadeIn(200);
                }); 
			}
		});

		jQuery(opts.pause).click(function(){
			if(!jQuery(opts.navElem).hasClass('espressliding')){
				clearInterval(set); 
                jQuery(this).fadeOut(100,function(){
                	jQuery(opts.play).fadeIn(200);
                }); 
			}
		});

    nextSlide();    //faccio partire l'effetto
	jQuery(window).one('load',function(){
		jQuery(opts.navElem).parent().fadeIn('slow');
		jQuery(opts.controlsCont).fadeIn('slow');
		jQuery(opts.credits).fadeIn('slow');
        jQuery('#scrollCommands').animate({'opacity':1},600);
	});
	if(amountSlide>1){
        var set = setInterval(function() { nextSlide(); }, opts.time);    //faccio partire l'effetto
    }
	
}




    var lTh = amountSlide*(34+5+2); //larghezza immagine, margine e bordo
    jQuery(opts.navElem).width(lTh);
    

/*************************** FUNZIONE la larghezza del CONTENITORE THUMB ***************************/

    jQuery(opts.navElem).parent().before('<div id="scrollCommands" />');
    jQuery(opts.navElem).parent().prev('#scrollCommands').prepend('<span id="pix_scrollRight">&lt;</span><br>').append('<span id="pix_scrollLeft">&gt;</span>').animate({'opacity':0},0);
	function resizeThumbCont(){    //funzione per il resize del contenitore thumb
        if(opts.navElem!=null){
            var cBlW = jQuery('#credits_blog').width();
            if(amountSlide > 1) {
                var mL = parseFloat(jQuery('#navgallery_wrap').css('margin-left').replace('px',''));
                var scCom = jQuery('#scrollCommands').width();
                var conW = jQuery('#pix_controls').width();
                var ipW = w-(cBlW+conW+mL+conW+20+40);
                if(ipW < lTh) {
                    jQuery('#navgallery_wrap').width(ipW);
                    jQuery('#scrollCommands').show();
                } else {
                    jQuery('#navgallery_wrap').width(lTh);
                    jQuery('#scrollCommands').hide();
                }
            }
            
        }
        
    }

    resizeThumbCont();
    
    jQuery(window).bind('load resize',function(){ 
    	resizeThumbCont();
    });



/*************************** FUNZIONE per lo SCROLL delle THUMB ***************************/
	
        
	function scrollThumb(){    //funzione per lo scroll delle thumb
        var navWrapW = parseFloat(jQuery(opts.navElem).parent().width()); //larghezza del contenitore della UL
        if(opts.navElem!=null && lTh > navWrapW && scrolling == false){
            var pos = jQuery('.espresscurrent').position();
            var navPos = jQuery(opts.navElem).position();
            if ((pos.left+34+5+navPos.left) > navWrapW && (pos.left+5+navPos.left) > 0) {	//34 la larghezza della thumb, 5 il margine sinistro
                jQuery(opts.navElem).animate({'left':'-'+((pos.left+34+5)-navWrapW)},300);
            } else if ((pos.left+5+navPos.left) < 0) {
                jQuery(opts.navElem).animate({'left':'-'+(pos.left+5)},300);
            }
        }
    }
    var scrolling = false;

    jQuery(function(){ 
        jQuery('#pix_scrollLeft').mousedown(function(){
            scrolling = true;
            startScrolling(jQuery(opts.navElem), '-=2px');
        }).mouseup(function(){
            scrolling = false;
        });
        jQuery('#pix_scrollRight').mousedown(function(){
            scrolling = true;
            startScrolling2(jQuery(opts.navElem), '+=2px');
        }).mouseup(function(){
            scrolling = false;
        });
    });
    
    function startScrolling(obj, param)
    {
        var navWrapW = parseFloat(jQuery(opts.navElem).parent().width()); //larghezza del contenitore della UL
        var navW = jQuery(opts.navElem).width();
        var navPos = jQuery(opts.navElem).position();
         if (scrolling && (navW+navPos.left) > navWrapW)
        {
           obj.animate({'left': param}, 1, function(){
                startScrolling(obj, param);
            });
        }
    }
    function startScrolling2(obj, param)
    {
        var navPos = jQuery(opts.navElem).position();
        if (scrolling && navPos.left < 0)
        {
            obj.animate({'left': param}, 1, function(){
                startScrolling2(obj, param);
            });
        }

    }
    jQuery(window).resize(function(){
    	jQuery(opts.navElem).animate({'left':'0'},300);
    });
    



/*************************** FUNZIONE nextSlide() ***************************/

	function nextSlide(nav){    //funzione per il fading delle immagini
		if(jQuery('.espr_block:visible').length!=0){    //se ho creato almeno un div con un'immagine
			var vis = parseFloat(jQuery('.espr_block:visible').attr('id').replace('espr_block_',''));    //la variabile è il numero del div partendo da 0
		} else {
			var vis = 'undefined';
		}
		if(nav>0){    //se siamo all'ultimo div o se ancora non ho creato nessun div
			var i = nav-1;
		} else if (vis == amountSlide-1 || vis=='undefined') { 
			var i = 0;
		} else {    //altrimenti l'indice è l'id corrent più uno, quindi il div successivo
			var i = vis+1;
		}
		if(jQuery('#espr_block_'+i).length==0){    //se ancora non esiste il div con quell'id
			elem.append('<div class="espr_block" id="espr_block_'+i+'"><img src="'+allSrc[i].attr('href')+'" data-content="'+allSrc[i].attr('data-content')+'"></div>');    //creo il div e gli appendo l'immagine
		}
		jQuery('#espr_block_'+i).css({    //imposto i css per i contenitori di immagini
			'display':'none',
			'height':h,
			'left':0,
			'overflow':'hidden',
			'position':'absolute',
			'top':0,
			'width':w+20,
			'z-index':'-1'
		});
		var img2 = jQuery('#espr_block_'+i).find('img');    //cerco l'immagine all'interno del div corrente
		jQuery(opts.navElem).addClass('espressliding');
        
		if(img2.parents('.espr_block').hasClass('espr_loaded')){    //se l'immagine è già stata caricata
            jQuery('#espr_block_'+(vis)).css({'z-index':'-2'});    //il div visibile viene portato a z-index 1, quindi sotto
            jQuery('#espr_block_'+i).fadeIn(opts.fadeperiod,function(){    //imposto il timeout che mi fa apparire il div successivo
                if(jQuery('.espr_block').length!=0){    //se esiste almeno un div, quindi la slide non parte ora per la prima volta
                    jQuery('#espr_block_'+(vis)).css({'display':'none'});    //nascondo il div corrente
                }
                clearInterval(set);
                jQuery(opts.navElem).removeClass('espressliding');
                set = setInterval(function() { nextSlide(); }, opts.time);    //faccio ripartire l'effetto
            });    //chiudo il timeout

		} else {
			img2.load(function(){    //la prima volta che carica l'immagine all'interno del div
				if((jQuery.browser.msie)) {
					jQuery('#espr_block_'+i).css({    //imposto i css per i contenitori di immagini solo per IE perché altrimenti non becca la grandezza delle immagini
						'display':'block',
						'visibility':'hidden'
					});
				}
				var hI = img2.attr('height')-20;
				var wI = img2.attr('width')-20;
				if((wI/hI)<(w/h)) {
					var r = w / wI;
					var d = (Math.abs(h - (hI*r)))*0.5;
						img2.css({
							'height' : hI*r+20,
							'margin-left' : '0',
							'margin-top' : '-'+d+'px',
							'position' : 'absolute',
							'width' : w+20
						});
				}
				else {
					var r = h / hI;
					var d = (Math.abs(w - (wI*r)))*0.5;
						img2.css({
							'height' : h+20,
							'margin-left' : '-'+d+'px',
							'margin-top' : '0',
							'position' : 'absolute',
							'width' : wI*r+20
						});
				}
				if((jQuery.browser.msie)) {
					jQuery('#espr_block_'+i).css({    //imposto i css per i contenitori di immagini solo per IE perché altrimenti non becca la grandezza delle immagini
						'display':'none',
						'visibility':'visible'
					});
				}
				jQuery('#espr_block_'+(vis)).css({'z-index':'-2'});    //il div visibile viene portato a z-index 1, quindi sotto
				jQuery('#espr_block_'+i).fadeIn(opts.fadeperiod,function(){    //imposto il timeout che mi fa apparire il div successivo
					if(jQuery('.espr_block').length!=0){    //se esiste almeno un div, quindi la slide non parte ora per la prima volta
						jQuery('#espr_block_'+(vis)).css({'display':'none'});    //nascondo il div corrente
					}
                    if(amountSlide>1){
                        clearInterval(set);
                        jQuery(opts.navElem).removeClass('espressliding');
                        set = setInterval(function() { nextSlide(); }, opts.time);    //faccio ripartire l'effetto
                    }
				}).addClass('espr_loaded');    //chiudo il timeout
			});
		}
            var the_content = jQuery('img, #espr_block_'+i).attr('data-content');
            jQuery(opts.credits).html(img2.attr('data-content'));
			jQuery('.espress'+opts.navCont).removeClass('espresscurrent');
			jQuery('#espress'+opts.navCont+'_'+i).addClass('espresscurrent');
            
            
	
            scrollThumb();
            resizeThumbCont();
            
            jQuery(opts.play).fadeOut(100,function(){
                jQuery(opts.pause).fadeIn(200);
            }); 

    }




/*************************** FUNZIONE per il RESIZE ***************************/

	jQuery(window).bind('load resize',function(){
		h = jQuery(window).height();    //altezza della pagina
		w = jQuery(window).width()+20;    //larghezza della pagina
		jQuery('.espr_block, .pix_overlay_pattern').css({    //imposto i css per i contenitori di immagini
			'height':h,
			'width':w
		});
		jQuery('.espr_block').find('img').each(function(){
			var img2 = jQuery(this);
			var hI = img2.attr('height');
			var wI = img2.attr('width');
			if((wI/hI)<(w/h)) {
				var r = w / wI;
				var d = (Math.abs(h - (hI*r)))*0.5;
				img2.css({
					'height' : hI*r,
					'margin-left' : '0',
					'margin-top' : '-'+d+'px',
					'position' : 'absolute',
					'width' : w
				});
			}
			else {
				var r = h / hI;
				var d = (Math.abs(w - (wI*r)))*0.5;
				img2.css({
					'height' : h,
					'margin-left' : '-'+d+'px',
					'margin-top' : '0',
					'position' : 'absolute',
					'width' : wI*r
				});
			}
		});
        
        
	});



}


jQuery(function(){
	if(jQuery('.pix_slide').length!=0){
        jQuery('.pix_slide').espresslide();
    }
});

/************************************************************************************************************/
 jQuery(function(){
	jQuery('nav > ul').not('.not_fish').superfish({ 
		speed: 200,
		delay: 500,
		autoArrows: false ,
		onBeforeShow:  function(){
			/* Cufon.refresh(); */
		},
		onShow:  function(){
			/* Cufon.refresh(); */
		},
		onHide:  function(){
			/* Cufon.refresh(); */
		}
	});
	/*jQuery('#shop_on_online').superfish({ 
		speed: 200,
		delay: 500,
		autoArrows: false ,
		onBeforeShow:  function(){
			Cufon.refresh();
		},
		onShow:  function(){
			Cufon.refresh();
		},
		onHide:  function(){
			Cufon.refresh();
		}
	});*/
});

/************************************************************************************************************/
jQuery(function(){
	jQuery('.columns').columnize();
});

/************************************************************************************************************/
function overElemento(){
	jQuery('.elemento').each(function(){
		var t = jQuery(this);
		var o = jQuery('.over_box',t);
		var im = jQuery('img',t);
		o.animate({'opacity':0},0);
		if(jQuery('.jqzoom',t).length == 0) {
			jQuery('.over_box, img',t).hover(function(){
				/* im.stop(true,false).animate({'opacity':0.1},400); */
				t.stop(true,false).addClass('elementwhite');
				o.stop(true,false).animate({'opacity':1},400);
			},function(){
				t.stop(true,false).removeClass('elementwhite');
				/* im.stop(true,false).animate({'opacity':1},400); */
				o.stop(true,false).animate({'opacity':0},400);
			});
		}
	});
}

jQuery(function(){
	overElemento();
});

/************************************************************************************************************/
jQuery(function(){
	if(jQuery('div.sort').length!=0){
        var
            speed = 400,
            wall;
            wall = jQuery('.sort');
        
				
		var w = jQuery(window).width();
		if(w > 1000){
			w2 = w-250;
		} else {
			w2 = 1000 - 250;
		}
		jQuery('.sort').css({'width':w2})
		
		jQuery(window).resize(function(){
			var w = jQuery(window).width();
			if(w > 1000){
				w2 = w-250;
			} else {
				w2 = 1000 - 250;
			}
			jQuery('.sort').css({'width':w2})
		});
	

        wall.imagesLoaded(function(){
            wall.isotope({
                masonry : {
                    columnWidth : '10'
                },
                itemSelector : '.elemento',
                layoutMode : 'masonry',
                animationEngine : 'jquery',
                animationOptions: {
					duration: 400,
					easing: 'linear',
					queue: false
               }
            });
			/* Cufon.refresh(); */
        });

        var allClass = '.elemento';
		var dataUrl = wall.attr('data-url');
		var the_difference=0;
    
        jQuery('.sort_menu a').click(function(){
            colorClass = '.' + jQuery(this).attr('data-filter');
            var selector = jQuery(this).attr('data-filter');
            wall.isotope({ filter: selector });
            setTimeout(function(){
                var newH = jQuery('.isoFilter').height();
                jQuery('article').css({'height':(newH+the_difference)});
                var hs = 0;
                if(jQuery('article').length!=0){
                    hs = jQuery('article').height();
                }   
                articleAsideOpen(hs, ha);
                jQuery(window).resize();
            }, speed);
			if ( !jQuery(this).hasClass('active') ) {
				jQuery(this).parents('.sort_menu').find('.active').removeClass('active');
				jQuery(this).addClass('active');
				/* Cufon.refresh(); */
			}
            return false;
        });
        
        wall.infinitescroll({
            navSelector  : '.more_infinite:last a',
            nextSelector : '.more_infinite:last a',
            itemSelector : '.elemento:not(.invis)',
            loadingImg : dataUrl+'/images/loader.gif',
            loadingText : 'Sto caricando...',
            donetext  : 'Non ci sono articoli da caricare',
            debug: false,
            errorCallback: function() { 
                jQuery('#infscr-loading').animate({opacity: .8},2000).fadeOut('normal'); 
            }
        },
            function( newElements ) {
                wall.isotope( 'appended', jQuery( newElements ), 
                	function(){
						/* Cufon.refresh(); */
						overElemento();
						var thisClass = jQuery('.sort_menu a.active').attr('data-filter');
						if(thisClass!='.elemento') {
							jQuery('.sort_menu a[data-filter="'+thisClass+'"]').click();
						}
					}
				);
            }
        );
        
        
        jQuery(window).unbind('.infscr');
        
        jQuery('.more_infinite a').click(function(){
			
                jQuery(document).trigger('retrieve.infscr');            
            
            return false;
    
        });
        jQuery(document).ajaxError(function(e,xhr,opt){
            if (xhr.status == 404) {
                jQuery('.more_infinite').remove();
            }
        });
	}
});

/************************************************************************************************************/
jQuery(window).one('load',function(){
	jQuery('.jqzoom').each(function(){
		var t = jQuery(this);
		var h = jQuery('img',t).height();
		var w = jQuery('img',t).width();
		t.css({'width':w,'height':h});
		var off = ((330-w)*0.5);
		var off2 = ((330-h)*0.5);
		t.jqzoom({
			zoomType: 'standard',
			lens:true,
			preloadImages: false,
			xOffset: 6,
			yOffset: 'auto',
			zoomWidth: 355,
			zoomHeight: 328
		});
		jQuery('.zoomWindow',t).css({'top':'-'+off2+'px'});
	});
});
/************************************************************************************************************/
jQuery(function(){
	jQuery(".star_rating").jRating({
		type:'big', // type of the rate.. can be set to 'small' or 'big'
		length : 5, // nb of stars
		decimalLength : 1, // number of decimal in the rate
		rateMax: 5
	});
});

/************************************************************************************************************/
jQuery(function(){
	if(jQuery('.prodotto_info').length!=0){
		jQuery(".prodotto_info table").each(function(){
			jQuery('td:even',this).css({'text-align':'right','width':'100%'});
		});
	}
});

/************************************************************************************************************/
jQuery(window).one('load',function(){
	if(jQuery('.offerta').length!=0){
		var w = jQuery('.offerta').width();
		var h = jQuery('.offerta').height();
		var paper = Raphael(jQuery('.offerta')[0], w, h);
		var c = paper.path('m0,0L'+w+','+h).attr({
			"stroke-width": 3,
			stroke: "#f56e0b"
		});
	}
});

/************************************************************************************************************/
jQuery(window).one('load',function(){
	if(jQuery('#metti_carrello').length!=0){
		jQuery('#metti_carrello').each(function(){
			var t = jQuery(this);
			jQuery('a',t).click(function(){
				jQuery('input[type=submit]',t).click();
				return false;
			});
		});
	}
});

/************************************************************************************************************/
jQuery(function(){
		var s;
		function seThide(){
			jQuery('#all_categories').fadeOut(300);
			jQuery('#shop_on_online').removeClass('hover');
		}
		function seTout(){
			s = setTimeout(seThide,1000);
		}
		jQuery('#shop_on_online, #all_categories').hoverIntent({
			over: function(){
				clearTimeout(s);
				jQuery('#all_categories').fadeIn(300);
				jQuery('#shop_on_online').addClass('hover');
			},
			out: seTout
		});
});

/************************************************************************************************************/
jQuery(function(){
	jQuery('#inline_example1 > ul').easyListSplitter({ 
		colNumber: 3
	});
});


/************************************************************************************************************/
$(document).ready(function(){
			//Examples of how to assign the ColorBox event to elements

			$('#infoButton').bind('click', function() {
			  $('#presentazione').addClass('ui-tabs-hide');
			  $('#scheda_tecnica').addClass('ui-tabs-hide');
			  $('#info').removeClass('ui-tabs-hide');
			  $('.information').addClass('ui-tabs-selected ui-state-active');
			  $('.scheda').removeClass('ui-tabs-selected ui-state-active');
			  $('.pres').removeClass('ui-tabs-selected ui-state-active');
			 $('html, body').animate({scrollTop: $(document).height()}, 'slow');
			});

		});

/************************************************************************************************************/
jQuery(function(){
	jQuery('#table_big_carrello tr:odd').find('td').css({'background-color':'#eee'});
	//jQuery('#table_big_carrello tr:odd').find('a').css({'color':'#e07f0d'});
});
	
