(function(){var _attemptInterval=20;var _defaultAttemptDuration=10000;$.extend(Vevo,{FreeWheel:{AdManager:null,SSID:null,getAdManager:function(){if(Vevo.FreeWheel.AdManager!=null){return Vevo.FreeWheel.AdManager
}if($("#thePlayer").length>0){Vevo.FreeWheel.AdManager=$("#thePlayer")[0]}else{if($("#theShowcase").length>0){Vevo.FreeWheel.AdManager=$("#theShowcase")[0]}else{if($("#admanager").length>0){Vevo.FreeWheel.AdManager=$("#admanager")[0]
}}}return Vevo.FreeWheel.AdManager},startHeadlessAdManager:function(attemptDuration){var adManager=Vevo.FreeWheel.getAdManager();if(adManager!=null){if(typeof adManager.start==="function"){try{adManager.start()
}catch(e){}return}else{if(typeof adManager.logImpression==="function"&&adManager.start==null){return}}}if(attemptDuration==null){attemptDuration=_defaultAttemptDuration
}if(attemptDuration>0){var tmpFunc=(function(c){return function(){Vevo.FreeWheel.startHeadlessAdManager(c)}})(attemptDuration-_attemptInterval);setTimeout(tmpFunc,_attemptInterval)
}else{}},logImpression:function(id,attemptDuration){var adManager=Vevo.FreeWheel.getAdManager();if(adManager!=null&&typeof adManager.logImpression==="function"&&$("#_fw_container_"+id).length>0&&$.trim($("#_fw_container_"+id).html())!=""){try{adManager.logImpression(id)
}catch(e){}return}if(attemptDuration==null){attemptDuration=_defaultAttemptDuration}if(attemptDuration>0){var tmpFunc=(function(id,c){return function(){Vevo.FreeWheel.logImpression(id,c)
}})(id,attemptDuration-_attemptInterval);setTimeout(tmpFunc,_attemptInterval)}else{}},init:function(){Vevo.FreeWheel.startHeadlessAdManager(10000)}}});(function(){window.mastHeadExpand=function(){setHeightAndContinue($("div#mastheadWrapper"),418,20)
};window.mastHeadCollapse=function(){setHeightAndContinue($("div#mastheadWrapper"),66,-80)};var timeoutID;function setHeightAndContinue(element,desireHeight,stepSize){var currHeight=$(element).height();
var newHeight=$(element).height()+stepSize;if(desireHeight>currHeight){if(desireHeight>newHeight){$(element).height(newHeight);clearTimeout(timeoutID);timeoutID=setTimeout(function(){setHeightAndContinue(element,desireHeight,stepSize)
},20)}else{$(element).height(desireHeight)}}else{if(desireHeight<currHeight){if(desireHeight<newHeight){$(element).height(newHeight,desireHeight);clearTimeout(timeoutID);
timeoutID=setTimeout(function(){setHeightAndContinue(element,desireHeight,stepSize)},20)}else{$(element).height(desireHeight)}}}}})();$(document).ready(function(){Vevo.FreeWheel.init()
})})();