var hdp=function(){var a={init:function(){hdp.Format.initTextClasses();hdp.signUp.init();hdp.validate.init();hdp.toolTips.init();hdp.tracking.init();hdp.GlobalNavigation.init();hdp.selectList.init("hdp-share-list",true);hdp.selectList.init("hdp-country-list",false);hdp.externalLinks.init();hdp.signUp.showSignUpPanelIfAppropriate();hdp.createGraphicalButtons();hdp.layout.init();jQuery(".select").selectbox()},config:{locale:null,language:null,trackingName:null,getShortLocaleString:function(b){b=b||hdp.config.locale;return b.split("-")[0]}},tracking:{init:function(){jQuery("ul.hdp-footer-links a").click(function(b){hdp.tracking.trackEvent("/#[locale]# - Footer","Link - "+this.href)});jQuery("a.a2a_dd").click(function(){})},trackPageview:function(b){if(pageTracker){pageTracker._trackPageview(b)}},trackEvent:function(g,f,e,b){if(pageTracker){g=g.replace(/#\[locale\]#/,this.locale()).replace(/#{locale}#/,this.locale());g=g.replace(/#\[trackingName\]#/,this.trackingName());pageTracker._trackEvent(g,f,e,b)}},linkByPost:function(b){if(pageTracker){pageTracker._linkByPost(b)}},link:function(b){if(pageTracker){pageTracker._link(b)}},locale:function(){return hdp.config.locale?hdp.config.locale:"[LOCALE NOT SET]"},trackingName:function(){return hdp.config.trackingName||"[TRACKING NAME NOT SET]"}},sharing:{fullyLoaded:false,tabSwitchingFunction:null,easing:"easeOutQuart",scrollSpeed:7500,absoluteTop:0,init:function(j){var o=(("https:"==document.location.protocol)?"https://":"http://")+"api.heineken.com/WebResource/v1/Share.ashx";var b=document.title;var g=location.href;var n=1;var i=0;var e=5000;var k=["faves","facebook","myspace","twitter","bebo","digg","netlog","delicious","wordpress","technorati_favorites","yahoo_bookmarks","blogger_post"];var l=[];var f="004f22";var h="000000";var p="ffffff";var m="ffffff";j=(j&&typeof j=="object")?j:{};a2a_linkname=(j.linkName)?j.linkName:b;a2a_linkurl=(j.linkUrl)?j.linkUrl:g;a2a_track_links="a2a";a2a_onclick=(j.linkClick)?j.linkClick:n;a2a_show_title=(j.showTitle)?j.showTitle:i;a2a_num_services=(j.numServices)?j.numServices:e;a2a_prioritize=(j.prioritize)?j.prioritize:k;a2a_custom_services=(j.customServices)?j.customServices:l;a2a_color_main=(j.colorMain)?j.colorMain:f;a2a_color_border=(j.colorBorder)?j.colorBorder:h;a2a_color_link_text=(j.colorLinkText)?j.colorLinkText:p;a2a_color_link_text_hover=(j.colorLinkTextHover)?j.colorLinkTextHover:m;a2a_color_bg="000000";a2a_hide_embeds=(j.hideEmbeds)?j.hideEmbeds:(!navigator.userAgent.match("MSIE"))?1:0;a2a_localize=(j.localize)?j.localize:{};if(jQuery("#a2aPage").length===0){jQuery("body").append('<script type="text/javascript" id="a2aPage" src="'+o+'"></script>')}hdp.sharing.pollForShareCompletion();jQuery(".a2a_dd").bind("click",function(q){hdp.tracking.trackEvent("/#[locale]# - Footer","Share")})},pollForShareCompletion:function(){if(!hdp.sharing.fullyLoaded){if(jQuery("#a2apage_cols_container").length){hdp.sharing.fullyLoaded=true;hdp.sharing.shareFullyLoaded()}else{setTimeout(function(){hdp.sharing.pollForShareCompletion()},500)}}},shareFullyLoaded:function(){if(hdp.sharing.fullyLoaded!==true){return}a2a.init("page");if(typeof(Cufon)!="undefined"){Cufon.replace("#a2apage_dropdown a",{fontFamily:"Futura Condensed Medium"})}hdp.sharing.tabSwitchingFunction=a2a.tabs;a2a.tabs=hdp.sharing.tabSwitched;hdp.sharing.enableSmoothScroll();jQuery("#a2apage_cols_container").wrap('<div id="a2apage_cols_container_outer"></div>');jQuery("#a2apage_cols_container_outer").before('<a id="a2apage_smooth_scroll_up" class="a2apage_smooth_scroll_button" href="javascript:void(0);"><img src="/assets/global/images/clear.gif" class="a2a_i_uarr" alt="Scroll up"/></a>').after('<a id="a2apage_smooth_scroll_down" class="a2apage_smooth_scroll_button" href="javascript:void(0);"><img src="/assets/global/images/clear.gif" class="a2a_i_darr" alt="Scroll down"/></a>');jQuery("div.a2a_tabs:last-child").after('<div class="a2a_close">&nbsp;</div>');jQuery("div.a2a_close").bind("click",function(b){a2a.toggle_dropdown("none",a2a.type)});jQuery("#a2apage_smooth_scroll_up").bind("mousedown",function(b){b.preventDefault();hdp.sharing.scrollUp(b)}).bind("mouseup",function(b){b.preventDefault();hdp.sharing.stopScroll(b)}).bind("click",function(b){b.preventDefault()});jQuery("#a2apage_smooth_scroll_down").bind("mousedown",function(b){b.preventDefault();hdp.sharing.scrollDown(b)}).bind("mouseup",function(b){b.preventDefault();hdp.sharing.stopScroll(b)}).bind("click",function(b){b.preventDefault()});jQuery("#a2apage_find").bind("keydown",hdp.sharing.resultsFiltered)},resultsFiltered:function(){jQuery("#a2apage_cols_container").css("top","0px")},tabSwitched:function(b,e){jQuery("#a2apage_cols_container").css("top","0px");if(b=="DEFAULT"){hdp.sharing.enableSmoothScroll()}else{hdp.sharing.disableSmoothScroll()}return hdp.sharing.tabSwitchingFunction(b,e)},enableSmoothScroll:function(){jQuery("#a2apage_dropdown").addClass("show_smooth_scroll_buttons")},disableSmoothScroll:function(){jQuery("#a2apage_dropdown").removeClass("show_smooth_scroll_buttons")},scrollUp:function(b){jQuery("#a2apage_cols_container").animate({top:0},hdp.sharing.scrollSpeed,hdp.sharing.easing)},scrollDown:function(b){a2aContainer=jQuery("#a2apage_cols_container");if(!hdp.sharing.absoluteTop){hdp.sharing.absoluteTop=a2aContainer.parent().height()-a2aContainer.height()}a2aContainer.animate({top:hdp.sharing.absoluteTop+"px"},hdp.sharing.scrollSpeed,hdp.sharing.easing)},stopScroll:function(b){jQuery("#a2apage_cols_container").stop()}},signUp:{init:function(){jQuery("a.ucl-open-close-link").live("click",function(b){b.preventDefault();hdp.signUp.openClose()});jQuery("a.ucl-submit-a").show().bind("click",function(g){jQuery("form").validate().form();if(jQuery("form").valid()){var f=jQuery.trim(jQuery(".ucl-signup-div .ucl-text-input").val()).split("@");f=f[f.length-1];hdp.tracking.trackEvent("/#[locale]# - Newsletter","Action - Submit",f);var b=jQuery(g.target).closest("a")[0].id;var h=b.replace(/_/g,"$");__doPostBack(h,"")}g.preventDefault()});jQuery("input.ucl-submit-button").hide()},hideAddressAndButtonInputsIfSuccessful:function(){var b=jQuery("div.ucl-signup-div #StatusMessageContainer .True");if(b.length){var e=jQuery("div.ucl-signup-div #StatusMessageContainer").parent();jQuery(":not(#StatusMessageContainer, #StatusMessageContainer *)",e).hide()}},showSignUpPanelIfAppropriate:function(){if(jQuery("div.show-ucl-signup-panel").length>0){jQuery("div.ucl-signup-div").fadeIn(400)}},close:function(){jQuery("div.ucl-signup-div").removeClass("ucl-signup-div-open")},openClose:function(){jQuery("div.ucl-signup-div").toggleClass("ucl-signup-div-open");if(jQuery("div.ucl-signup-div").hasClass("ucl-signup-div-open")){hdp.tracking.trackEvent("/#[locale]# - Newsletter","Action - Signup")}}},validate:{init:function(e){if(!jQuery("form").length){return}if(typeof(jQuery("form").validate)==="undefined"){return}var h=e?e:jQuery("form");var b="invalid";var g=jQuery(".dob-day");var f=jQuery(".dob-month");var i=jQuery(".dob-year");var j=[2,4,6,9,11];var k={};if(g.length&&f.length&&i.length){k.dob=g.attr("name")+" "+f.attr("name")+" "+i.attr("name");jQuery.validator.addMethod("chkDobDay",function(){var o=parseInt(g.val());var m=parseInt(f.val());var n=parseInt(i.val());var l=hdp.validate.isLeapYear(n)?29:28;if(hdp.util.inArray(m,j)){if(m===2){return !(o>l)}else{return !(o==31)}}else{return true}},g.attr("title"))}h.validate({onfocusout:false,onkeyup:false,onclick:false,errorClass:b,wrapper:"span",groups:k,showErrors:function(m,l){this.defaultShowErrors();Cufon.refresh("."+b)},errorPlacement:function(m,l){if(l.hasClass("dob-day")||l.hasClass("dob-month")){m.insertAfter(i)}else{m.insertAfter(l)}if(l.attr("type")==="checkbox"){l.wrap('<div class="chkbox-invalid" />')}}});if(g.length){g.rules("add",{minlength:2,maxlength:2,number:true,range:[1,31],chkDobDay:true})}if(f.length){f.rules("add",{minlength:2,maxlength:2,number:true,range:[1,12]})}if(i.length){i.rules("add",{minlength:4,maxlength:4,number:true})}if(jQuery("input.email").length>0){jQuery.validator.addMethod("chkSubscribeEmail",function(m){var l=new RegExp(/^[a-z0-9]([\-!#\$%&'\*\+\.\/0-9=\?a-z\^_`\{\|\}~])+@((\w([\-!#\$%'\*\+\/0-9=\?a-z\^_`\{\|\}~]*\.)+[a-z]{2,6})|(\[([0-9]{1,3}\.){3}[0-9]{1,3}\]))$/i);return l.test(m)},"Please enter a valid email address.");jQuery("input.email").each(function(l){jQuery(this).rules("add",{required:true,chkSubscribeEmail:true})})}},isLeapYear:function(b){return new Date(b,2-1,29).getDate()===29}},toolTips:{init:function(b){var e=".hdp-tooltip-ico";e=b?b+" "+e:e;jQuery(e).hover(function(){var f=jQuery(this);this.toolTip=f.find("div.hdp-tooltip");if(!this.toolTip.length){this.toolTip=jQuery('<div class="hdp-tooltip"><div class="hdp-tooltip-top"></div><div class="hdp-tooltip-mid">'+f.attr("title")+'</div><div class="hdp-tooltip-btm"></div></div>');f.removeAttr("title");f.append(this.toolTip);Cufon.replace(".hdp-tooltip",Cufon.linkTextCufon)}this.toolTip.show()},function(){this.toolTip.hide()})}},layout:{init:function(){var b=$("#hdp-hidden-bg");if(b!=null){var g=$("#hdp-wrapper");if(g!=null){var e=g.height(),f=b.height();if(e<f){g.height(f)}}}}}};return a}();hdp.GlobalNavigation=(function(){return _this={overlay:function(){return jQuery("#hdp-content-overlay")},getSubNav:function(a){if(a){return jQuery(a).data("subnav")?jQuery(a).data("subnav"):jQuery.data(a,"subnav",jQuery(a).find(".panel").eq(0))}else{return this._subnavCache?this._subnavCache:this._subnavCache=jQuery("#hdp-primary-menu li .panel")}},getVisibleSubNavs:function(a){return _this.getSubNav(a).filter(":visible")},speed:{showOverlay:500,hideOverlay:500,subNavShow:250,subNavHide:200,subNavActiveOff:500,subNavActiveOn:0},hideSubNavEase:"easeOutSine",showOverlay:function(){_this.overlay().filter(":hidden").css({opacity:0,display:"block",height:jQuery("#hdp-wrapper").height()-87}).end().stop(false,true).animate({opacity:0.7},_this.speed.showOverlay)},hideOverlay:function(){_this.overlay().stop().animate({opacity:0},{duration:_this.speed.hideOverlay,easing:"easeInSine",complete:function(){jQuery(this).css("display","none")}})},showSubNav:function(a){_this.hideSubNav(_this.getVisibleSubNavs());a.stop().css({height:(function(){return a.data("fullHeight")})(),display:"block"}).removeClass("hidden");_this.showOverlay()},hideSubNav:function(a,b){if(!a.length){return}setTimeout(function(){var e=a.parent().is("td")?a.closest("table").prev().get(0):a.prev().get(0);if(typeof(Cufon)!="undefined"){Cufon.replace(e,Cufon.menuStyleOpts)}},13);if(b){a.animate({height:0},{duration:_this.speed.hideSubNav,easing:_this.hideSubNavEase,complete:function(){jQuery(this).css("display","none")}}).addClass("hidden")}else{a.hide()}},showSubNavItemActive:function(a){if(!jQuery(this).data("highlightElm")){jQuery(this).data("highlightElm",jQuery("span.highlight",this))}jQuery(this).data("highlightElm").stop().show().css("opacity",1)},hideSubNavItemActive:function(a){if(!jQuery(this).data("highlightElm")){jQuery(this).data("highlightElm",jQuery("span.highlight",this))}jQuery(this).data("highlightElm").fadeOut(_this.speed.subNavActiveOff)},deactivateNav:function(){_this.hideOverlay();if(_this.getVisibleSubNavs().length>0){_this.hideSubNav(_this.getVisibleSubNavs(),true)}},init:function(){jQuery("#hdp-primary-menu li .panel").each(function(){jQuery(this).data("fullHeight",jQuery(this).height()+"px").css({height:0,display:"none"})}).children().css("height","100%").end().find("a").hover(_this.showSubNavItemActive,_this.hideSubNavItemActive);jQuery("#hdp-primary-menu > li > a").hoverIntent({over:function(b){_this.showSubNav(_this.getSubNav(jQuery(this).parent()))},out:function(b){},sensitivity:1,interval:50});jQuery("#hdp-primary-menu").bind("mouseleave",_this.deactivateNav);try{document.execCommand("BackgroundImageCache",false,true)}catch(a){}}}})();hdp.Format={initTextClasses:function(){jQuery("span.vertical-align-middle").each(function(e){var b=jQuery(this),f=b.parent(),a=parseInt(f.height(),10)+parseInt(f.css("padding-top"),10);f.css({height:a+"px","padding-top":0,position:"relative"});c=f.height()/2;d=b.height()/2;t=c-d;b.css({"padding-top":0,"margin-top":0,position:"absolute",top:t,visibility:"visible"}).removeClass("vertical-align-middle")})}};hdp.selectList=function(){var a={easing:"easeOutQuart",scrollSpeed:1300,closeDelay:2000,absoluteTop:0,listOptions:[],init:function(f,g){var e=['<ul class="hdp-list '+f+'">'];var h=false;var b=0;jQuery("."+f+" option").each(function(k){var j=jQuery(this);if(h&&!j.hasClass("hdp-country-lang")){h=false;subItem=0;e[e.length]="</ul></li>"}e[e.length]="<li";if(j.hasClass("hdp-country-lang")){b++;if(b===1){e[e.length]=' class="hdp-country-lang"'}}else{if(this.value&&(this.selected||j.hasClass("hdp-list-lang-options"))){e[e.length]=' class="';if(this.selected){e[e.length]="hdp-selected "}if(j.hasClass("hdp-list-lang-options")){e[e.length]="hdp-list-lang-options"}e[e.length]='"'}else{e[e.length]=' class="hdp-list-item"'}}e[e.length]='><a href="'+this.value+'"';if(k===0){e[e.length]=' class="ucl-no-link"'}if(j.hasClass("ext")||f=="hdp-share-list"){e[e.length]=' rel="ext"'}if(this.style.backgroundImage){e[e.length]=' style="background-image:'+this.style.backgroundImage.replace(/"/g,"")+'"'}e[e.length]=">"+this.text+"</a>";if(j.hasClass("hdp-list-lang-options")){h=true;e[e.length]='<ul class="hdp-list-sub">'}else{e[e.length]="</li>"}});e[e.length]="</ul>";jQuery("div."+f+"-inner").html(e.join(""));if(typeof(Cufon)!="undefined"){Cufon.listTextCufon={fontFamily:"Futura Condensed Medium",hover:true,hoverables:{li:true,span:true},separate:"none"};if(g){Cufon.replace("ul."+f+" li",Cufon.listTextCufon)}else{Cufon.replace("ul."+f+" a.ucl-no-link",Cufon.listTextCufon)}}if(jQuery("div."+f+"-div").length===0){return}jQuery(".hdp-list-sub").hide();hdp.selectList.showHide(f);hdp.selectList.close();cDiv=jQuery("div."+f+"-div");cList=cDiv.find("ul."+f);cListItems=cList.find("li");cList.hover(function(){hdp.selectList.listMouseover(f)},function(){hdp.selectList.listMouseout(f)});cListItems.bind("click",function(j){if(jQuery(this).find("a").attr("href").length>0){var i=jQuery(j.target);if(!i.is("li")&&i.parents("li").length>0){i=i.parents("li:first")}if(!i.is("ul.hdp-list > li")){hdp.tracking.trackEvent("/#[locale]# - Footer","Select Language",jQuery(this).parent().siblings("a").text()+"_"+jQuery(this).text());j.stopPropagation();j.preventDefault();hdp.selectList.openClose(j,f);return}hdp.tracking.trackEvent("/#[locale]# - Footer","Select Country",jQuery(this).find("a:first").text())}j.preventDefault();hdp.selectList.openClose(j,f)});hdp.selectList.absoluteTop=cList.parent().height()-cList.height();cSubListParents=cList.find("li.hdp-list-lang-options");cSubListParents.hover(function(){var i=cList.css("top");var j=jQuery(this).position().top;var k=jQuery("div."+f+"-inner").height();if(parseInt(i)+j<(k/2)){jQuery("ul",this).addClass("below")}jQuery("ul",this).show().siblings("a").toggleClass("highlight")},function(){jQuery("ul",this).hide().siblings("a").toggleClass("highlight");jQuery("ul",this).removeClass("below")});cDiv.find("div.hdp-scroll-up").bind("mousedown",function(i){i.preventDefault();hdp.selectList.scrollUp(f)}).bind("mouseup",function(i){i.preventDefault();hdp.selectList.stopScroll(f)}).hover(function(){hdp.selectList.listMouseover(f)},function(){hdp.selectList.listMouseout(f)});cDiv.find("div.hdp-scroll-down").bind("mousedown",function(i){i.preventDefault();hdp.selectList.scrollDown(f)}).bind("mouseup",function(i){i.preventDefault();hdp.selectList.stopScroll(f)}).hover(function(){hdp.selectList.listMouseover(f)},function(){hdp.selectList.listMouseout(f)})},listMouseover:function(b){var e=jQuery("ul."+b).attr("timeoutID");clearTimeout(e)},listMouseout:function(b){var e=setTimeout(function(){hdp.selectList.close(b)},hdp.selectList.closeDelay);jQuery("ul."+b).attr("timeoutID",e)},showHide:function(b){jQuery("div."+b+"-div").show()},close:function(b){jQuery("div."+b+"-div").removeClass("hdp-list-open");if(jQuery("ul."+b+" li.hdp-selected").length>0){jQuery("ul."+b).css({top:"-"+jQuery("ul."+b+" li.hdp-selected").position().top+"px"})}else{if(jQuery("ul."+b+" li").length>0){jQuery("ul."+b).css({top:"-"+jQuery("ul."+b+" li:first").position().top+"px"})}}},openClose:function(i,h){cDiv=jQuery("div."+h+"-div");if(cDiv.hasClass("hdp-list-open")){var f=(jQuery(i.target).closest("a").length==1)?jQuery(i.target).closest("a"):jQuery(i.target).find("a");if(f){if(f.attr("rel")==="ext"){window.open(f.attr("href"))}else{window.location.href=f.attr("href")}}}else{cList=cDiv.find("ul."+h);var g=parseInt(cList.parent().height(),10)/2;if(cList.find("li.hdp-selected").length){var b=location.pathname.substring(0,location.pathname.indexOf("/",1)+1).toLowerCase();cSel=cList.find("li.hdp-selected");cUrl=cSel.find("a.ucl-no-link").attr("href");if(cUrl.indexOf(location.pathname)&&b){cList.find("> li a").each(function(j,e){if(!jQuery(e).hasClass("ucl-no-link")){var k=jQuery(e).attr("href").toLowerCase();if(k.indexOf(b)!=-1){cSel=jQuery(e).parent()}}})}g-=cSel.position().top;g-=0-parseInt(cSel.height(),10)/2;if(g>0){g=0-parseInt(cList.find("li:first").height(),10)}}else{g=0-parseInt(cList.find("li:first").height(),10)}g=Math.max(g,hdp.selectList.absoluteTop);cList.css({top:g+"px"});cDiv.toggleClass("hdp-list-open")}},typeAhead:{init:function(b){hdp.selectList.typeAhead.keyHandler(b)},keyHandler:function(e){var f=false;var b=false;jQuery(document).keydown(function(i){var h=(i.keyCode?i.keyCode:i.which);var g=parseInt(jQuery("ul."+e).css("top").replace("px",""));if(h===38){if(!f){hdp.selectList.scrollUp(e);f=true}}else{if(h===40){if(!b){hdp.selectList.scrollDown(e);b=true}}else{if(h===13){jQuery("ul."+e+" a.highlight").trigger("click")}else{if(h>0){hdp.selectList.typeAhead.filterStr+=String.fromCharCode(i.which).toLowerCase()}}}}});jQuery(document).keyup(function(h){var g=(h.keyCode?h.keyCode:h.which);f=false;b=false;if(g===38||g===40){hdp.selectList.stopScroll(e)}else{var i=hdp.selectList.typeAhead.filterOptions(e);if(i>-1){hdp.selectList.typeAhead.selectOptionById(e,i)}}})},filterStr:"",filterOptions:function(b){setTimeout(function(){hdp.selectList.typeAhead.clearFilter(b)},hdp.selectList.typeAhead.clearFilterDelay);jQuery(hdp.selectList.listOptions).each(function(e){if(this.indexOf(hdp.selectList.typeAhead.filterStr)===0){strInd=e;return false}});return strInd},selectOptionById:function(e,f){var b=jQuery("ul."+e+" a")[f+1];jQuery("ul."+e+" a.highlight").removeClass("highlight");jQuery("ul."+e).css({top:"-"+jQuery(b).parent().position().top+"px"});jQuery(b).addClass("highlight")},clearFilter:function(b){hdp.selectList.typeAhead.filterStr=""},clearFilterDelay:1000},scrollUp:function(b){jQuery("ul."+b).animate({top:0},hdp.selectList.scrollSpeed,hdp.selectList.easing)},scrollDown:function(b){jQuery("ul."+b).animate({top:hdp.selectList.absoluteTop+"px"},hdp.selectList.scrollSpeed,hdp.selectList.easing)},stopScroll:function(e){var b=navigator.userAgent.match("MSIE");if(b){setTimeout(function(){jQuery("ul."+e).stop()},20)}else{jQuery("ul."+e).stop()}}};return a}();hdp.externalLinks={init:function(){jQuery("a.hdp-external-link").attr("target","_blank")}};jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,e,f,g,h){return jQuery.easing[jQuery.easing.def](a,e,f,g,h)},easeInQuad:function(a,e,f,g,h){return g*(e/=h)*e+f},easeOutQuad:function(a,e,f,g,h){return -g*(e/=h)*(e-2)+f},easeInOutQuad:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e+f}return -g/2*((--e)*(e-2)-1)+f},easeInCubic:function(a,e,f,g,h){return g*(e/=h)*e*e+f},easeOutCubic:function(a,e,f,g,h){return g*((e=e/h-1)*e*e+1)+f},easeInOutCubic:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e*e+f}return g/2*((e-=2)*e*e+2)+f},easeInQuart:function(a,e,f,g,h){return g*(e/=h)*e*e*e+f},easeOutQuart:function(a,e,f,g,h){return -g*((e=e/h-1)*e*e*e-1)+f},easeInOutQuart:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e*e*e+f}return -g/2*((e-=2)*e*e*e-2)+f},easeInQuint:function(a,e,f,g,h){return g*(e/=h)*e*e*e*e+f},easeOutQuint:function(a,e,f,g,h){return g*((e=e/h-1)*e*e*e*e+1)+f},easeInOutQuint:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e*e*e*e+f}return g/2*((e-=2)*e*e*e*e+2)+f},easeInSine:function(a,e,f,g,h){return -g*Math.cos(e/h*(Math.PI/2))+g+f},easeOutSine:function(a,e,f,g,h){return g*Math.sin(e/h*(Math.PI/2))+f},easeInOutSine:function(a,e,f,g,h){return -g/2*(Math.cos(Math.PI*e/h)-1)+f},easeInExpo:function(a,e,f,g,h){return(e===0)?f:g*Math.pow(2,10*(e/h-1))+f},easeOutExpo:function(a,e,f,g,h){return(e==h)?f+g:g*(-Math.pow(2,-10*e/h)+1)+f},easeInOutExpo:function(a,e,f,g,h){if(e===0){return f}if(e==h){return f+g}if((e/=h/2)<1){return g/2*Math.pow(2,10*(e-1))+f}return g/2*(-Math.pow(2,-10*--e)+2)+f},easeInCirc:function(a,e,f,g,h){return -g*(Math.sqrt(1-(e/=h)*e)-1)+f},easeOutCirc:function(a,e,f,g,h){return g*Math.sqrt(1-(e=e/h-1)*e)+f},easeInOutCirc:function(a,e,f,g,h){if((e/=h/2)<1){return -g/2*(Math.sqrt(1-e*e)-1)+f}return g/2*(Math.sqrt(1-(e-=2)*e)+1)+f},easeInElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l===0){return g}if((l/=i)==1){return g+h}if(!j){j=i*0.3}if(f<Math.abs(h)){f=h;k=j/4}else{k=j/(2*Math.PI)*Math.asin(h/f)}return -(f*Math.pow(2,10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j))+g},easeOutElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l===0){return g}if((l/=i)==1){return g+h}if(!j){j=i*0.3}if(f<Math.abs(h)){f=h;k=j/4}else{k=j/(2*Math.PI)*Math.asin(h/f)}return f*Math.pow(2,-10*l)*Math.sin((l*i-k)*(2*Math.PI)/j)+h+g},easeInOutElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l===0){return g}if((l/=i/2)==2){return g+h}if(!j){j=i*(0.3*1.5)}if(f<Math.abs(h)){f=h;k=j/4}else{k=j/(2*Math.PI)*Math.asin(h/f)}if(l<1){return -0.5*(f*Math.pow(2,10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j))+g}return f*Math.pow(2,-10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j)*0.5+h+g},easeInBack:function(a,e,f,g,h,i){if(i===undefined){i=1.70158}return g*(e/=h)*e*((i+1)*e-i)+f},easeOutBack:function(a,e,f,g,h,i){if(i===undefined){i=1.70158}return g*((e=e/h-1)*e*((i+1)*e+i)+1)+f},easeInOutBack:function(a,e,f,g,h,i){if(i===undefined){i=1.70158}if((e/=h/2)<1){return g/2*(e*e*(((i*=(1.525))+1)*e-i))+f}return g/2*((e-=2)*e*(((i*=(1.525))+1)*e+i)+2)+f},easeInBounce:function(a,e,f,g,h){return g-jQuery.easing.easeOutBounce(a,h-e,0,g,h)+f},easeOutBounce:function(a,e,f,g,h){if((e/=h)<(1/2.75)){return g*(7.5625*e*e)+f}else{if(e<(2/2.75)){return g*(7.5625*(e-=(1.5/2.75))*e+0.75)+f}else{if(e<(2.5/2.75)){return g*(7.5625*(e-=(2.25/2.75))*e+0.9375)+f}else{return g*(7.5625*(e-=(2.625/2.75))*e+0.984375)+f}}}},easeInOutBounce:function(a,e,f,g,h){if(e<h/2){return jQuery.easing.easeInBounce(a,e*2,0,g,h)*0.5+f}return jQuery.easing.easeOutBounce(a,e*2-h,0,g,h)*0.5+g*0.5+f}});function pageLoad(){hdp.signUp.hideAddressAndButtonInputsIfSuccessful();if(typeof(Cufon)!="undefined"){Cufon.replace("div.ucl-signup-div p",Cufon.defaultTextCufon)}}hdp.Carousels={active:false,inc:0,barScrollSpeed:1300,barItemsPerPage:5,fullItemsPerPage:1,init:function(){hdp.Carousels.inc=0;jQuery("div.bar-carousel").each(function(b,a){hdp.Carousels.initBar(hdp.Carousels.inc,this)});jQuery("div.full-carousel").each(function(b,a){hdp.Carousels.initFull(this)});this.active=true},initEach:function(a){hdp.Carousels.initBar(hdp.Carousels.inc,this);hdp.Carousels.initFull(this)},initBar:function(e,a){hdp.Carousels.makeScroller(a,hdp.Carousels.barItemsPerPage);var b=jQuery(a);b.find("div.more-tab").click(hdp.Carousels.openFull);if(b.find("li").length<=hdp.Carousels.barItemsPerPage){b.find("div.more-tab").hide();b.find("div.buttons").hide()}b.before(("<div class='bar-overlay' id='bar-overlay-"+e+"'></div>"));thisOverlay="#bar-overlay-"+e;jQuery(thisOverlay).hide();if(b.find("div.more-tab").length===1){jQuery(thisOverlay).load(b.find("div.more-tab a")[0].href+" div.full-carousel",function(){var f=jQuery(this).find("div.full-carousel");hdp.Carousels.initFull(f);f.find("#back").css("display","none");f.find("#close").css("display","block").find("a").click(hdp.Carousels.closeFull);Cufon.replace(".items span.title",Cufon.smlHeaderTextCufon);Cufon.replace("div.gallery-title p",Cufon.headerNoGradientCufon);Cufon.replace("#close",Cufon.linkTextCufon)});hdp.Carousels.inc++}},initFull:function(a){hdp.Carousels.makeScroller(a,hdp.Carousels.fullItemsPerPage);var b=jQuery(a);if(b.find("ul.items ul").length<=hdp.Carousels.fullItemsPerPage){b.find("div.buttons").hide()}},makeScroller:function(a,b){var e=jQuery(a);e.find("div.buttons").css("display","block").click(function(f){f.preventDefault()});hdp.Carousels.api=e.find("div.carousel-window").scrollable({onSeek:function(){if(e.find("div.pagination-counter span.index").length>0){e.find("div.pagination-counter span.index").html(this.getPageIndex()+1);Cufon.replace("span.index",Cufon.smlHeaderTextCufon)}},speed:hdp.Carousels.barScrollSpeed,size:b,easing:"easeInOutQuad",api:true});if(e.find("div.pagination-counter .total").length){if(hdp.Carousels.api.getSize()>1){e.find("div.pagination-counter span.total").html(hdp.Carousels.api.getSize());e.find("div.pagination-counter span.index").html(hdp.Carousels.api.getPageIndex()+1)}else{e.find("div.pagination-counter").hide()}}hdp.Carousels.activateLinks(e.find("div.carousel-window"))},openFull:function(a){a.stopImmediatePropagation();thisBar=jQuery(this).parent();thisOverlay=thisBar.prev();thisOverlay.parent().parent().find("div.hdp-main-content").fadeOut();thisBar.animate({height:1,width:996,top:260},function(){thisBar.hide();thisOverlay.show().css("width","996").animate({height:"100%",width:996,top:0},function(){})});jQuery("div.ucl-signup-div").fadeOut();a.preventDefault()},closeFull:function(a){a.stopImmediatePropagation();thisOverlay=jQuery(this).closest("div.bar-overlay");thisOverlay.animate({height:1,width:996,top:280},800,function(){thisOverlay.hide();thisOverlay.parent().parent().find("div.hdp-main-content").fadeIn(800);thisOverlay.next().css("width","996").animate({height:160,width:996,top:90},function(){})});hdp.signUp.showSignUpPanelIfAppropriate();a.preventDefault()},activateLinks:function(a){if(typeof(MediaPlayer)!="undefined"){jQuery(a).find("a").click(function(b){hdp.Carousels.launchPlayer(jQuery(this),b)})}},launchPlayer:function(a,b){b.preventDefault();hdp.Carousels.topElement=jQuery(".hdp-slide");jQuery("div.ucl-signup-div").fadeOut();playerHref=jQuery(a)[0].href;trackingName=jQuery(a)[0].name;twain=jQuery(a).find("img").attr("src").split("/thumbs/");prevRef=twain[0]+"/images/"+twain[1].split("_thumbnail.jpg")[0]+"_preview.jpg";thisOverlay=jQuery('<div id="media-overlay"></div><div id="media-player"><div id="close-btn"><a href="#">CLOSE</a></div><div id="media-MediaPlayer1"></div></div>').appendTo(hdp.Carousels.topElement).hide();jQuery("#close-btn").click(hdp.Carousels.closePlayer);jQuery("#close-btn").hide();if(jQuery("#media-overlay").height()===0){jQuery("#media-overlay").height(jQuery("#media-overlay").parent().height())}jQuery("#media-overlay").css("display","block").fadeTo(900,0.8);jQuery("#media-player").fadeIn(400,function(){var e=new MediaPlayer({id:"media-MediaPlayer1",url:playerHref,previewImage:prevRef,width:"770",height:"435",useCustomControls:false,skin:"/assets/global/flash/heineken.swf",onLoad:function(){jQuery("#close-btn").show()},trackingName:trackingName})})},closePlayer:function(a){if(typeof(a)!="undefined"){a.preventDefault()}if(jQuery("#media-overlay")){hdp.signUp.showSignUpPanelIfAppropriate();jQuery("#media-overlay").remove();jQuery("#media-player").remove()}},reload:function(a){hdp.Carousels.api.reload().begin()}};var MediaPlayer=function(j){var b=j.id||"";var g=j.url||"";var m=j.trackingName||g;var n=j.previewImage||"";var e=j.width||770;var i=(j.height>=0?j.height:435);var h=j.useCustomControls;var o=j.skin||"/assets/global/flash/heineken.swf";var k=j.onLoad||"";var a=j.icons||"true";var l=(j.autostart==false||j.autostart=="false")?"false":"true";if(isMediaAnImage(g)){l="true";a="false";h="true"}(function f(){var q={file:g,image:n,height:i,width:e,icons:a,controlbar:(h?"none":"over"),skin:o,id:b,autostart:l,title:m};var p={allowFullScreen:true,allowScriptAccess:"always",wmode:"transparent"};var r={id:b,name:b};swfobject.embedSWF("/assets/global/flash/player.swf",b,e.toString(),i.toString(),"9",null,q,p,r,k)})()};function isMediaAnImage(b){function a(h,g,i){if(i===true){h=h.toLowerCase();g=g.toLowerCase()}return(g==h.substring(h.length-g.length))}var e=[".jpg",".jpeg",".gif",".png",".bmp"];for(var f=0;f<e.length;f++){if(a(b,e[f],true)){return true}}return false}function playerReady(v){var p=jQuery("#"+v.id)[0];var g=p.parentNode;var w=jQuery("#"+v.id+"-controls");p.addModelListener("STATE","playerStateChanged");if(w.length!==0){var h=jQuery('<a href="#" id="'+v.id+'-play-pause" class="media-button play-pause pause-state">Play</a>');h.bind("click",function(x){x.preventDefault();p.sendEvent("PLAY")});var o=jQuery('<a href="#" class="media-button stop">Stop</a>');o.bind("click",function(x){x.preventDefault();p.sendEvent("STOP")});var n=jQuery('<div id="'+v.id+'-current-time" class="media-text current-time">0:00</div>');var u=jQuery('<div class="media-block progress-bar"></div>');var j=jQuery('<div id="'+v.id+'-current-progress" class="media-block current-progress">0%</div>');j.css("width","0%");u.append(j);var q=jQuery('<div id="'+v.id+'-total-duration" class="media-text total-duration">0:00</div>');var b=jQuery('<a href="#" class="media-button mute unmuted-state">Mute</a>');b.bind("click",function(x){x.preventDefault();p.sendEvent("MUTE");b.toggleClass("unmuted-state");b.toggleClass("muted-state");b.html(b.hasClass("unmuted-state")?"Mute":"Unmute")});var e=jQuery('<div id="'+v.id+'-volume-control" class="media-block volume-control"></div>');var f=jQuery('<a href="#" class="media-button volume level-1 off">20% volume</a>');f.bind("click",function(x){x.preventDefault();p.sendEvent("VOLUME",20)});var s=jQuery('<a href="#" class="media-button volume level-2 off">40% volume</a>');s.bind("click",function(x){x.preventDefault();p.sendEvent("VOLUME",40)});var r=jQuery('<a href="#" class="media-button volume level-3 off">60% volume</a>');r.bind("click",function(x){x.preventDefault();p.sendEvent("VOLUME",60)});var k=jQuery('<a href="#" class="media-button volume level-4 off">80% volume</a>');k.bind("click",function(x){x.preventDefault();p.sendEvent("VOLUME",80)});var i=jQuery('<a href="#" class="media-button volume level-5 off">100% volume</a>');i.bind("click",function(x){x.preventDefault();p.sendEvent("VOLUME",100)});e.append(f,s,r,k,i);w.append(h,o,n,u,q,b,e);var m=p.getConfig().volume;var l=jQuery("#"+v.id+"-volume-control a");for(var z=0,a=l.length;z<a;z++){if((((z+1)/a)*100)<m){l[z].className=l[z].className.replace(" off"," on")}else{l[z].className=l[z].className.replace(" on"," off")}}p.addModelListener("TIME","setPlayheadPosition");p.addModelListener("STATE","setPlayPauseButton");p.addControllerListener("VOLUME","setVolumeControl")}}function setVolumeControl(f){var a=f.percentage;var e=jQuery("#"+f.id+"-volume-control a");for(var g=0,b=e.length;g<b;g++){if((((g+1)/b)*100)<=a){e[g].className=e[g].className.replace(" off"," on")}else{e[g].className=e[g].className.replace(" on"," off")}}}function setPlayPauseButton(b){var a=jQuery("#"+b.id+"-play-pause")[0];if(b.newstate=="PLAYING"||b.newstate=="PAUSED"){var e=b.newstate=="PLAYING";a.className=(e?a.className.replace("pause-state","play-state"):a.className.replace("play-state","pause-state"));a.innerHTML=(e?"Pause":"Play")}else{if(b.newstate=="IDLE"||b.newstate=="COMPLETED"){a.className=a.className.replace("play-state","pause-state");a.innerHTML="Play"}}}function setTotalDuration(g){var e=g.duration;var f=Math.floor(e/60);var b=Math.round(e%60);if(b<10){b="0"+b}var a=jQuery("#"+g.id+"-total-duration");a.html(f+":"+b)}function setPlayheadPosition(a){setTotalDuration(a);var j=a.position;var f=a.duration;var h=Math.round((j/f)*100);var e=jQuery("#"+a.id+"-current-time");var b=jQuery("#"+a.id+"-current-progress");var g=Math.floor(j/60);var i=Math.round(j%60);if(i<10){i="0"+i}e.html(g+":"+i);b.css("width",h+"%");b.html(h+"%")}function playerStateChanged(a){var b=jQuery("#"+a.id)[0].getConfig(),e=b.title.split("/");e=e[e.length-1];if(isMediaAnImage(b.file)){hdp.tracking.trackEvent("/#[locale]# - #[trackingName]#","Image ? "+e)}else{if(a.newstate=="PLAYING"&&(a.oldstate=="IDLE"||a.oldstate=="BUFFERING"||a.oldstate=="COMPLETED")){hdp.tracking.trackEvent("/#[locale]# - #[trackingName]#","Video - "+e,"Play")}else{if(a.newstate=="COMPLETED"&&a.oldstate!="COMPLETED"){hdp.tracking.trackEvent("/#[locale]# - #[trackingName]#","Video - "+e,"Complete")}}}}function trackEvent(g){if(typeof(hdp.tracking)!=="undefined"){if(g.match(",")){var a=g.split(",");var f=a[0]||"";var e=a[1]||"";var b=a[2]||"";f=f.replace(/^\s*'(.*)'$/,"$1");e=e.replace(/^\s*'(.*)'$/,"$1");b=b.replace(/^\s*'(.*)'$/,"$1");hdp.tracking.trackEvent(f,e,b)}else{hdp.tracking.trackPageview(g)}}}function trackPage(a){if(typeof(hdp.tracking)!=="undefined"){hdp.tracking.trackPageview(a)}}hdp.createGraphicalButtons=function(b,a){var b=(b==undefined)?true:b;var a=a?a+" ":"";jQuery.each(jQuery(a+'input[type="submit"]'),function(e,j){var l=jQuery(j);var k=j.name;var m=j.className;var h=j.value;var g=l.hasClass("icon")?'<span class="icon"></span>':"";var f=l.hasClass("back")?g+h:h+g;var n=jQuery('<a href="#" class="'+m+'" rel="'+k+'"><span>'+f+"</span></a>");l.addClass("hide-submit-button");l.after(n);if(b){n.click(function(i){if(!l.hasClass("back")){jQuery("span.invalid, strong.invalid").hide();jQuery("form").validate().form();if(!jQuery("form").valid()){jQuery(".invalid").closest("div.form-field").children("label").css("visibility","hidden");jQuery(".valid").closest("div.form-field").children("label").css("visibility","visible");return false}}l.click();i.preventDefault()})}if(typeof Cufon!=="undefined"&&m){Cufon.refresh("a."+m)}});if(typeof Cufon!=="undefined"){Cufon.refresh("a.submit")}};hdp.FAQ=(function(b){var a=function(){if(!this.jElmAjaxContainer){this.jElmAjaxContainer=b('<div class="hdp-faq-ajax-container">').append('<div class="hdp-faq-overlay"></div>').prependTo("#hdp-content")}return this.jElmAjaxContainer};var e=function(){if(!this.jElmAjaxContent){this.jElmAjaxContent=b('<div class="hdp-faq-ajax-content">').appendTo(f.ajaxContainer())}return this.jElmAjaxContent};var f={ajaxParameter:"ajax=1",ajaxLoading:"",baseUrl:"",init:function(){b("a.hdp-show-faq").click(function(i){f.hide();f.ajaxLoading=i.currentTarget.name;var h=i.currentTarget.href;var g=(h.indexOf("?")!==-1)?"&":"?";f.baseUrl=h.slice(0,h.lastIndexOf("/")+1);f.show().load(h+g+f.ajaxParameter+" .faq-container",null,function(){f.asyncCallback(h)});return false})},loading:function(){if(!this.jElmAjaxLoading){b(".hdp-faq-overlay").css("height",b("#hdp-content").height());this.jElmAjaxLoading=b('<div class="loading-container"></div>').append(b('<p class="defaultTextCufon">'+f.ajaxLoading+"</p>")).appendTo(f.ajaxContainer());Cufon.refresh(".defaultTextCufon")}b("html").scrollTop(0);return this.jElmAjaxLoading},show:function(){f.loading().show();b("a.hdp-faq-close").live("click",function(){f.hide()});b(".landing a, .goto a, a.ask-heineken, .noResults a").live("click",function(g){f.contentContainer().hide()[0].innerHTML="";f.loading().show();b.ajax({url:g.currentTarget.href,success:function(h){f.contentContainer().append(b(h).find(".faq-container"));f.asyncCallback(g.currentTarget.href)}});g.preventDefault()});b(".faq-ask .send a").live("click",function(h){b("form").validate().form();b(".invalid").closest("div.form-field").children("label").css("visibility","hidden");b(".valid").closest("div.form-field").children("label").css("visibility","visible");if(b("form").valid()){var g=b("form").find("input,textarea,select,hidden").not("#__VIEWSTATE,#__EVENTVALIDATION,#__EVENTTARGET,#__EVENTARGUMENT").serialize();f.contentContainer().hide()[0].innerHTML="";f.loading().show();b.post(f.baseUrl+"ask-heineken.aspx?ajax=1",g,function(j){var i=b(j).find(".faq-container");f.contentContainer().append(i);f.asyncCallback(f.baseUrl+"thank-you.aspx")})}h.preventDefault()});b(".faq-header a.submit").live("click",function(g){var h=b(".faq-header input.hdp-textfield").serialize();f.contentContainer().hide()[0].innerHTML="";f.loading().show();b.ajax({url:f.baseUrl+"faq-search-results.aspx?ajax=1&"+h,success:function(i){f.contentContainer().append(b(i).find(".faq-container"));f.asyncCallback(f.baseUrl+"faq-search-results.aspx?"+h)}});g.preventDefault()});f.ajaxContainer().show();return f.contentContainer()},hide:function(){f.ajaxContainer().hide();f.contentContainer()[0].innerHTML="";b("a.hdp-faq-close").die("click");b(".landing a, .goto a, a.ask-heineken, .noResults a").die("click");b(".faq-header a.submit").die("click");b(".faq-ask .send a").die("click")},asyncCallback:function(g){var h=(g!==undefined)?true:false;if(h){f.loading().hide();f.contentContainer().show()}b(".cat-header").click(function(){b(this).toggleClass("expanded").next().slideToggle("slow");return false});b(".hdp-accordion").accordion({active:false,header:"h3",autoHeight:false,change:function(j,i){hdp.tracking.trackEvent("/#[locale]# - FAQ","Article",i.newHeader.text())}});b("form").submit(function(){b(".faq-header a.submit").trigger("click");return !h});b(".faq-header input.hdp-textfield").focus(function(){if(this.value==this.defaultValue){this.value=""}}).bind("blur",function(){if(this.value==""){this.value=this.defaultValue}});if(h){hdp.createGraphicalButtons(false,"div.faq-container");Cufon.refresh();b(".select").selectbox();hdp.tracking.trackPageview(g)}},ajaxContainer:function(){return a()},contentContainer:function(){return e()}};return f})(jQuery);hdp.registration=(function(a){var b;var e={init:function(){b=hdp.registration;hdp.modal.loader.preloadIcon();if(a("body.iframe").length){var h=hdp.util.getUrlParam("protocol");if(h=="null"){h="http:"}Cufon.linkTextCufon={fontFamily:"Futura Condensed Medium",hover:true};Cufon.replace("div.hdp-logreg h2, div.hdp-logreg .linkTextCufon",Cufon.linkTextCufon);Cufon.headerNoGradientCufon={fontFamily:"Futura LT Pro Medium Cond",fontStretch:"normal",separate:"none",hover:true,hoverables:{span:true}};Cufon.replace("div.hdp-logreg .headerFont",Cufon.headerNoGradientCufon);Cufon.defaultTextCufon={fontFamily:"Futura Condensed Medium",fontStretch:"semi-condensed",hover:true};Cufon.replace("div.hdp-logreg .defaultTextCufon, div.hdp-logreg .invalid",Cufon.defaultTextCufon);Cufon.replace(".invalid",Cufon.defaultTextCufon);Cufon.buttonTextCufon={fontFamily:"Futura LT Pro Medium Cond",fontStretch:"normal",hover:true};Cufon.replace("div.hdp-logreg .boldTextCufon",Cufon.buttonTextCufon);Cufon.replace("a.submit",Cufon.buttonTextCufon);var j=a('body.iframe div.hdp-logreg a[rel="async"]');var f=j.length;while(f--){var g=a(j[f]);var i=hdp.util.getUrlParamPrefix(g.attr("href"));g.attr("href",g.attr("href")+i+"protocol="+h)}if(window.top!==window.self){a("body.iframe a.close").click(function(){var k=a("#jqmXd").attr("src");a("#jqmXd").attr("src",k+"?closeModal");return false});a("body.iframe a.fb-login").live("click",function(l){l.preventDefault();var k=escape(a(this).attr("href"));var m=a("#jqmXd").attr("src");a("#jqmXd").attr("src",m+"?url="+k+"&fb=true");return false});a('<iframe id="jqmXd" src="'+h+"//"+hdp.modal.switchSubDomain(h=="https:")+hdp.modal.iFrameCloserUrl+'" frameborder="0" border="0" scrolling="no" allowtransparency="true"></iframe>').appendTo("body.iframe")}a("body.iframe").show()}a("a.logreg-modal").click(function(l){var k=hdp.util.getUrlParamPrefix(l.currentTarget.href);var m={mUrl:l.currentTarget.href+k+b.device,mLoaderText:l.currentTarget.name};hdp.modal.loadModal(hdp.modal.container(),l.type,l,m);l.preventDefault()});a("#recaptchaRefresh").click(function(k){Recaptcha.reload();k.preventDefault()});a(".hdp-profile a.btn-save").click(function(){if(!a("form").valid()){a(".static-tip").hide();return false}});a("div.hdp-modal a.jqmClose").click(function(){b.closeModal()});a("input.login-reg-password").keypress(function(k){if(k.keyCode==13){a("span.invalid, strong.invalid").hide();a("form").validate().form();if(!a("form").valid()){a(".invalid").closest("div.form-field").children("label").css("visibility","hidden");a(".valid").closest("div.form-field").children("label").css("visibility","visible");return false}a("input.login-reg-submit").click();return false}return true});b.init=null},device:"iframe=1",modal:function(){return hdp.modal.container()},modalContent:function(){return b.modal().find("div.modal-content")},closeModal:function(f){if(typeof Recaptcha!="undefined"){Recaptcha.destroy()}b.modal().jqmHide()}};return e})(jQuery);(function(){var a;var b=[];hdp.modal={jqModalUrl:"/assets/global/scripts/ext/jqModal.js",iFrameCloserUrl:"/assets/global/iframe/hdp-modal-xd-iframe.html",overlayOpacity:70,container:function(f){if(!this.jElmModalContainer){this.jElmModalContainer=f?jQuery('<div class="hdp-modal '+f+'"><div class="modal-content"></div></div>').appendTo("body"):jQuery('<div class="hdp-modal"><div class="modal-content"></div></div>').appendTo("body")}return this.jElmModalContainer},_getModalScript:function(f,g,i,h){if(typeof a.jqModalUrl==="undefined"){console.error("hdp.modal.jqModalUrl isn't defined");return false}hdp.util.loadScripts(a.jqModalUrl,function(){a.loadModal(f,g,i,h)})},_openModalWindow:function(g,j,i){var f={overlay:a.overlayOpacity,modal:true,onHide:a._close};var h=$(j.currentTarget);if(i&&i.mUrl){if(i.mUrl.indexOf("iframe")>-1){g.find("div.modal-content").append('<a class="jqmClose close-icon">CLOSE</a><iframe id="jqmContent" src="'+i.mUrl+"&protocol="+location.protocol+'" frameborder="0" border="0" scrolling="no" allowtransparency="true"></iframe>');f.onShow=i.mCallBack}else{a.loader.init(i.mLoaderText);f.ajax=i.mUrl;f.onLoad=i.mCallBack;f.target=g.find(".modal-content")}f.onHide=a._ajaxClose}g.jqm(f);g.jqmShow();return false},switchSubDomain:function(h,g){var f=((g!==undefined)?g:window.location.hostname);if(h){if(f.indexOf("secure")==-1){if(f.indexOf("www")!=-1){f=f.replace(/www/g,"secure")}else{f="secure."+f}}}else{if(f.indexOf("www")==-1){if(f.indexOf("sitecorewebsite")==-1){f=f.replace(/secure/g,"www")}else{f=f.replace(/secure\./g,"")}}}return f},_getDomain:function(j){if(j===undefined){j=2}if(b[j]==null){var g=(window.location.hostname).split(".");if(g.length>j){var f="";var h=1;while(h<=j&&h<=g.length){f=g[g.length-h]+(f==""?"":".")+f;h++}b[j]=f}else{b[j]=g.join(".")}}return b[j]},loadModal:function(g,h,j,i){var k=typeof jQuery.jqm!=="undefined";var f=typeof j.currentTarget!=="undefined"?typeof j.currentTarget.href?j.currentTarget.href:"":"";if(!k){a._getModalScript(g,h,j,i)}else{if(h==="click"||h==="open"){a._openModalWindow(g,j,i)}}return a},closeModal:function(f){if(f!==undefined){f.jqmHide()}else{a.container().jqmHide()}},changeLocation:function(g,f){setTimeout(function(){window.location=g+"&refresh=true"},100)},scrollTop:function(f){jQuery("html").scrollTop(f)},loader:{preloadIcon:function(){hdp.util.preloadImages("/assets/global/images/ajax-loader.gif")},visible:0,init:function(f){var f=f?f:"Loading";if(!this.jElmLoading){this.jElmLoading=jQuery('<div class="loader"><p>'+f+"</p></div>").appendTo(a.container());a.loader.delayShow()}return this.jElmLoading},delayShow:function(){a.container().find("div.modal-content").hide();a.loader.showLoader=setTimeout("hdp.modal.loader.show()",250)},show:function(){a.loader.init().show();a.loader.visible=1},delayHide:function(){if(a.loader.visible){a.loader.hideLoader=setTimeout("hdp.modal.loader.hide()",1000)}else{a.loader.hide()}},hide:function(){a.loader.init().hide();a.container().find("div.modal-content").show();clearTimeout(a.loader.showLoader);a.loader.visible=0},close:function(){this.jElmLoading=null}},_close:function(f){f.w.fadeOut("2000",function(){f.o.remove()})},_ajaxClose:function(f){f.w.fadeOut("2000",function(){f.o.remove();a.container().remove();a.jElmModalContainer=null;a.loader.close()})},init:function e(){a=hdp.modal;if(!jQuery("#scWebEditRibbon").length&&jQuery("#hdp-wrapper.facebook").length){document.domain=hdp.modal._getDomain(2)}a.init=null}}}());(function(){var a=[];var b=[];hdp.util={loadScripts:function(f,g){var e=a.length;while(e--){if(a[e]==f){return false}}a.push(f);$.getScript(f,function(){g()})},preloadScripts:function(f){if(f!="undefined"){var e=document.getElementsByTagName("head")[0]||document.documentElement;var g=document.createElement("script");g.src=f;e.insertBefore(g,e.firstChild)}},preloadImages:function(){var f=arguments.length;while(f--){var e=document.createElement("img");e.src=arguments[f];b.push(e)}},inArray:function(f,e){for(var g in e){if(f===e[g]){return true}}return false},getUrlParamPrefix:function(e){return e.indexOf("?")===-1?"?":"&"},getUrlParam:function(e){return unescape((RegExp(e+"=(.+?)(&|$)").exec(location.search)||[,null])[1])}}})();jQuery(document).ready(function(){hdp.init();if(hdp.Carousels&&jQuery("#hdp-media-gallery, #hdp-heineken-exp").length){if(!hdp.Carousels.active){hdp.Carousels.init()}}hdp.signUp.showSignUpPanelIfAppropriate();if(hdp.flashManager){hdp.flashManager.navigate()}if(jQuery(".faq-container").length){hdp.FAQ.asyncCallback()}hdp.FAQ.init();hdp.modal.init();hdp.registration.init()});
