
﻿
if(typeof shazam=="undefined")
shazam={};if(shazam.web==null)
shazam.web={};;(function($){shazam.web.ui={expandableDownloadButton:{isOpen:false,expandTime:500,delayTime:150,elExpand:null,elTrigger:null,elShow:null,elAnchor:null,elExpandBottom:null,elContainer:null,origHeight:0,expandHeight:0,containerExpandHeight:0,containerOrigHeight:0,containerExpandOffset:0,calculateExpandHeight:true,define:function(elToExpand,elToTrigger,elToShow,elAnchorToBlank,elBottomOfExpand,elContainerToExpand,options){if(options!=null){$.extend(shazam.web.ui.expandableDownloadButton,options)}
try{this.elExpand=$(elToExpand);this.elTrigger=$(elToTrigger);this.elShow=$(elToShow);if(elBottomOfExpand!=null){this.elExpandBottom=$(elBottomOfExpand);}
if(elContainerToExpand!=null){this.elContainer=$(elContainerToExpand);}}catch(objErr){alert("error");return;};if(this.calculateExpandHeight){this.elShow.show();this.expandHeight=this.elExpand.height();if(this.elContainer!=null){this.containerOrigHeight=this.elContainer.height()
this.containerExpandHeight=this.elExpand.height()
+this.containerOrigHeight
+this.containerExpandOffset;if(this.elBottomOfExpand!=null){this.elBottomOfExpand.show();this.containerExpandHeight=this.elBottomOfExpand.height();this.elBottomOfExpand.hide();}}}
this.elShow.hide();this.origHeight=this.elExpand.height();this.elTrigger.unbind('click').bind({"click":shazam.web.ui.expandableDownloadButton.toggleState});},open:function(event){shazam.web.ui.expandableDownloadButton.openExpandPanel();},close:function(event){shazam.web.ui.expandableDownloadButton.closeExpandPanel();},toggleState:function(event){shazam.web.ui.expandableDownloadButton.toggleStateInt();return false;},toggleStateInt:function(){if(this.isOpen){this.closeExpandPanel();this.isOpen=false;}else{this.openExpandPanel()
this.isOpen=true;}},openExpandPanel:function(){var thisScope=this;if(thisScope.elExpandBottom!=null){thisScope.elExpandBottom.show()}
this.elExpand.stop().toggleClass("open").animate({height:this.expandHeight},this.expandTime,function(){thisScope.elShow.show()
thisScope.elTrigger.toggleClass("up")});if(this.elContainer!=null){this.elContainer.animate({height:this.containerExpandHeight},this.expandTime);}},closeExpandPanel:function(){var thisScope=this;this.elShow.hide();this.elTrigger.toggleClass("up");this.elExpand.delay(this.delayTime).stop().toggleClass("open").animate({height:this.origHeight},this.expandTime,function(){if(thisScope.elExpandBottom!=null){thisScope.elExpandBottom.hide()}});if(this.elContainer!=null){this.elContainer.delay(this.delayTime).stop().animate({height:this.containerOrigHeight},this.expandTime);}}},modules:{define:function(el){shazam.web.ui.utils.addRolloverToggle(el);}},trackListingRollover:{define:function(el){shazam.web.ui.utils.addRolloverToggle(el);}},faqRollover:{define:function(el){shazam.web.ui.utils.addRolloverToggle(el);}},recommendsRollover:{define:function(el){shazam.web.ui.utils.addRolloverToggle(el);}},addRolloverBehaviour:function(el){shazam.web.ui.utils.addRolloverToggle(el);},loginbutton:{isOpen:false,elTrigger:null,define:function(el){this.elTrigger=$(el);this.elTrigger.unbind('click').bind({"click":shazam.web.ui.loginbutton.toggleState})},toggleState:function(event){shazam.web.ui.loginbutton.toggleStateInt();return false;},toggleStateInt:function(){if(this.isOpen){this.elTrigger.parent().toggleClass("open");this.isOpen=false;}else{this.elTrigger.parent().toggleClass("open");this.isOpen=true;}}},languagebutton:{isOpen:false,elTrigger:null,define:function(el){this.elTrigger=$(el);this.elTrigger.unbind('click').bind({"click":shazam.web.ui.languagebutton.toggleState})},toggleState:function(event){shazam.web.ui.languagebutton.toggleStateInt();return false;},toggleStateInt:function(){if(this.isOpen){this.elTrigger.parent().toggleClass("open");this.isOpen=false;}else{this.elTrigger.parent().toggleClass("open");this.isOpen=true;}}},popuppanel:{panels:[],define:function(elTrigger,elTarget){if(this.panels[elTarget]==null){this.panels[elTarget]={target:$(elTarget),isOpen:false}}
$(elTrigger).unbind('click').bind({"click":function(){shazam.web.ui.popuppanel.toggleStateInt(elTarget)}});},toggleStateInt:function(target){var dataObj=this.panels[target];if(dataObj.isOpen){dataObj.target.toggleClass("open");dataObj.isOpen=false;}else{var i;var thisPanel;for(i in this.panels){thisPanel=this.panels[i]
if(thisPanel.isOpen){thisPanel.target.toggleClass("open");thisPanel.isOpen=false;}}
dataObj.target.toggleClass("open");dataObj.isOpen=true;}}},formInteraction:{define:function(el,test){jQuery('#captchaLink').click(function(){var captchaImage=jQuery('#captchaImage').attr('src')+'?'+(new Date()).getTime();jQuery('#captchaImage').attr('src',captchaImage);return false;});$(el).bind({blur:function(){var elParent=$(this).parent().parent();if(elParent.hasClass("show-fieldtip")){elParent.removeClass("show-fieldtip");}},focus:function(){var elParent=$(this).parent().parent();if(!elParent.hasClass("show-fieldtip")){elParent.addClass("show-fieldtip");}}});}},utils:{addRolloverToggle:function(el){$(el).bind({"mouseover":function(){$(this).toggleClass("over");},"mouseout":function(){$(this).toggleClass("over")}});}}}
$(document).ready(function(){shazam.web.ui.popuppanel.define(".button-login","li.login")
shazam.web.ui.popuppanel.define(".button-language","li.language")});})(jQuery);
