var HOSTNAME=window.location.hostname,GALLERIA_THEME_PATH="/static/common/js/mylibs/GALLERIA/themes/classic/galleria.classic.min.js",PIE_PATH="/static/common/js/mylibs/PIE/PIE.js",LSRC="/static/liptonicetea/img/stages/fb_bg_lemon.png",PSRC="/static/liptonicetea/img/stages/fb_bg_peach.png",GLSRC="/static/liptonicetea/img/stages/fb_bg_greenlemon.png",GMSRC="/static/liptonicetea/img/stages/fb_bg_greenmango.png";if((HOSTNAME.split(".")).length>1){var GALLERIA_PAGE_PATH="/comunicazione/galleria",EDIT_PROFILE_PATH="/accounts/profile/edit/",EDIT_PASS_PATH="/accounts/cambia-password/",RECOVER_PASS_PATH="/accounts/recupera-password/"}else{var GALLERIA_PAGE_PATH="/templates/skel/galleria.html",EDIT_PROFILE_PATH="/templates/skel/edit_profilo.html",EDIT_PASS_PATH="/templates/skel/edit_pass.html",RECOVER_PASS_PATH="/templates/skel/recupera_pass.html"}var Lipton={init:function(settings){Lipton.vars={page:$("body").data("page"),flash:Lipton.flashCheck()};$.extend(Lipton.vars,settings);Lipton.setup()},setup:function(){Lipton.iebg();if(Lipton.vars.page==="index"){if(Lipton.vars.flash){$(".swf").css("background","transparent none no-repeat 0 0")}else{$("#flashContent").remove()}}if(Lipton.vars.page==="lemon"||Lipton.vars.page==="peach"||Lipton.vars.page==="greenlemon"||Lipton.vars.page==="greenmango"){Lipton.setupProducts()}if(Lipton.vars.page==="comunication"){var src=GALLERIA_PAGE_PATH,id="o3v6Rm1AT2o",width=462,height=260;$("#stage").click(function(){$.modal('<iframe src="'+src+'" height="563" width="762" style="border:0">',{containerCss:{backgroundColor:"gray",borderColor:"black",height:563,padding:0,width:762,overflow:"hidden"},overlayClose:true,close:true,minHeight:563,minWidth:762})})}if(Lipton.vars.page==="gallery"){Galleria.loadTheme(GALLERIA_THEME_PATH);$("#galleria").galleria({_toggleInfo:false,showInfo:false})}Lipton.fonts();if(Lipton.vars.page==="join the dance"){log("join the dance");Lipton.ajaxTokenSetup();Lipton.accordionSetup();Lipton.buttonGradientSetup();Lipton.animateToNav();var $segnaposto=$(".canvholder"),$form=$("form"),$video=$("section >ul.video-list"),$divCrown=$("div.crown"),$divHand=$("div.hand"),$canvasCrown=$("canvas.crown"),$canvasHand=$("canvas.hand"),$thumb=$(".video-thumbs"),$nav=$("nav.videos"),$profile=$(".content.profile"),$register=$(".content.register"),$filters=$("hgroup h3");if($segnaposto[0]!==undefined){Lipton.placeholderSetup($segnaposto)}if($form[0]!==undefined){Lipton.inputReset()}if($video[0]!==undefined){Lipton.nthHelper($video[0]);Lipton.videoNavHelper($nav);Lipton.crownSetupTemp($divCrown);Lipton.handSetupTemp($divHand)}if($thumb[0]!==undefined){var id=$("#jtd-clip").data("id"),width=538,height=303;Lipton.thumbNthHelper($thumb[0]);Lipton.videoNavHelper($nav);Lipton.overBluButton(".vote >a","Bold");Lipton.createTooltip($(".crown"));Lipton.createTooltip($(".hand"));Lipton.jwPlayer(id,width,height);Lipton.voteSetup()}if($profile[0]!==undefined){Lipton.accountPophover();Lipton.overBluButton("a.edit","Demi")}if($register[0]!==undefined){Lipton.registerPophover();Lipton.overBluButton("button","Demi")}if($filters[0]!==undefined){Lipton.filtriVideo($filters)}}},animateToNav:function(){log("animateToNav CALLED");$.scrollTo("530px",600)},voteSetup:function(){var $voteButton=$("#vote-button"),$voteMessage=$("#vote-message"),$ratingBox=$("#rating"),$judgmentBox=$("#judgment"),$votesBox=$("#votes"),pause=false;function PostMessage(msg){$container=$voteMessage;$voteMessage.empty();$voteMessage.append(msg);return false}function UpdateRatingAndVotes(){var increment=30,rating=parseInt($ratingBox.text())+increment,votes=parseInt($votesBox.attr("title").match(/\d+/))+increment;$ratingBox.fadeOut("fast").empty().append(rating).fadeIn("fast");$votesBox.fadeOut("fast").attr("title","voti: "+votes+" punti").fadeIn("fast");return false}function CastVoteHandler(e){e.preventDefault();var $this=$voteButton,resURL=$this.attr("href"),handler=arguments.callee;if(!pause){pause=true;$.ajax({type:"get",url:resURL,beforeSend:function(jqXHR,settings){PostMessage('<img src="/static/common/img/ajax-loader.gif" alt="" />')},success:function(data){if(data.level==25){UpdateRatingAndVotes()}PostMessage(data.message)},complete:function(jqXHR,textStatus){if(textStatus!="success"){PostMessage("Si e' verificato un errore di collegamento<br />riprovare piu' tardi!")}pause=false}})}}$voteButton.bind("click",CastVoteHandler)},jwPlayer:function(id,windowWidth,windowHeight){jwplayer("jtd-clip").setup({flashplayer:"/static/mediaplayer-5.6/player.swf",file:"http://www.youtube.com/watch?v="+id,skin:"/static/mediaplayer-5.6/skin/lipton_skin.zip",width:windowWidth,height:windowHeight,provider:"youtube",allowscriptaccess:"always",plugins:{gapro:{accountid:"UA-22554003-1"}},autostart:true})},overBluButton:function(el,weight){var $bottone=$(el),fWeight="KabelStd-"+weight;if(!$bottone.hasClass("disabled")){$bottone.hover(function(){Cufon.replace(this,{fontFamily:fWeight,textShadow:"#909090 1px 1px"});$(this).css("background-color","#4195cc")},function(){Cufon.replace(this,{fontFamily:fWeight});$(this).css("background-color","#3C85C2")})}},filtriVideo:function(el){el.each(function(){$(this).hover(function(){if(!$(this).hasClass("active")){Cufon.replace(this,{color:"#3c85c2",fontFamily:"KabelStd-Bold"});$(this).addClass("hover")}},function(){if(!$(this).hasClass("active")){Cufon.replace(this,{color:"#ee3124",fontFamily:"KabelStd-Bold"});$(this).removeClass("hover")}})})},registerPophover:function(){var recoverPass=RECOVER_PASS_PATH;$("aside p>a").click(function(e){e.preventDefault();$.modal('<iframe src="'+recoverPass+'" height="260" width="310" style="border:0">',{containerCss:{backgroundColor:"gray",borderColor:"black",height:260,padding:0,width:310,overflow:"hidden"},overlayClose:true,close:true,minHeight:260,minWidth:310})})},accountPophover:function(){var editProfile=EDIT_PROFILE_PATH,editPss=EDIT_PASS_PATH;$("#editprofile-button").click(function(e){e.preventDefault();$.modal('<iframe src="'+editProfile+'" height="510" width="310" style="border:0">',{containerCss:{backgroundColor:"gray",borderColor:"black",height:510,padding:0,width:310,overflow:"hidden"},overlayClose:true,close:true,minHeight:510,minWidth:310})});$("#editpassword-button").click(function(e){e.preventDefault();$.modal('<iframe src="'+editPss+'" height="330" width="310" style="border:0">',{containerCss:{backgroundColor:"gray",borderColor:"black",height:330,padding:0,width:310,overflow:"hidden"},overlayClose:true,close:true,minHeight:330,minWidth:310})})},videoNavHelper:function(el){if(bowser.msie&&bowser.version<9){el.remove();$("#join-the-dance").append(el)}Lipton.cufonHoverSupport(el)},cufonHoverSupport:function(el){el.delegate("a","hover",function(){if(!$(this).hasClass("disabled")){if(!$(this).hasClass("hover")){$(this).addClass("hover");Cufon.replace(this,{color:"#3c85c2",fontFamily:"KabelStd-Bold"})}else{$(this).removeClass("hover");Cufon.replace(this,{color:"#ee3124",fontFamily:"KabelStd-Bold"})}}})},cufonAjaxSupport:function(){$("#join-the-dance nav.videos a").each(function(){if(!$(this).hasClass("disabled")){if(!$(this).hasClass("hover")){Cufon.replace(this,{color:"#ee3124",fontFamily:"KabelStd-Bold"})}}else{Cufon.replace(this,{color:"#f69891",fontFamily:"KabelStd-Bold"})}})},updateFilters:function(){$filters=$("hgroup h3");$filters.each(function(){if(!$(this).hasClass("active")){Cufon.replace(this,{color:"#ee3124",fontFamily:"KabelStd-Bold"})}else{Cufon.replace(this,{color:"#3c85c2",fontFamily:"KabelStd-Bold"})}})},thumbNthHelper:function(container){var ul=$(container).find(".video-list");if(bowser.msie&&bowser.version<9){$(ul).find("li:nth-child(odd)").css("margin","0");$(ul).find("li:nth-child(3)").css({margin:"10px 0 10px",padding:"10px 0 10px","border-top":"1px solid #999999","border-bottom":"1px solid #999999"});$(ul).find("li:nth-child(4)").css({margin:"10px 0 10px 20px",padding:"10px 0 10px","border-top":"1px solid #999999","border-bottom":"1px solid #999999"})}},nthHelper:function(ul){if(bowser.msie&&bowser.version<9){$(ul).find("li:nth-child(4n+1)").css("margin","0 0 20px 0");$(ul).find("li:nth-child(n+5)").css("border-top","1px solid #999999");$(ul).find("li:nth-child(n+5) a").css("zoom","1")}},inputReset:function(){jQuery("input[type=text], textarea").focus(function(){if(jQuery(this).val()==jQuery(this).attr("defaultValue")){jQuery(this).val("")}});jQuery("input[type=text], textarea").blur(function(){if(jQuery(this).val()==""){jQuery(this).val(jQuery(this).attr("defaultValue"))}})},ajaxTokenSetup:function(){$(function(){$.ajaxSetup({beforeSend:function(xhr,settings){if(!(/^http:.*/.test(settings.url)||/^https:.*/.test(settings.url))){xhr.setRequestHeader("X-CSRFToken",$("#csrfmiddlewaretoken").val())}}})})},crownSetup:function(el){if(!bowser.msie){function init(canvas,color){var canvas=canvas;var ctx=canvas.getContext("2d");draw(ctx,color)}function draw(ctx,color){ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height);ctx.save();ctx.save();ctx.beginPath();ctx.moveTo(1.5,5.4);ctx.bezierCurveTo(4.6,0.2,11.4,-1.6,16.6,1.5);ctx.bezierCurveTo(21.8,4.6,23.6,11.4,20.5,16.6);ctx.bezierCurveTo(17.4,21.8,10.6,23.6,5.4,20.5);ctx.bezierCurveTo(0.2,17.4,-1.6,10.6,1.5,5.4);ctx.closePath();ctx.fillStyle=color;ctx.shadowOffsetX=0;ctx.shadowOffsetY=2;ctx.shadowBlur=2;ctx.shadowColor="rgba(102, 102, 102, 0.5)";ctx.fill();ctx.restore();ctx.beginPath();ctx.moveTo(18.2,6.7);ctx.bezierCurveTo(17.9,6.7,17.6,7,17.6,7.3);ctx.bezierCurveTo(17.6,7.5,17.7,7.7,17.8,7.8);ctx.lineTo(14.6,11.8);ctx.lineTo(11,8);ctx.bezierCurveTo(11.4,8,11.7,7.7,11.7,7.3);ctx.bezierCurveTo(11.7,7,11.4,6.7,11,6.7);ctx.bezierCurveTo(10.7,6.7,10.4,7,10.4,7.3);ctx.bezierCurveTo(10.4,7.7,10.6,8,11,8);ctx.lineTo(7.4,11.8);ctx.lineTo(4.2,7.8);ctx.bezierCurveTo(4.4,7.7,4.5,7.5,4.5,7.3);ctx.bezierCurveTo(4.5,7,4.2,6.7,3.8,6.7);ctx.bezierCurveTo(3.5,6.7,3.2,7,3.2,7.3);ctx.bezierCurveTo(3.2,7.7,3.5,8,3.8,8);ctx.bezierCurveTo(3.9,8,3.9,8,3.9,8);ctx.lineTo(5,15.8);ctx.lineTo(11,16);ctx.lineTo(17,15.8);ctx.lineTo(18.1,8);ctx.bezierCurveTo(18.2,8,18.2,8,18.2,8);ctx.bezierCurveTo(18.6,8,18.9,7.7,18.9,7.3);ctx.bezierCurveTo(18.9,7,18.6,6.7,18.2,6.7);ctx.closePath();ctx.fillStyle="rgb(255, 255, 255)";ctx.fill();ctx.lineWidth=0.5;ctx.strokeStyle="rgb(255, 255, 255)";ctx.stroke();ctx.beginPath();ctx.moveTo(5,17.4);ctx.lineTo(17,17.4);ctx.lineTo(17,16.8);ctx.lineTo(5,16.8);ctx.lineTo(5,17.4);ctx.closePath();ctx.fill();ctx.beginPath();ctx.moveTo(2.6,7.3);ctx.bezierCurveTo(2.6,6.7,3.2,6.1,3.8,6.1);ctx.bezierCurveTo(4.5,6.1,5,6.7,5,7.3);ctx.bezierCurveTo(5,8,4.5,8.5,3.8,8.5);ctx.bezierCurveTo(3.2,8.5,2.6,8,2.6,7.3);ctx.closePath();ctx.fill();ctx.beginPath();ctx.moveTo(9.8,7.3);ctx.bezierCurveTo(9.8,6.7,10.4,6.1,11,6.1);ctx.bezierCurveTo(11.7,6.1,12.2,6.7,12.2,7.3);ctx.bezierCurveTo(12.2,8,11.7,8.5,11,8.5);ctx.bezierCurveTo(10.4,8.5,9.8,8,9.8,7.3);ctx.closePath();ctx.fill();ctx.beginPath();ctx.moveTo(17,7.3);ctx.bezierCurveTo(17,6.7,17.5,6.1,18.2,6.1);ctx.bezierCurveTo(18.9,6.1,19.4,6.7,19.4,7.3);ctx.bezierCurveTo(19.4,8,18.9,8.5,18.2,8.5);ctx.bezierCurveTo(17.5,8.5,17,8,17,7.3);ctx.closePath();ctx.fill();ctx.restore()}for(i=0,len=el.length;i<len;i++){init(el[i],"#3c85c2");$(el[i]).hover(function(){init(this,"#4195cc")},function(){init(this,"#3c85c2")})}}else{for(i=0,len=el.length;i<len;i++){}}Lipton.createTooltip(el)},createTooltip:function(el){$(el).live("mouseover",function(event){$(this).qtip({overwrite:false,content:{attr:"title"},position:{my:"top center",at:"bottom center",adjust:{x:-1}},style:{tip:{border:1,height:4},classes:"ui-tooltip-rounded ui-tooltip-shadow  ui-tooltip-Lipton"},show:{event:event.type,ready:true,solo:true},hide:{fixed:true}},event)}).each(function(i){$.attr(this,"oldtitle",$.attr(this,"title"));this.removeAttribute("title")})},handSetup:function(el){if(!bowser.msie){function init(canvas,color){var canvas=canvas;var ctx=canvas.getContext("2d");draw(ctx,color)}function draw(ctx,color){ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height);ctx.save();ctx.beginPath();ctx.moveTo(1.5,5.4);ctx.bezierCurveTo(4.6,0.2,11.4,-1.6,16.6,1.5);ctx.bezierCurveTo(21.8,4.6,23.6,11.4,20.5,16.6);ctx.bezierCurveTo(17.4,21.8,10.6,23.6,5.4,20.5);ctx.bezierCurveTo(0.2,17.4,-1.6,10.6,1.5,5.4);ctx.closePath();ctx.fillStyle=color;ctx.shadowOffsetX=0;ctx.shadowOffsetY=2;ctx.shadowBlur=2;ctx.shadowColor="rgba(102, 102, 102, 0.5)";ctx.fill();ctx.beginPath();ctx.moveTo(4,15.2);ctx.lineTo(6.3,15.2);ctx.lineTo(6.3,9);ctx.lineTo(4,9);ctx.lineTo(4,15.2);ctx.closePath();ctx.fillStyle="rgb(255, 255, 255)";ctx.fill();ctx.beginPath();ctx.moveTo(13.1,12.5);ctx.bezierCurveTo(13,12.5,12.8,12.4,12.8,12.2);ctx.bezierCurveTo(12.8,12,13,11.9,13.1,11.9);ctx.lineTo(17.9,11.9);ctx.bezierCurveTo(18,11.4,18,11,18,10.4);ctx.lineTo(13.2,10.4);ctx.bezierCurveTo(13,10.4,12.9,10.3,12.9,10.2);ctx.bezierCurveTo(12.8,10.2,12.8,10.1,12.8,10.1);ctx.bezierCurveTo(12.8,9.9,13,9.7,13.1,9.7);ctx.lineTo(18,9.7);ctx.bezierCurveTo(18,9.5,17.9,9.3,17.9,9);ctx.bezierCurveTo(17.7,7.5,16.6,7.6,16.6,7.6);ctx.lineTo(13,7.6);ctx.lineTo(13,4.2);ctx.bezierCurveTo(13,3.2,12.3,3.2,12.3,3.2);ctx.bezierCurveTo(10.7,3.2,10.2,6.9,10.2,6.9);ctx.bezierCurveTo(9.9,9.3,8.3,9,8.3,9);ctx.lineTo(7.1,9);ctx.lineTo(7.1,15.2);ctx.lineTo(8,15.2);ctx.bezierCurveTo(9.9,15.2,10.6,16,10.6,16);ctx.bezierCurveTo(11.4,16.6,12.5,16.4,12.5,16.4);ctx.lineTo(16.3,16.4);ctx.bezierCurveTo(16.4,16.4,16.5,16.4,16.6,16.4);ctx.bezierCurveTo(16.9,16.1,17.3,15.5,17.6,14.6);ctx.lineTo(13.2,14.6);ctx.bezierCurveTo(13.1,14.6,13.1,14.6,13.1,14.6);ctx.lineTo(13.1,14.6);ctx.bezierCurveTo(13,14.6,12.8,14.4,12.8,14.2);ctx.bezierCurveTo(12.8,14,13,13.9,13.1,13.9);ctx.lineTo(17.7,13.9);ctx.bezierCurveTo(17.8,13.5,17.8,13,17.9,12.5);ctx.lineTo(13.1,12.5);ctx.closePath();ctx.fill();ctx.restore()}for(i=0,len=el.length;i<len;i++){init(el[i],"#3c85c2");$(el[i]).hover(function(){init(this,"#4195cc")},function(){init(this,"#3c85c2")})}}else{for(i=0,len=el.length;i<len;i++){}}Lipton.createTooltip(el)},crownSetupTemp:function(el){Lipton.createTooltip(el)},handSetupTemp:function(el){Lipton.createTooltip(el)},placeholderSetup:function(el){if(!bowser.msie&&bowser.version<9){function init(canvas){var canvas=canvas;var ctx=canvas.getContext("2d");draw(ctx)}function draw(ctx){var gradient;ctx.save();ctx.save();ctx.beginPath();ctx.moveTo(32.9,28.6);ctx.lineTo(32.9,28.6);ctx.bezierCurveTo(34.8,25.6,36,22.1,36,18.3);ctx.bezierCurveTo(36,8.2,27.9,0,18,0);ctx.bezierCurveTo(8.1,0,0,8.2,0,18.3);ctx.bezierCurveTo(0,22.1,1.2,25.6,3.1,28.6);ctx.lineTo(3.1,28.6);ctx.lineTo(3.1,28.6);ctx.bezierCurveTo(3.5,29.2,4,29.8,4.5,30.3);ctx.lineTo(18,48);ctx.lineTo(31.5,30.3);ctx.bezierCurveTo(32,29.8,32.5,29.2,32.9,28.6);ctx.lineTo(32.9,28.6);ctx.closePath();gradient=ctx.createLinearGradient(18,0,18,48);gradient.addColorStop(0,"#e2001a");gradient.addColorStop(0.5,"#d7001a");gradient.addColorStop(1,"#ab001a");ctx.fillStyle=gradient;ctx.shadowOffsetX=0;ctx.shadowOffsetY=2;ctx.shadowBlur=2;ctx.shadowColor="rgba(102, 102, 102, 0.5)";ctx.fill();ctx.beginPath();ctx.moveTo(12.4,17.5);ctx.bezierCurveTo(12.4,14.4,14.9,11.8,18,11.8);ctx.bezierCurveTo(21.1,11.8,23.6,14.4,23.6,17.5);ctx.bezierCurveTo(23.6,20.7,21.1,23.2,18,23.2);ctx.bezierCurveTo(14.9,23.2,12.4,20.7,12.4,17.5);ctx.closePath();ctx.fillStyle="rgb(255, 255, 255)";ctx.fill();ctx.restore();ctx.restore()}for(i=0,len=el.length;i<len;i++){init(el[i])}}else{$(".tour li:nth-child(odd)").css("background-color","#f6f6f6");for(i=0,len=el.length;i<len;i++){$(el[i]).parent("li").prepend('<div class="location-arrow ir">location arrow</div>');$(el[i]).remove()}}},buttonGradientSetup:function(){var $all=$("#join-the-dance header nav a, #join-the-dance a.tour, #join-the-dance a.join"),$pdf=$("#join-the-dance .rule a");Cufon.replace($all,{fontFamily:"KabelStd-Bold"});Cufon.replace($pdf,{fontFamily:"KabelStd-Bold"});$all.hover(function(){if($(this).hasClass("active")){Cufon.replace(this,{fontFamily:"KabelStd-Bold"})}else{Cufon.replace(this,{fontFamily:"KabelStd-Bold",textShadow:"0px 2px rgba(0, 0, 0, 0.6)"})}},function(){if(!$(this).hasClass("ui-state-active")){Cufon.replace(this,{fontFamily:"KabelStd-Bold"})}});$pdf.hover(function(){Cufon.replace(this,{fontFamily:"KabelStd-Bold",color:"white"})},function(){if(!$(this).hasClass("ui-state-active")){Cufon.replace(this,{color:"red",fontFamily:"KabelStd-Bold"})}})},accordionSetup:function(){var $howToPlay=$("#accordion");$howToPlay.accordion();var $all=$howToPlay.find("h4"),$active=$all.filter(".ui-state-active");$normal=$all.filter(function(index){return $(this).hasClass("ui-state-active")===false});Cufon.replace($normal,{fontFamily:"KabelStd-Bold"});Cufon.replace($active,{fontFamily:"KabelStd-Bold",textShadow:"0px 2px rgba(0, 0, 0, 0.6)"});$all.hover(function(){Cufon.replace(this,{fontFamily:"KabelStd-Bold",textShadow:"0px 2px rgba(0, 0, 0, 0.6)"})},function(){if(!$(this).hasClass("ui-state-active")){Cufon.replace(this,{fontFamily:"KabelStd-Bold"})}});$all.click(function(e){e.preventDefault();Cufon.replace(this,{fontFamily:"KabelStd-Bold",textShadow:"0px 2px rgba(0, 0, 0, 0.6)"});Cufon.replace($active,{fontFamily:"KabelStd-Bold"});$active=this})},setupProducts:function(){var src=$("#flashContent").data("swf");if(!Lipton.vars.flash){$(".fallbackflash").css("display","block");Lipton.swfBg()}else{var flashvars={};var params={};var attributes={};swfobject.embedSWF(src,"flashContent","960","394","9.0.0",false,flashvars,params,attributes)}},flashCheck:function(){if(swfobject.getFlashPlayerVersion().release===0){return false}else{return true}},swfBg:function(){var $stage=$("#main div.swf"),lemonsrc=LSRC,peachsrc=PSRC,greenlemonsrc=GLSRC,greenmangosrc=GMSRC;switch(Lipton.vars.page){case"lemon":src=lemonsrc;break;case"peach":src=peachsrc;break;case"greenlemon":src=greenlemonsrc;break;case"greenmango":src=greenmangosrc;break;default:src=""}$stage.css("background","url("+src+") no-repeat scroll 0 0 transparent");Lipton.canvasArrow()},canvasArrow:function(){if(!bowser.msie&&bowser.version<9){Lipton.canvasMenu("Clemon","rgb(253,251,0)");Lipton.canvasMenu("Cpeach","rgb(244,191,0)");Lipton.canvasMenu("Cgreenlemon","rgb(255,237,0)");Lipton.canvasMenu("Cgreenmango","rgb(248,184,100)")}else{var array=[$("#product-nav li:nth-child(1)"),$("#product-nav li:nth-child(2)"),$("#product-nav li:nth-child(3)"),$("#product-nav li:nth-child(4)")];array[0].css("top","0");array[1].css("top","49px");array[2].css("top","98px");array[3].css("top","147px");$("#product-nav li a > canvas").css({display:"none",height:0,width:0});var lemonArrow=$("<div class='arrow ir'>Freccia limone</div>"),peachArrow=$("<div class='arrow ir'>Freccia pesca</div>"),glemonArrow=$("<div class='arrow ir'>Freccia green limone</div>"),gmangoArrow=$("<div class='arrow ir'>Freccia green mango</div>");array[0].find("a").append(lemonArrow);array[1].find("a").append(peachArrow);array[2].find("a").append(glemonArrow);array[3].find("a").append(gmangoArrow);$(array).each(function(index,element){if(!element.hasClass("active")){$(element).hover(function(){var li=$(this),span=$($(this).find("span"));li.animate({width:"164px"},200);span.animate({width:"130px"},200)},function(){var li=$(this),span=$($(this).find("span"));li.animate({width:"124px"},200);span.animate({width:"90px"},200)})}})}},canvasMenu:function(el,color){var freccia=document.getElementById(el);var ctx=freccia.getContext("2d");ctx.beginPath();ctx.fillStyle=color;ctx.lineTo(0,2);ctx.lineTo(16,24);ctx.lineTo(0,46);ctx.fill();ctx.beginPath();ctx.fillStyle="rgb(255,255,255)";ctx.moveTo(0,0);ctx.lineTo(2,0);ctx.lineTo(18,24);ctx.lineTo(2,48);ctx.lineTo(0,48);ctx.lineTo(0,46);ctx.lineTo(16,24);ctx.lineTo(0,2);ctx.lineTo(0,0);ctx.fill();ctx.beginPath();ctx.globalCompositeOperation="destination-over";ctx.shadowOffsetX=4;ctx.shadowOffsetY=9;ctx.shadowBlur=0;ctx.shadowColor="rgba(102, 102, 102, 0.5)";ctx.moveTo(0,0);ctx.lineTo(2,0);ctx.lineTo(18,24);ctx.lineTo(2,48);ctx.lineTo(0,48);ctx.lineTo(0,0);ctx.fill()},fonts:function(){Cufon.replace("nav span.replace",{fontFamily:"KabelStd-Bold"});Cufon.replace("nav span.normal",{fontFamily:"KabelStd-Medium"});Cufon.replace("#main div.tc section h3",{fontFamily:"KabelStd-Bold"});Cufon.replace("#product-nav b",{fontFamily:"KabelStd-Bold",textShadow:"#333 1px 1px"});Cufon.replace("#main div.col h4",{fontFamily:"KabelStd-Bold",textShadow:"#333 1px 1px"});Cufon.replace("#main header h4",{fontFamily:"KabelStd-Bold",textShadow:"#333 1px 1px"});Cufon.replace("#main div.col p",{fontFamily:"KabelStd-Demi"});Cufon.replace("#main div.col dt",{fontFamily:"KabelStd-Demi"});Cufon.replace("#main div.col dd",{fontFamily:"KabelStd-Medium"});Cufon.replace("#main .nutritional-infos ul",{fontFamily:"KabelStd-Demi"});Cufon.replace(".world-of-tea div h4",{fontFamily:"KabelStd-Bold",textShadow:"#333 1px 1px"});Cufon.replace(".world-of-tea p",{fontFamily:"KabelStd-Medium",color:"#0B66B3"});Cufon.replace(".text p",{fontFamily:"KabelStd-Medium"});Cufon.replace(".social p",{fontFamily:"KabelStd-Medium"});Cufon.replace(".contacts p",{fontFamily:"KabelStd-Medium"});Cufon.replace(".info p strong",{fontFamily:"KabelStd-Bold"});Cufon.replace(".form-field label",{fontFamily:"KabelStd-Medium"});Cufon.replace(".contacts h4",{fontFamily:"KabelStd-Demi",textShadow:"#909090 1px 1px"});Cufon.replace("#main .contacts form button",{fontFamily:"KabelStd-Demi",textShadow:"#909090 1px 1px"});Cufon.replace("#join-the-dance nav a.active",{fontFamily:"KabelStd-Bold",textShadow:"0px 2px rgba(0, 0, 0, 0.6)"});Cufon.replace("#join-the-dance div.content h3",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance section h4",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance nav.videos a",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance .register aside h4",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance .profile aside h4",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance .profile em",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance .profile b",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance .profile section a",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance aside li span",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance aside a.edit",{fontFamily:"KabelStd-Demi"});Cufon.replace("#join-the-dance .content section > p",{fontFamily:"KabelStd-Medium"});Cufon.replace("#join-the-dance .content .trip p",{fontFamily:"KabelStd-Medium"});Cufon.replace("#join-the-dance .content section > p strong",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance .content aside p",{fontFamily:"KabelStd-Medium"});Cufon.replace("#join-the-dance li div.details span",{fontFamily:"KabelStd-Medium"});Cufon.replace("#join-the-dance time",{fontFamily:"KabelStd-Medium"});Cufon.replace("#join-the-dance li div.points strong",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance .video-list em",{fontFamily:"KabelStd-Bold"});Cufon.replace(".form-row .privacy label",{fontFamily:"KabelStd-Medium"});Cufon.replace("#join-the-dance figcaption li",{fontFamily:"KabelStd-Medium"});Cufon.replace("#join-the-dance figcaption li strong",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance .days",{fontFamily:"KabelStd-Bold"});Cufon.replace("#join-the-dance .place, #join-the-dance .adress",{fontFamily:"KabelStd-Medium"});Cufon.replace("#join-the-dance .shares p",{fontFamily:"KabelStd-Medium"});Cufon.replace(".edit-profilo h6",{fontFamily:"KabelStd-Bold"});Cufon.replace(".edit-profilo p",{fontFamily:"KabelStd-Medium"});Cufon.replace("#join-the-dance form button",{fontFamily:"KabelStd-Demi"});Cufon.replace(".video-detail time",{fontFamily:"KabelStd-Medium"});Cufon.replace(".video-detail span",{fontFamily:"KabelStd-Medium"});Cufon.replace(".shares h6",{fontFamily:"KabelStd-Bold"});Cufon.replace(".vote >a",{fontFamily:"KabelStd-Bold"});Cufon.replace(".vote span",{fontFamily:"KabelStd-Medium"});Cufon.replace(".score small",{fontFamily:"KabelStd-Medium"});Cufon.replace("footer h5",{fontFamily:"KabelStd-Demi"});Cufon.replace("footer a",{fontFamily:"KabelStd-Medium"});Cufon.replace(".legal-info",{fontFamily:"KabelStd-Medium"});Cufon.replace(".custom h3",{fontFamily:"KabelStd-Bold"});Cufon.replace(".custom h4",{fontFamily:"KabelStd-Bold"});Cufon.replace(".custom p",{fontFamily:"KabelStd-Medium"});Cufon.now()},iebg:function(){yepnope({test:Modernizr.multiplebgs,nope:[PIE_PATH]})}};$(Lipton.init);
