(function(E){E.fn.jqm=function(F){var A={overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:O,ajaxText:"",target:O,modal:O,toTop:O,onShow:O,onHide:O,onLoad:O};return this.each(function(){if(this._jqm){return N[this._jqm].c=E.extend({},N[this._jqm].c,F)}P++;this._jqm=P;N[P]={c:E.extend(A,E.jqm.params,F),a:O,w:E(this).addClass("jqmID"+P),s:P};if(A.trigger){E(this).jqmAddTrigger(A.trigger)}})};E.fn.jqmAddClose=function(A){return M(this,A,"jqmHide")};E.fn.jqmAddTrigger=function(A){return M(this,A,"jqmShow")};E.fn.jqmShow=function(A){return this.each(function(){A=A||window.event;E.jqm.open(this._jqm,A)})};E.fn.jqmHide=function(A){return this.each(function(){A=A||window.event;E.jqm.close(this._jqm,A)})};E.jqm={hash:{},open:function(V,U){var L=N[V],Q=L.c,H="."+Q.closeClass,R=(parseInt(L.w.css("z-index"))),R=(R>0)?R:3000,F=E("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":R-1,opacity:Q.overlay/100});if(L.a){return O}L.t=U;L.a=true;L.w.css("z-index",R);if(Q.modal){if(!B[0]){K("bind")}B.push(V)}else{if(Q.overlay>0){L.w.jqmAddClose(F)}else{F=O}}L.o=(F)?F.addClass(Q.overlayClass).prependTo("body"):O;if(D){E("html,body").css({height:"100%",width:"100%"});if(F){F=F.css({position:"absolute"})[0];for(var S in {Top:1,Left:1}){F.style.setExpression(S.toLowerCase(),"(_=(document.documentElement.scroll"+S+" || document.body.scroll"+S+"))+'px'")}}}if(Q.ajax){var A=Q.target||L.w,T=Q.ajax,A=(typeof A=="string")?E(A,L.w):E(A),T=(T.substr(0,1)=="@")?E(U).attr(T.substring(1)):T;A.html(Q.ajaxText).load(T,function(){if(Q.onLoad){Q.onLoad.call(this,L)}if(H){L.w.jqmAddClose(E(H,L.w))}J(L)})}else{if(H){L.w.jqmAddClose(E(H,L.w))}}if(Q.toTop&&L.o){L.w.before('<span id="jqmP'+L.w[0]._jqm+'"></span>').insertAfter(L.o)}(Q.onShow)?Q.onShow(L):L.w.show();J(L);return O},close:function(F){var A=N[F];if(!A.a){return O}A.a=O;if(B[0]){B.pop();if(!B[0]){K("unbind")}}if(A.c.toTop&&A.o){E("#jqmP"+A.w[0]._jqm).after(A.w).remove()}if(A.c.onHide){A.c.onHide(A)}else{A.w.hide();if(A.o){A.o.remove()}}return O},params:{}};var P=0,N=E.jqm.hash,B=[],D=E.browser.msie&&(E.browser.version=="6.0"),O=false,G=E('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),J=function(A){if(D){if(A.o){A.o.html('<p style="width:100%;height:100%"/>').prepend(G)}else{if(!E("iframe.jqm",A.w)[0]){A.w.prepend(G)}}}I(A)},I=function(F){try{E(":input:visible",F.w)[0].focus()}catch(A){}},K=function(A){E()[A]("keypress",C)[A]("keydown",C)[A]("mousedown",C)},C=function(H){var A=N[B[B.length-1]],F=(!E(H.target).parents(".jqmID"+A.s)[0]);if(F){I(A)}return !F},M=function(A,F,H){return A.each(function(){var L=this._jqm;E(F).each(function(){if(!this[H]){this[H]=[];E(this).click(function(){for(var Q in {jqmShow:1,jqmHide:1}){for(var R in this[Q]){if(N[this[Q][R]]){N[this[Q][R]].w[Q](this)}}}return O})}this[H].push(L)})})}})(jQuery);var GA_OneClick=(function(){function A(B){_gaq.push(["_trackPageview",B])}return{trackPageView:A}}());var OneClick=(function(){function B(){return $("#oneclick input[name=selectedPlan]:checked").val()}function A(N){var F=1,G,J,O,D,E=$("#loading"),P=$("#inlineUpgrade"),C=$("#upgradeError, #upgradeError *"),I=$("#boosterError, #boosterError *"),L=$("#ccError, #ccError *"),K=$("#nsError, #nsError *"),M=$("#added, #added *"),H=$("#complete, #complete *"),Q=$("#close");if(P&&"length" in P){$("#oneclick, #oneClickFooter, #close").hide();E.show()}$.ajax({async:false,type:"post",url:"/remote/oneclick.html",data:["step=upgrade&selectedPlan=",N,"&random=",Math.random()].join(""),dataType:"json",success:function(R){if(F===1){F=2;P.css("height","216px");Q.show();switch(parseInt(R.result,10)){case 1:J=R.currencySymbol+R.costOfCredit;O=R.currencySymbol+R.grantedCredit;D=R.currencySymbol+R.bonusCredit;$("#boosterPrice").html(J);$("#boosterExtra").html(D);$(".musicDownloadCount, #boosterTotal, #upgradeDownloads").html(O);E.hide();if(!N||N.indexOf("booster")===-1){$("#successPlanName").html(R.planName);H.show();Q.show();GA_OneClick.trackPageView("/onPage/album/upgrade/confirmation/"+R.planName)}else{$("#annualDetails").hide();E.hide();M.show()}E.hide();break;case 2:$("#options").hide();if(N>0){C.show();E.hide()}else{I.show();E.hide()}E.hide();break;case 3:E.hide();L.show();Q.show();break;case 4:E.hide();K.show();Q.show();break}}},error:function(){P.css("height","182px");E.hide();if(N>0){C.show()}else{I.show()}Q.show()}})}return{upgradeSub:A,getPlanChoice:B}}());(function(){var B,A,D;DUMAS.handleDownloadEvents=C;function C(){$("a.downloadBook, #downloadBook").click(function(F){B={target:$(this),href:$(this).attr("href"),mediaType:"book",title:$("div.contentHead h1").text(),e:F};return DUMAS.dlmInstallCheck(B)});$("a.downloadTrack").each(function(F){$(this).click(function(G){var H=$(this);songName=$("p.songName")[F];songName=$(songName);B={target:$(this),href:$(this).attr("href"),mediaType:"song",title:songName.text(),i:F,e:G};return DUMAS.dlmInstallCheck(B)})})}$(function(){E(DUMAS.download)});function E(F){if(F){D=F.hasSubscription;A=F.authorized;if(A&&D){C()}}}})();(function(){var U,b,a,O={},W=false,Z,F,I,J,B,P,V=Cookie({name:"dlmCheckDialogStatusCookie",path:"/",expires:3650}),X=1,N="<img src='/images/oneclick/processing.gif' alt='(loading download manager information)' class='loading' />";U=V.get("status");function Y(){var c=false,d=new Cookie({name:"dlmInstalled",path:"/"});c=d.get("version");return c}function D(){if($.browser.msie){$("body.ie #downloadDialog.fancyBorderBoxWrapper").css("width","789px")}$("#noDLMView, #thanks, #confirmation").hide();$("#initialView").show()}function Q(){if(typeof ActiveXObject!="undefined"){try{Z=new ActiveXObject("EMusicActiveX.eMusicDownloadManager.1");if(Z){W=true}}catch(c){W=false}}if(navigator.plugins){navigator.plugins.refresh(false);if(navigator.plugins["eMusic Remote Plugin"]!==undefined){W=true}}if(navigator.userAgent&&(navigator.userAgent.indexOf("eMusic DLM/4")!=-1||navigator.userAgent.indexOf("eMusic Remote/1")!=-1)){W=true}if(W){if(!DUMAS.sessionDlmChoice||DUMAS.sessionDlmChoice.dlmChoice!="hasDLM"){$.ajax({type:"GET",data:{dlmChoice:"hasDLM"},async:false,url:"/sessions/remote.html"})}$("a.downloadAlbum, a.downloadTrack, span.downloadTrack a").each(function(){if($(this).attr("href")){var d=$(this).attr("href").replace(/([\/\.])emp/g,"$1emx");$(this).attr("href",d)}})}return Y()||W}function G(c,d){clearInterval(b);$("img.loading").hide();$("#installTimeout").show();$("#confirmation").hide();$("a.reinstall").attr("href",c);$("#confirmation a.jqmClose").click(function(){d.w.jqmHide();return false})}function H(d,c){J="with the eMusic Download Manager.";$("#confirmation h1").text("Success!");if(c!==undefined){if(c=="mp3"||c=="other"){J="without a Download Manager."}else{if(c=="emp"){J="with an older version of the eMusic Download Manager."}else{if(c=="emx"){J="with eMusic Download Manager 4.0, eMusic/J, or eMusic Remote."}}}}else{$("#confirmation p:eq(0)").remove()}F="Your account is now configured to download "+J;$("#confirmation h3").text(F);$("#confirmation p.finish span").text("the "+d.mediaType);$("#confirmation p.finish span").text(d.title);$("#confirmation a.downloadTrackDLM").attr("href",d.href);$("#confirmation h3, #confirmation p.finish").fadeIn();if(c=="emp"){$("#confirmation p a.downloadTrackDLM").attr("href",$("#confirmation p a.downloadTrackDLM").attr("href").replace(/([\/\.])emx/g,"$1emp"))}else{if(c=="emx"||c===undefined){$("#confirmation p a.downloadTrackDLM").attr("href",$("#confirmation p a.downloadTrackDLM").attr("href").replace(/([\/\.])emp/g,"$1emx"))}}}function R(d,c,e){if(Q()){clearInterval(b);clearTimeout(a);H(d);$("#confirmation, a.buttonTag").show(function(){$("a.jqmClose").click(function(){e.w.jqmHide();return false})});$("#confirmation h1 img").hide();if($(d.target).attr("data-dlm")=="no"){$("#confirmation p:eq(0)").text("Please click the close button to enable the download manager. You may then try your download again.");$("#confirmation p:eq(1)").hide();$("#confirmation a.jqmClose, p.jqmClose").click(function(){window.location.reload(false)})}else{$("#confirmation p a.downloadTrackDLM").click(function(){$("#downloadDialog.fancyBorderBoxWrapper").hide();return DUMAS.checkDL(d.mediaType,this.href)})}}else{if(X==1){a=setTimeout(function(){G(c,e)},"30000")}}X++}function C(d,c,e){if($.browser.msie){$("body.ie #downloadDialog.fancyBorderBoxWrapper").css("width","685px")}$("#confirmation h1").text("Checking for install. . . ");$("#confirmation h1").append(N);$("#confirmation").show();$("#DLMDownload, a.buttonTag").hide();$("#confirmation h1, #confirmation h1 img").fadeIn();b=setInterval(function(){R(d,c,e)},"3000")}function M(d,c,e){$("#dlmHref").click(function(){$("#initialView").hide();$("p.jqmClose").click(function(){clearInterval(b)});if($(d.target).attr("data-dlm")&&$(d.target).attr("data-dlm")=="no"){if(!DUMAS.sessionDlmChoice||DUMAS.sessionDlmChoice.dlmChoice!="emx"){$.get("/sessions/remote.html",{dlmChoice:"emx"})}}C(d,c,e);return true})}function L(c,d,e){H(d,c);$("#noDLMView").hide();if($.browser.msie){$("#downloadDialog.fancyBorderBoxWrapper").css("width","689px")}$("#confirmation").show();if(c=="mp3"||c=="other"||$(d.target).attr("data-dlm")=="no"){if($("#confirmation p:eq(1)").length>0){$("#confirmation p:eq(1)").hide()}else{$("#confirmation p:eq(0)").hide()}$("a.whiteWebButtonGray, p.jqmClose, a.jqmClose").click(function(){window.location.reload(false)})}$("a.jqmClose, p.jqmClose").click(function(){$("#downloadDialog.fancyBorderBoxWrapper").jqmHide();return false});$("#confirmation p a.downloadTrackDLM").click(function(){$("#downloadDialog.fancyBorderBoxWrapper").jqmHide();if(DUMAS.checkDL){return DUMAS.checkDL(d.mediaType,this.href)}else{return true}return false})}function A(c,d){if(d!==null){L(c,d);if(d.mediaType!="book"){if(c=="emp"){$("a.downloadAlbum, a.downloadTrack, span.downloadTrack a").each(function(){if($(this).attr("href")){var e=$(this).attr("href").replace(/([\/\.])emx/g,"$1emp");$(this).attr("href",e)}})}else{if(c=="emx"){$("a.downloadAlbum, a.downloadTrack, span.downloadTrack a").each(function(){if($(this).attr("href")){var e=$(this).attr("href").replace(/([\/\.])emp/g,"$1emx");$(this).attr("href",e)}})}}}}}function E(c,d){if(!DUMAS.sessionDlmChoice||DUMAS.sessionDlmChoice.dlmChoice!=c){$.get("/sessions/remote.html",{dlmChoice:c},function(){A(c,d)})}else{A(c,d)}}function T(f,d){$("#downloadDialog").addClass("installCheck");var c=function(j){$("#processing").hide();j.w.css({top:DUMAS.scrollTop()+50+"px",left:(DUMAS.clientWidth()/2)-(j.w.width()/2)+"px"}).show();$("#downloadDialog .fancyBoxContent").load("/dlm/dlmInstallCheck.html",function(){h(j,false)});var i=function(m,l,k){if(!k){$("#initialView h1, #initialView h2").show()}if($.browser.msie){$("#downloadDialog.fancyBorderBoxWrapper").css("width","789px")}$("#initialView h1 span").text(d.mediaType);$("#initialView, #initialView h1, #initialView h2").show();$("#initialView div.close").hide();$("a.no").show();$("div.DLMInfo").html(l);I=$("#dlmButton a").attr("href");M(d,I,m);$("a.no").click(function(){$("p.jqmClose").hide();$("#initialView").fadeOut("fast",function(){$("#noDLMView").fadeIn(function(){if($.browser.msie){$("#downloadDialog.fancyBorderBoxWrapper").css("width","689px")}})});$("a.back").click(function(){$("#noDLMView").hide();$("#initialView").show();$("p.jqmClose").show();if($.browser.msie){$("#downloadDialog.fancyBorderBoxWrapper").css("width","789px")}return false});$("button").click(function(){if($("input:radio[name=dlmChoice]:checked").length>0){f.set("status","2");E($("input:radio[name=dlmChoice]:checked").val(),d);$(this).unbind("click")}else{if($("#dlmOptions p.error").length===0){$("#dlmOptions").prepend('<p class="error">You must choose one of the download options.</p>')}}return false});return false})};function h(l,k){$("#initialView h1, #initialView h2").hide();l.w.fadeIn("slow");$.ajax({type:"GET",timeout:5000,url:"/dlm/downloadCheck.html",data:"installCheck=true",success:function(m){i(l,m,k)},error:function(){$("#initialView h1, #initialView h2, img.loading").hide();$("div.dlmInfo").append("<p>We apologize but we could not load the download manager information at this time. Please <a href='#' class='reTry'>try</a> again.</p>");$("#initialView div.close").show();$("a.reTry").click(function(){$("#initialView div.close").hide();$("div.dlmInfo p").remove();$("img.loading").show();h(l,true)})}})}D()};var g=function(h){h.w.fadeOut("4000",function(){h.o.remove()})};var e=true;if($.browser.msie){e=false}$("#downloadDialog.fancyBorderBoxWrapper").jqm({onShow:c,modal:true,onHide:g,toTop:e}).jqmShow();return false}function S(e,d){var c=e.get("status");if(c!==undefined){if(!Q()){if(c==1){T(e,d);return false}else{if(c>=2){return true}}}else{if(c===""){return false}else{return true}}}else{if(!Q()){T(e,d);return false}else{return true}}return true}function K(c){if((window.location.href.indexOf("wmp")>-1)||(navigator.userAgent.indexOf("Linux")>-1)){return true}else{if(S(V,c)){if(c.mediaType=="book"){if($("#downloadBook").length&&!$.browser.msie){$("#downloadBook").attr("target","emxframe");var d="<iframe id='myFrame' name='emxframe' src='about:blank' width='0' height='0' style='position:absolute; left:-2000px;'></iframe>";if($("#myFrame").length===0){$("body").prepend(d)}$("#myFrame").attr("src","about:blank");return true}return true}}else{c.e.preventDefault();return false}return true}}DUMAS.dlmInstallCheck=K;$("#enableDownloadManager").click(function(){E("enable",null);setTimeout(function(){window.location.reload(false)},"500");return false})})();function scrollContent(B,E,H,D,C){if(($(B).length==0)||($(E).length==0)){return }if($(B).height()>H){$(B).css("overflow","hidden");$(B).height(D+"px");var F=document.createElement("img");F.src="/images/ctlg/album/icons/more.png";F.className=C;$(E)[0].appendChild(F);var A=$(B).height();var G=$(B)[0].scrollHeight;$(F).click(function(){var I,K;if(G>$(B).height()){I=G;K="/images/ctlg/album/icons/hide.png"}else{I=A;K="/images/ctlg/album/icons/more.png"}var J=$(this);$(this).prev(B).animate({height:I},"medium",function(){J.attr("src",K)})})}}function placeButton(){if($("#lists").width()=="230"){$("img.reviewToggle").css("left","451px")}else{$("img.reviewToggle").css("left","709px")}}scrollContent("#theReview","#review","180","140","reviewToggle");scrollContent("#review","div.review","80","40","reviewToggle");placeButton();
