(function(E){var D={text:"",containerClass:"loadContainer",baseClass:"loadMsg",addClass:"",trigger:".loadMsgTrigger"},B="ajaxLoadMsg";function F(I){var H=jQuery.extend({},D,I);E.data(this,B,H);if(H.text){H.addClass+=" withText"}this.each(function(J){var K=E(this);K.addClass(B+J);E(H.trigger).bind("click.ajaxMsg",function(L){this.loading()})});return this}function A(I){var H=E.data(I,B);if(!H){H=E.extend({},D);jQuery.data(I,B,H)}return H}function G(){var I=A(this),J=this;if(!E("."+I.containerClass,J).length){J.prepend("<div class='"+I.containerClass+"'><div class='"+I.baseClass+" "+I.addClass+"'>"+I.text+"</div></div>")}var H=E("."+I.containerClass,J);H.bind("ajaxComplete.ajaxMsg, ajaxError.ajaxMsg",function(){C(J,I)}).fadeIn()}function C(){var H=A(this),I=this;E("."+H.containerClass,I).remove()}E.fn.extend({ajaxLoadMsg:F,loading:G,loaded:C})})(jQuery);jQuery.jScrollPane={active:[]};jQuery.fn.jScrollPane=function(A){A=jQuery.extend({scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false},A);return this.each(function(){var K=jQuery(this);if(jQuery(this).parent().is(".jScrollPaneContainer")){var x=A.maintainPosition?K.offset({relativeTo:jQuery(this).parent()[0]}).top:0;var I=jQuery(this).parent();var Y=I.innerWidth();var y=I.outerHeight();var J=y;if(I.unmousewheel){I.unmousewheel()}jQuery(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown",I).remove();K.css({top:0})}else{var x=0;this.originalPadding=K.css("paddingTop")+" "+K.css("paddingRight")+" "+K.css("paddingBottom")+" "+K.css("paddingLeft");this.originalSidePaddingTotal=(parseInt(K.css("paddingLeft"))||0)+(parseInt(K.css("paddingRight"))||0);var Y=K.innerWidth();var y=K.innerHeight();var J=y;K.wrap(jQuery("<div></div>").attr({className:"jScrollPaneContainer"}).css({height:y+2+"px",width:Y+"px"}));jQuery(document).bind("emchange",function(z,AA,p){K.jScrollPane(A)})}var j=this.originalSidePaddingTotal;var g={height:"auto",width:Y-A.scrollbarWidth-A.scrollbarMargin-j+"px"};if(A.scrollbarOnLeft){g.paddingLeft=A.scrollbarMargin+A.scrollbarWidth+"px"}else{g.paddingRight=A.scrollbarMargin+"px"}K.css(g);var h=K.outerHeight();var d=y/h;if(d<0.99){var E=K.parent();E.append(jQuery("<div></div>").attr({className:"jScrollPaneTrack"}).css({width:A.scrollbarWidth+"px"}).append(jQuery("<div></div>").attr({className:"jScrollPaneDrag"}).css({width:A.scrollbarWidth+"px"}).append(jQuery("<div></div>").attr({className:"jScrollPaneDragTop"}).css({width:A.scrollbarWidth+"px"}),jQuery("<div></div>").attr({className:"jScrollPaneDragBottom"}).css({width:A.scrollbarWidth+"px"}))));var u=jQuery(">.jScrollPaneTrack",E);var L=jQuery(">.jScrollPaneTrack .jScrollPaneDrag",E);if(A.showArrows){var b;var w;var O;var l;var e=function(){if(l>4||l%4==0){t(o+w*W)}l++};var H=function(p){jQuery("html").unbind("mouseup",H);b.removeClass("jScrollActiveArrowButton");clearInterval(O)};var U=function(){jQuery("html").bind("mouseup",H);b.addClass("jScrollActiveArrowButton");l=0;e();O=setInterval(e,100)};E.append(jQuery("<a></a>").attr({href:"javascript:;",className:"jScrollArrowUp"}).css({width:A.scrollbarWidth+"px"}).html("Scroll up").bind("mousedown",function(){b=jQuery(this);w=-1;U();this.blur();return false}),jQuery("<a></a>").attr({href:"javascript:;",className:"jScrollArrowDown"}).css({width:A.scrollbarWidth+"px"}).html("Scroll down").bind("mousedown",function(){b=jQuery(this);w=1;U();this.blur();return false}));var M=jQuery(">.jScrollArrowUp",E);var G=jQuery(">.jScrollArrowDown",E);if(A.arrowSize){J=y-A.arrowSize-A.arrowSize;u.css({height:J+"px",top:A.arrowSize+"px"})}else{var m=M.height();A.arrowSize=m;J=y-m-G.height();u.css({height:J+"px",top:m+"px"})}}var r=jQuery(this).css({position:"absolute",overflow:"visible"});var B;var T;var W;var o=0;var R=d*y/2;var V=function(z,AB){var AA=AB=="X"?"Left":"Top";return z["page"+AB]||(z["client"+AB]+(document.documentElement["scroll"+AA]||document.body["scroll"+AA]))||0};var a=function(){return false};var q=function(){i();B=L.offset(false);B.top-=o;T=J-L[0].offsetHeight;W=2*A.wheelSpeed*T/h};var C=function(p){q();R=V(p,"Y")-o-B.top;jQuery("html").bind("mouseup",P).bind("mousemove",c);if(jQuery.browser.msie){jQuery("html").bind("dragstart",a).bind("selectstart",a)}return false};var P=function(){jQuery("html").unbind("mouseup",P).unbind("mousemove",c);R=d*y/2;if(jQuery.browser.msie){jQuery("html").unbind("dragstart",a).unbind("selectstart",a)}};var t=function(z){z=z<0?0:(z>T?T:z);o=z;L.css({top:z+"px"});var AA=z/T;r.css({top:((y-h)*AA)+"px"});K.trigger("scroll");if(A.showArrows){M[z==0?"addClass":"removeClass"]("disabled");G[z==T?"addClass":"removeClass"]("disabled")}};var c=function(p){t(V(p,"Y")-B.top-R)};var k=Math.max(Math.min(d*(y-A.arrowSize*2),A.dragMaxHeight),A.dragMinHeight);L.css({height:k+"px"}).bind("mousedown",C);var f;var N;var F;var n=function(){if(N>8||N%4==0){t((o-((o-F)/2)))}N++};var v=function(){clearInterval(f);jQuery("html").unbind("mouseup",v).unbind("mousemove",Z)};var Z=function(p){F=V(p,"Y")-B.top-R};var Q=function(p){q();Z(p);N=0;jQuery("html").bind("mouseup",v).bind("mousemove",Z);f=setInterval(n,100);n()};u.bind("mousedown",Q);if(E.mousewheel){E.mousewheel(function(z,AB){q();i();var AA=o;t(o-AB*W);var p=AA!=o;return !p},false)}var D;var S;function X(){var p=(D-o)/A.animateStep;if(p>1||p<-1){t(o+p)}else{t(D);i()}}var i=function(){if(S){clearInterval(S);delete D}};var s=function(AA,p){if(typeof AA=="string"){$e=jQuery(AA,this);if(!$e.length){return }AA=$e.offset().top-K.offset().top}i();var z=-AA/(y-h)*T;if(p||!A.animateTo){t(z)}else{D=z;S=setInterval(X,A.animateInterval)}};K[0].scrollTo=s;K[0].scrollBy=function(z){var p=-parseInt(r.css("top"))||0;s(p+z)};q();s(-x,true);jQuery.jScrollPane.active.push(K[0])}else{K.css({height:y+"px",width:Y-this.originalSidePaddingTotal+"px",padding:this.originalPadding})}})};jQuery(window).bind("unload",function(){var B=jQuery.jScrollPane.active;for(var A=0;A<B.length;A++){B[A].scrollTo=B[A].scrollBy=null}});(function(A){A.event.special.mousewheel={setup:function(){var B=A.event.special.mousewheel.handler;if(A.browser.mozilla){A(this).bind("mousemove.mousewheel",function(C){A.data(this,"mwcursorposdata",{pageX:C.pageX,pageY:C.pageY,clientX:C.clientX,clientY:C.clientY})})}if(this.addEventListener){this.addEventListener((A.browser.mozilla?"DOMMouseScroll":"mousewheel"),B,false)}else{this.onmousewheel=B}},teardown:function(){var B=A.event.special.mousewheel.handler;A(this).unbind("mousemove.mousewheel");if(this.removeEventListener){this.removeEventListener((A.browser.mozilla?"DOMMouseScroll":"mousewheel"),B,false)}else{this.onmousewheel=function(){}}A.removeData(this,"mwcursorposdata")},handler:function(D){var B=Array.prototype.slice.call(arguments,1);D=A.event.fix(D||window.event);A.extend(D,A.data(this,"mwcursorposdata")||{});var E=0,C=true;if(D.wheelDelta){E=D.wheelDelta/120}if(D.detail){E=-D.detail/3}if(A.browser.opera){E=-D.wheelDelta}D.data=D.data||{};D.type="mousewheel";B.unshift(E);B.unshift(D);return A.event.handle.apply(this,B)}};A.fn.extend({mousewheel:function(B){return B?this.bind("mousewheel",B):this.trigger("mousewheel")},unmousewheel:function(B){return this.unbind("mousewheel",B)}})})(jQuery);(function(C){var E={maxDisplay:350,ellipsis:"...",triggerClass:"moreBox",moreLinkClass:"moreLink",hilightClass:"hilite",addClass:"",windowTitle:"",enableModalWindow:true},A="moreBox";function B(M){var L=jQuery.extend({},E,M);C.data(this,A,L);this.each(function(){var O=C(this),Q=Math.floor(Math.random()*1000000),P=L.maxDisplay,R=P*2,N=P*3;if(O.text().length>R){if(O.text().length<N||!L.enableModalWindow){I(O,L,Q)}else{J(O,L,Q)}}});return this}function I(M,N,O){var R,S,L,Q=N.maxDisplay,P="<a href='#' class='"+N.moreLinkClass+" trigger"+O+" "+N.addClass+"'>more.</a>",U=M.html(),T=M.height();S=U.substring(0,Q);M.html(S);L=M.height();M.html(U);M.height(L);M.parent().append(P);M.css({overflow:"hidden"});C(".trigger"+O+"").bind("click.moreBoxSlider",function(){R=C(this);if(R.hasClass("opened")){M.animate({height:L},500);R.removeClass("opened")}else{M.animate({height:T},500);R.addClass("opened")}H.call(R);return false})}function J(M,N,O){var S,P,Q,L,U,T=N.maxDisplay,X=N.ellipsis,R=D(M.html()),V=N.windowTitle?N.windowTitle:M.prev().html(),W=F(R,T).firstChunk;M.html(W+X);S="<a href='#' class='"+N.moreLinkClass+" trigger"+O+" "+N.addClass+"'>more >> </a>";M.parent().append(S);P="<div class='newBox"+O+" moreBoxBody moreBoxJqm'></div>";M.parent().append(P);U=K(F(R,T).firstChunk,N)+F(R,T).secondChunk;Q="<div id='moreBoxDisplay'>"+U+"</div>";C("div.newBox"+O).html(Q+"<a href='#' class='jqmMoreBoxClose'><img src='/images/core/icons/icon-close.gif'/></a>");L=document.createElement("h1");C(L).html(V);C(L).prependTo("div.newBox"+O);C("div.newBox"+O).jqm({closeClass:"jqmMoreBoxClose",trigger:".trigger"+O,overlay:40,toTop:"true",onShow:function(Y){Y.w.css("top",DUMAS.scrollTop()+40+"px").css("left",(DUMAS.clientWidth()/2)-(Y.w.width()/2)+"px").fadeIn("normal")}})}function H(){var L=C(this);L.text()=="more."?L.text("less."):L.text("more.")}function F(V,S){var Q=new RegExp("\\w+|[^\\w<]|<(/)?(\\w+)[^>]*(/)?>|<","g"),M=/^(?:[hb]r|img)$/i,L=0,U=[],X=[],N="",P="",O="",W={},R,T;while((L<S)&&(T=Q.exec(V))){if(T[2]){P+=T[0];if(!(T[3]||M.test(T[2]))){if(T[1]){U.pop();X.pop()}else{X.push(T[0]);U.push(T[2])}}}else{L+=T[0].length;if(L<S+T[0].length){P+=T[0]}}}R=U.length;while(R--){P+="</"+U[R]+">"}R=0;while(R<X.length){N+=X[R];R++}while((L<V.length)&&(T=Q.exec(V))){L+=T[0].length;if(L>S){O+=T[0]}}W={firstChunk:P,secondChunk:N+O};return W}function K(L,M){return"<span class='"+M.hilightClass+"'>"+L+"</span>"}function D(L){return L.replace(/(?:<[\/]*br*?[\/]*><[\/]*br*?[\/]*>)/g,"<p></p>")}function G(M){var L=C.data(M,A);if(!L){L=C.extend({},E);C.data(M,A,L)}return L}C.fn.extend({moreBox:B})})(jQuery);"use strict";function Carousel(d,B){var m,h,E=$("#"+d),N=B.itemSelector||".box",S=(B.friend)?$("#"+B.friend):$("#"+d),R=$("#"+d).find(".thegoods"),H=B.parentElement?R.find(B.parentElement):R,Z=E.find(".goup"),J=E.find(".godown"),M=false,T=0,e=H.children(N),I=H.children(N).length,P=B.fill||false,X=B.doHover||true,C=B.padVisual||false,o=B.highlight||false,A=true,W=B.widths||"static",p=B.motion||"linear",L=B.disposition||"horizontal",g=B.lessDots||0,Q=B.fullAmount||3,f=B.movingCallback||function(){},K=B.preScroll||function(q,i){if(q.size()<Q+1||H.find(".no").length>0){return false}else{return !(i==="up"&&q.current()>=q.size()-Q)}},F=B.postScroll||function(){return true};R.removeAttr("style");if(p==="circular"){e.each(function(q){$(this).attr("rel",q)})}if(B.addDotsToFrame){M=$("#"+B.addDotsToFrame).find(".dotControls")}function r(q){var i;$(q).unbind().mouseover(function(){if($(this).find(".border-div").length){i=$(this).find("img");$(this).find(".border-div").css({height:(parseInt(i.height(),10)-6)+"px",width:(parseInt(i.width(),10)-6)+"px"}).show()}}).mouseout(function(){$(this).find(".border-div").hide()})}function G(i){H.append(i)}if(I<=Q&&P){J.addClass("greyDown");Z.addClass("greyUp");M.hide();if(I<Q){for(h=0;h<Q-I;){G('<div class="no"></div>');h=h+1}}else{if(I===Q&&C){G('<div class="no"></div>')}}}else{if(!B.friend&&X){H.unbind().mouseover(function(i){i.stopPropagation();i.preventDefault();J.addClass("greenDown");Z.addClass("greenUp")}).mouseout(function(i){i.stopPropagation();i.preventDefault();J.removeClass("greenDown");Z.removeClass("greenUp")})}}function V(){var u,i,t,s,q=[],v=(L==="horizontal")?"left":"top";for(s=0;s<H.children(N).length;){u=parseInt(H.children(N).eq(s).offset()[v],10);i=parseInt(H.children(N).offset()[v],10);t=u-i;t=t-(t*2);q.push(t);s=s+1}return q}function n(i){return e.eq(i)}function Y(){T=(T+1>=H.children(N).length)?0:T+1}function l(){T=(T-1<=0)?0:T-1}function k(){return T}function D(i){return H.children(N).eq(i)}function b(){return H.children(N).length}S.find(".goup").unbind().click(c).end().find(".godown").unbind().click(U).end();if($("body").hasClass("ie6")){S.find(".goup, .godown").mouseover(function(){$(this).addClass("ie6fix")}).mouseout(function(){$(this).removeClass("ie6fix")})}function a(){if(M){var q=arguments[0]||T,i=M.find("a");$(i).each(function(s){$(this).unbind("click").click(function(){j(parseInt(s,10))}).removeClass("on")});$(i[q]).addClass("on").unbind().siblings().unbind("mouseover").unbind("mouseout").mouseover(function(){$(this).addClass("on")}).mouseout(function(){$(this).removeClass("on")})}}function O(t){var i,q=V(),s=arguments[1]?arguments[1]:"normal",u;if(p==="circular"){}else{i=K({size:b,box:H,current:k,fullAmount:Q},t);if(i){switch(t){case"up":Y();break;case"down":l();break;default:break}switch(L){case"horizontal":u={left:q[T]+"px"};break;case"vertical":u={top:q[T]+"px"};break}R.stop().animate(u,s,function(){a();F(t)})}}f(i,t)}function j(u){var s,q=e.eq(0).attr("rel"),i=[],t;if(p==="circular"){a(u);e.each(function(){t=$(this).attr("rel");i[t]=$(this).clone(true);if(t===u){return false}else{H.append(i[t]);$(this).remove()}})}else{s="normal";if(u-T>5||T-u>5){s="slow"}if(u<T){T=u+1>=H.children(N).length?0:u+1;O("down",s)}else{T=u-1<0?0:u-1;O("up",s)}}}function c(){return A&&O("up")}function U(){return A&&O("down")}if(M){M.html("");if(I-g>1){for(m=0;m<I-g;){M.append("<a>&nbsp;</a>");m=m+1}M.children().each(function(q){$(this).click(function(){j(parseInt(q,10))})});a()}}return{preScroll:K,postScroll:F,unlocked:A,size:b,current:k,addToCollection:G,goTo:j,move:O,Child:D,addHighlight:r}}function RemoteCarousel(D){var M,R=[],Q=D.numVisible,C=D.visibleEnd||Q,J=D.maxNumData,O=D.getHtmlFromData,K=D.getData,N=D.processHtml,A=false;M=new Carousel(D.id,D);function H(S){M.unlocked=true;A=true}function L(S){R=R.concat(S)}function B(S){M.unlocked=false;K(function(T){M.unlocked=true;if(!T){A=true}L(T);S(T)},H)}function I(S){var T=O(S,R);M.addToCollection(T);N(M.Child(S),S,R)}function P(){var S,T=M.size();for(S=T;S<Math.min(T+Q+1,R.length,J);){I(S);S=S+1}}B(P);function E(S){if(S.length>0){I(M.size());M.goTo(M.current()+1)}}function G(U,S){var T=U.size(),V=U.current()+1+Q;if(S==="down"){return U.current()>0}else{if(Math.min(V,J-1)<R.length&&U.current()<J-C){if(V>=T&&T<R.length){I(T)}return true}else{if(R.length<J){B(E)}return false}}}D.preScroll=G;function F(S,T){if(S+1+Q<M.size()){M.goTo(S);T(S,R)}else{B(function(U){P();M.goTo(S);T(S,R)})}}M.setMax=function(S){J=S};M.getMax=function(){return J};M.getNumVisible=function(){return Q};M.get=function(S){return R[S]};M.loadAndgoTo=F;return M}function ModalHoverTimer(B){var G,F,A,J,O,I;A=J=false;I=(B&&B.timeout)||2000;if(B&&B.hideCallback&&B.bounds){S(B.bounds,B.hideCallback,B.outOfBounds)}function H(){if(!F){F=setTimeout(O,I)}}function P(){if(F){clearTimeout(F);F=null}}function R(){P();O()}function Q(U){U.stopPropagation()}function E(){A=true;P()}function D(){A=false;if(!J){H()}}function L(){J=true;P()}function N(){J=false;if(!A){H()}}function T(V){var U=V?"bind":"unbind";$('input[type="text"], textarea',$(G))[U]("blur",N)[U]("focus",L)}function C(V){var U=V?"bind":"unbind";$(G)[U]("mouseover",E)[U]("mouseout",D)[U]("click",Q);T(V);$("html")[U]("click",R)}function M(){T(false);T(true)}function S(U,V,W){if(G){P();C(false)}O=V;G=U;A=!W;if(!A){H()}C(true)}var K={};K.setBounds=S;K.rebindFocusEvents=M;return K}MouseWindow.States={HIDDEN:"hidden",ANIMATING_IN:"animating_in",LOADING:"loading",SHOWING:"showing",TIMED_OUT_ANIMATING_OUT:"time_out_animating_out",ANIMATING_OUT:"animating_out"};MouseWindow.ActiveWindows={};MouseWindow.bodyMouseDown=false;MouseWindow.lastPage={};MouseWindow.getWindow=function(B){var A=$(B).parents(".mouseWindow");return(A.length>0)?MouseWindow.ActiveWindows[A.attr("id")]:null};MouseWindow.hideOthers=function(B){for(var A in MouseWindow.ActiveWindows){var C=MouseWindow.ActiveWindows[A];if(C!==B){C.hide()}}};MouseWindow.bodyMouseDownHandler=function(B){MouseWindow.bodyMouseDown=true;for(var A in MouseWindow.ActiveWindows){var C=MouseWindow.ActiveWindows[A];C.wasClicked=false}};MouseWindow.bodyMouseUpHandler=function(B){if(MouseWindow.bodyMouseDown){MouseWindow.bodyMouseDown=false;for(var A in MouseWindow.ActiveWindows){var C=MouseWindow.ActiveWindows[A];if(!C.wasClicked&&!C.ignoreClick&&C.state==MouseWindow.States.SHOWING){C.hide()}C.wasClicked=false;C.mouseDown=false}}};MouseWindow.bodyMouseMove=function(B){MouseWindow.lastPage.x=B.pageX;MouseWindow.lastPage.y=B.pageY;var C=MouseWindow.getWindow(B.target);for(var A in MouseWindow.ActiveWindows){var D=MouseWindow.ActiveWindows[A];D.setHovering(D===C)}};function MouseWindow(C,A){this.state=MouseWindow.States.HIDDEN;this.loadedText=null;this.timeoutStarted=false;this.saveBoxTimeout=null;this.wasClicked=false;this.mouseHovering=false;this.mouseDown=false;this.rawDivName=C;this.divName="#"+C;this.contentDiv="#"+A;var B=$(this.divName);B.css("display","none");B.css("visibility","visible");this.opacity=parseFloat(B.css("opacity"));this.bindEvents();MouseWindow.ActiveWindows[this.rawDivName]=this}MouseWindow.prototype={timeout:1500,contentShowTime:200,windowShowTime:200,windowHideTime:600,ignoreHover:false,ignoreClick:false,errorMessage:'<p class="error">We\'re sorry, a network problem temporarily prevented us from updating your list.</p>',loadingHtml:"<div style='width:100%; text-align:center; margin:0px 0 0 0'><p style='color:#999'>Processing...</p><img src='/images/oneclick/processing.gif' style='padding:0 5px 5px' /></div><div style='height: 5px;	background-color: #ff5b49; position: relative;bottom: 0; margin: 0;	padding: 0;	line-height: 0;	font-size: 0;'></div>",show:function(B,E){MouseWindow.hideOthers(this);var A=false;this.loadedText=null;if(typeof (B)=="string"){if(B.substring(0,4)=="http"||B.charAt(0)=="/"){this.loadAjax({cache:false,type:E||"GET",url:B})}else{A=true}}else{if(typeof (B)=="object"){this.loadAjax(B)}}if(this.state==MouseWindow.States.HIDDEN){this.animatedShow();var C=$(this.divName);if(C.length===0){throw"could not find a div with name "+this.divName}var D=C.offset();this.mouseHovering=(MouseWindow.lastPage.x>D.left)&&(MouseWindow.lastPage.x<(D.left+C.width()))&&(MouseWindow.lastPage.y>D.top)&&(MouseWindow.lastPage.y<(D.top+C.height()))}else{if(this.state==MouseWindow.States.SHOWING){this.setState(MouseWindow.States.LOADING);this.showLoading()}}if(A){this.setLoaded(B)}},hide:function(){this.loadedText=null;this.stopTimeout();if(this.state!=MouseWindow.States.HIDDEN&&this.state!=MouseWindow.States.ANIMATING_OUT&&this.state!=MouseWindow.States.TIMED_OUT_ANIMATING_OUT){this.setState(MouseWindow.States.ANIMATING_OUT);this.hideStarted();this.animatedHide()}},hideAnimation:function(A,B){$(this.divName).slideUp(A,B)},animatedHideDone:function(){var A=this;A.setState(MouseWindow.States.HIDDEN);$(A.contentDiv).html("");$(A.contentDiv).hide()},animatedHide:function(){var A=this;this.hideAnimation(this.windowHideTime,function(){A.animatedHideDone()})},showAnimation:function(A,B){$(this.divName).slideDown(A,B)},animatedShow:function(){this.setState(MouseWindow.States.ANIMATING_IN);var A=this;if(this.showStarted){this.showStarted()}this.showAnimation(this.windowHideTime,function(){A.animatedShowFinished()})},backAnimationDone:function(){this.setState(MouseWindow.States.SHOWING)},loadAjax:function(A){var B=this;A.beforeSend=function(C){B.beforeAjaxSend(C,this)};A.complete=function(C,D){B.ajaxComplete(C,D,this)};A.error=function(C,E,D){B.ajaxError(C,E,D,this)};A.success=function(C,D){B.ajaxSuccess(C,D,this)};this.showLoading();DUMAS.ajax(A)},beforeAjaxSend:function(B,A){},ajaxComplete:function(B,C,A){},ajaxSuccess:function(A,D,B){var C=$("response",A);if(C.length>0){this.setLoaded(C.text())}else{this.setLoaded(A)}},ajaxError:function(B,D,C,A){this.setLoaded(this.errorMessage)},setLoaded:function(A){this.stopTimeout();this.loadedText=A;if(this.state==MouseWindow.States.LOADING||this.state==MouseWindow.States.SHOWING){this.showImmediately()}},showImmediately:function(){this.stopTimeout();this.displayText(this.loadedText,true)},displayText:function(A,D){var E=this;var C=function(){var F=$(E.contentDiv);F.html(A);E.contentChanged();F.fadeIn(E.contentShowTime,function(){E.setState(MouseWindow.States.SHOWING)})};var B=$(this.contentDiv);if(jQuery.trim(B.html())!=""){B.fadeOut(E.contentShowTime,C)}else{C()}},showLoading:function(){if(this.loadingHtml!=null){this.displayText(this.loadingHtml)}},animatedShowFinished:function(){if(this.loadedText!=null){this.showImmediately()}else{this.setState(MouseWindow.States.LOADING);this.showLoading()}},hideStarted:function(){},contentChanged:function(){},startTimeout:function(){if(!this.timeoutStarted&&this.state==MouseWindow.States.SHOWING){var A=this;this.saveBoxTimeout=setTimeout(function(){A.timeoutStarted=false;A.hide();A.setState(MouseWindow.States.TIMED_OUT_ANIMATING_OUT)},this.timeout);this.timeoutStarted=true}},stopTimeout:function(){clearTimeout(this.saveBoxTimeout);this.timeoutStarted=false},setIgnoreHover:function(A){this.ignoreHover=A;this.stopTimeout();this.processMouseHover()},setState:function(A){this.state=A;this.stopTimeout();this.processMouseHover()},processMouseHover:function(){if(!this.ignoreHover){if(this.state==MouseWindow.States.SHOWING){if(this.mouseHovering){this.stopTimeout()}else{this.startTimeout()}}else{if(this.state==MouseWindow.States.TIMED_OUT_ANIMATING_OUT){if(this.mouseHovering&&this.backAnimation){var B=this;var A=$(this.divName);A.stop();this.backAnimation(this.windowHideTime,function(){B.backAnimationDone()})}}}}},setHovering:function(A){this.mouseHovering=A;this.processMouseHover()},mouseDownHandler:function(A){this.mouseDown=true},mouseUp:function(A){if(this.mouseDown){this.mouseDown=false;this.wasClicked=true}},bindEvents:function(){var A=$("body");var B=$(this.divName);var C=this;A.bind("mousedown.MouseWindow",MouseWindow.bodyMouseDownHandler);A.bind("mouseup.MouseWindow",MouseWindow.bodyMouseUpHandler);A.bind("mousemove.MouseWindow",MouseWindow.bodyMouseMove);B.bind("mousedown",function(D){C.mouseDownHandler(D)});B.mouseup(function(D){C.mouseUp(D)});if(!B.hasClass("mouseWindow")){B.addClass("mouseWindow")}}};function ContentGroup(A){this.content=new Array();this.triggerPrefix="#"+A}ContentGroup.prototype={setContent:function(A,B){this.content[A]=B},alterContent:function(A,B,C){this.content[A][B]=C},addContent:function(B){var A=this.content.length;this.setContent(A,B);$(this.triggerPrefix+A).click(function(D,C){return function(E){C.showContent(D);return false}}(A,this))},getContent:function(A){return this.content[A]},getSize:function(){return this.content.length},showContent:function(A){}};MouseWindowGroup.prototype=new ContentGroup();function MouseWindowGroup(E,B,A,C){ContentGroup.apply(this,[A]);this.wins=new Array(this.numWindows);this.showing=new Array(this.wins.length);for(var D=0;D<this.wins.length;D++){this.wins[D]=new MouseWindow(E+D,B+D);this.showing[D]=-1}this.containerPrefix="#"+C}MouseWindowGroup.ActiveGroups={};MouseWindowGroup.prototype.numWindows=2;MouseWindowGroup.prototype.showContent=function(A){var B=this.getFreeWindow();if(B>=0){if(this.showing[B]>=0){$(this.containerPrefix+this.showing[B]).html("")}$(this.containerPrefix+A).html(this.buildContainerHtml(B,this.content[A]));this.wins[B].bindEvents();this.initWindow(this.wins[B],A,this.content[A]);this.wins[B].show(this.getContentHtml(A,this.content[A]));this.showing[B]=A}};MouseWindowGroup.prototype.showWindow=function(A,B){};MouseWindowGroup.prototype.getFreeWindow=function(){for(var A in this.wins){if(this.wins[A].state==MouseWindow.States.HIDDEN){return A}}return -1};MouseWindowGroup.prototype.getContentHtmlByIndex=function(A){return this.getContentHtml(A,this.content[A])};MouseWindowGroup.prototype.getContainerHtmlByIndex=function(A){return this.buildContainerHtml(A,this.content[A])};MouseWindowGroup.prototype.each=function(C,B){for(var A=0;A<this.wins.length;A++){this.wins[A][C].apply(this.wins[A],B)}};MouseWindowGroup.prototype.buildContainerHtml=function(A,B){};MouseWindowGroup.prototype.initWindow=function(C,A,B){};MouseWindowGroup.prototype.getContentHtml=function(A,B){};(function(){var I,M,E,Q;defaultOptions={tTextSaved:"Saved for later",tTextSave:"Save for later&nbsp;",tTextSaving:"Saving...",tTextRemoving:"Removing...",tTextError:"Error!",tTextSaveTitle:null,tTextSavedTitle:null,tTextChange:true,tClassSaved:"saved",tClassSaving:"saving",tClassRemoving:"removing",tClassSave:"save",inline:false};Q=jQuery.extend({},defaultOptions);H();function A(R,T){var S=I.getContent(R);return(S.options!=undefined&&S.options[T]!=undefined)?S.options[T]:Q[T]}function P(T,R,S){M=T;E=R;DUMAS.SFL.active=S}function F(R){if(!Q.inline){I.each("setIgnoreHover",[true])}$(I.triggerPrefix+R).click()}function H(){I=new MouseWindowGroup("saveForLaterBox_","saveForLaterContent_","saveForLaterTrigger_","saveForLaterContainer_");for(var R=0;R<I.wins.length;R++){I.wins[R].loadingHtml=null}I.innerContainerHtml=function(S){return['<div class="dialog">','<div id="saveForLaterInner" class="listContent">','<div id="saveForLaterContent_',S,'"></div>','<img src="/images/core/icon-close.gif" class="close" alt="close">','<div class="t"></div>',"</div>",'<div class="b">',"<div></div>","</div>","</div>"].join("")};I.buildContainerHtml=function(S,T){return['<div id="saveForLaterBox_',S,'" class="saveForLaterBox">',this.innerContainerHtml(S),"</div>"].join("")};I.getContentHtml=function(S,T){return(T.saved?D(T):L(T)+true)};I.initWindow=function(T,U,S){T.ajaxSuccess=function(V){return function(X,Y,W){O(V,X,Y,W);MouseWindow.prototype.ajaxSuccess.apply(this,arguments)}}(U);T.hideStarted=function(){this.setIgnoreHover(false)};T.contentChanged=function(V){return function(){var W=$(this.contentDiv);var X=this;$("a.remove",W).click(function(){X.show(L(I.getContent(V))+false);return false})}}(U);T.hideAnimation=function(V,W){$(this.divName).fadeOut(V,W)};T.showAnimation=function(V,W){$(this.divName).fadeIn(V,W)};T.backAnimation=function(V,W){$(this.divName).fadeTo(V,1,W)};J(T,$(T.divName))};I.showContent=function(S){if(A(S,"inline")){G.apply(this,arguments)}else{MouseWindowGroup.prototype.showContent.apply(this,arguments)}}}function G(S){var T=I.getContent(S);var R=$(I.triggerPrefix+S);if(!T.loading){I.alterContent(S,"loading",true);if(A(S,"tTextChange")){$(".saveForLaterText",R).html(T.saved?A(S,"tTextRemoving"):A(S,"tTextSaving"))}R.removeClass(T.saved?A(S,"tClassSaved"):A(S,"tClassSave"));R.setClass(T.saved,A(S,"tClassRemoving"),A(S,"tClassSaving"));DUMAS.ajax({url:L(T)+!T.saved,success:function(U){return function(X,Y,W){O(U,X,Y,W);var V=$("response",X);if(V.length>0&&V.attr("error")=="true"){W.error(X,Y,null)}}}(S),error:function(U){return function(V,X,W){N(U,V,X,W)}}(S),complete:function(U){return function(V,W){I.alterContent(U,"loading",false)}}(S)})}}function L(R){return["/lists/ajax.html?method=addToList&contentType=",R.contentType,"&contentIds=",R.contentId,"&listId=",E,"&saving="].join("")}function O(V,U,W,T){var R=$("response",U);if(R.length>0){I.alterContent(V,"saved",R.attr("saved")=="true");var S=R.attr("numSaved");if(S!="Unknown"){M=S;$("#numSavedForLaterItems").html(S);K(V,$("#savedItemsText"))}C(V)}}function K(R,S){var T="Saved Items";if(I.getContent(R).saved){S.text("Saved!")}else{S.text("Removed!")}S.textColorFade({startColor:"#1B1B1B",newColor:"#70C80C",pauseTime:3000,onComplete:function(){S.text(T)}})}function N(S,R,U,T){if(A(S,"tTextChange")){$(I.triggerPrefix+S).html(A(S,"tTextError"));setTimeout(function(){if(!I.getContent(S).loading){$(I.triggerPrefix+S).html(A(S,"tTextError"))}},2000)}}function B(R){return R.contentType=="A"?"album":R.contentType=="B"?"book":"song"}function D(R){return['<div id="alreadySaved">','<p class="saved">Already saved</p>','<div id="result"><p class="albumStatus">This ',B(R)," is already saved</p>",'<p><a class="remove" href="#">Remove it from your list.</a></p>','<p><a href="/profile/saveforlater.html">View all saved items (',M,")</a></p></div></div>"].join("")}function J(S,R){$("img.close",R).click(function(){if(S.state==MouseWindow.States.SHOWING&&!S.ignoreClick){S.hide()}return false})}function C(T,R){var S=$((R)?R:I.triggerPrefix+T);if(I.getContent(T).saved){S.removeClass(A(T,"tClassSaving")+" "+A(T,"tClassRemoving")+" "+A(T,"tClassSave"));S.addClass(A(T,"tClassSaved"));if(A(T,"tTextChange")){$(".saveForLaterText",S).html(A(T,"tTextSaved"))}S.attr("title",A(T,"tTextSavedTitle")==null?"This "+B(T)+" is already saved":A(T,"tTextSavedTitle"))}else{S.removeClass(A(T,"tClassSaving")+" "+A(T,"tClassRemoving")+" "+A(T,"tClassSaved"));S.addClass(A(T,"tClassSave"));if(A(T,"tTextChange")){$(".saveForLaterText",S).html(A(T,"tTextSave"))}S.attr("title",A(T,"tTextSaveTitle")==null?"Click to add this "+B(T)+" to your Save for Later list":A(T,"tTextSaveTitle"))}}DUMAS.SFL={init:P,addContent:function(){I.addContent.apply(I,arguments)},fireClick:F,getUrlPrefix:L,ajaxSuccess:O,setText:C,group:I}})();"use strict";(function(){var F,C,G,J,L,K=new ModalHoverTimer(),O;function B(T){F.attr("style","width: 402px !important; max-width: 402px;");C.attr("style","width: 384px !important; max-width: 384px;");G.hide();J.addClass("leftBumperOn");L.addClass("rightBumperOn");$(T).addClass("open")}function D(){G.hide();J.removeClass("leftBumperOn");L.removeClass("rightBumperOn");F.removeAttr("style");C.removeAttr("style");O.removeAttr("style").find("li").each(function(){$(this).find("a").removeClass("on open")});$("#fb_connect").find(".faqs li p").hide()}function E(U,T){$(U).mouseover(function(){O.addClass(T)}).mouseout(function(){O.removeClass(T)})}function M(){O.find("li").each(function(T){$(this).find("a").click(function(){if($(this).attr("rel")==="unauthorized"||$(this).attr("rel")==="unsaved"||$(this).hasClass("unauthorized")){return true}else{if($("#"+$(this).attr("id")+"Box").is(":hidden")||$(this).hasClass("facebookConnect")&&$("#facebookConnectBox").is(":hidden")){O.find("li").each(function(){$(this).find("a").removeClass("on open")});B(this);return false}else{$("#"+$(this).attr("id")+"Box").hide();D();return false}}})})}function P(U,V,T){DUMAS.SFL.ajaxSuccess(0,U,V,T);DUMAS.SFL.setText(0,"#saveForLater");$("#sfl").html($("response",U).text());$("#saveForLaterBox").show()}function R(){DUMAS.SFL.addContent=function(){DUMAS.SFL.group.addContent.apply(DUMAS.SFL.group,arguments);if(DUMAS.SFL.group.getSize()===1){DUMAS.SFL.setText(0,"#saveForLater")}};$("#sfl a.remove").click(function(){$.ajax({url:DUMAS.SFL.getUrlPrefix(DUMAS.SFL.group.getContent(0))+false+"&js=yes",success:P});return false});$("#saveForLater").each(function(){var T;E(this,"sfl_on");$(this).click(function(V){var U=$(this);if(!U.hasClass("authorized")){return true}else{if(U.attr("rel")==="saved"||U.attr("rel")==="toggleClosed"){U.attr("rel","toggleOpen");D();return false}else{switch(U.attr("rel")){case"unsaved":U.attr("rel","saved");break;case"toggleOpen":U.attr("rel","toggleClosed");break;default:break}V.stopPropagation();K.setBounds("#saveForLater, #saveForLaterBox",function(){$("#saveForLaterBox").hide();$("#saveForLater").attr("rel","toggleOpen");D()});T=DUMAS.SFL.group.getContentHtmlByIndex(0);if(T.indexOf("/")===0){$.ajax({url:T+"&js=yes",success:function(X,Y,W){P(X,Y,W)}})}else{$("#sfl").html(T);$("#saveForLaterBox").show()}return false}}})})}function I(){$("#addToList").each(function(){E(this,"atl_on");$(this).click(function(U){if($(this).attr("rel").length&&$(this).attr("rel")==="unauthorized"){return true}else{if($(this).hasClass("sighImOpen")){$(this).removeClass("sighImOpen");D();return false}else{$(this).addClass("sighImOpen");U.stopPropagation();K.setBounds("#addToList, #addToListBox",function(){$("#addToListBox").hide();$("#addToList").removeClass("sighImOpen");D()});$("#addToListBox").show();var T=DUMAS.ATL.group.getContentHtml(0,DUMAS.ATL.group.getContent(0))+"&js=yes&alt=true";$("#loadATL").load(T,function(){K.rebindFocusEvents();$("#loadATL .scroll-pane").jScrollPane()});return false}}})})}function N(T){$.ajax({url:T,success:function(U){$("#addToListContentFull").html($("response",U).text());$("#addToListContentFull").addClass("scroll-pane");$("#addToListContentFull p").show();$("#addToListContentFull p:first").css({fontWeight:"bold"});$("#loadAtl .scroll-pane").jScrollPane()}})}function S(T){DUMAS.ATL.bindAddToListEvents($(T),function(U){N(U.action+"?"+$(U).serialize()+"&js=yes")});DUMAS.ATL.bindAddToListLinks($(T),function(U){N(U.href+"&js=yes")})}DUMAS.initAtlFullWin=S;function Q(){$("#tellAFriend").each(function(){E(this,"taf_on");$(this).click(function(T){if($(this).attr("rel")==="unauthorized"){}else{T.stopPropagation();K.setBounds("#tellAFriend, #tellAFriendBox",function(){$("#tellAFriendBox").hide();D()});$("#tafRequest").show();$("#tafResponse").hide();if($("#tellAFriend").hasClass("open")){$("#tellAFriendBox").show()}else{$("#tellAFriendBox").hide()}}})});$("#recipientAddresses").focus(function(){$(this).val("").get(0).focus()});$("#rulesPop").click(function(){var V,U,Y,W=525,T=500,X;U=Math.max(0,0.5*(screen.availWidth-W));Y=Math.max(0,0.5*(screen.availHeight-T));V+="left="+U+",top="+Y+",";V+="screenX="+U+",screenY="+Y+",";X=window.open("/taf/rules-pop.html","",V+"width=525,height=500,toolbars=false,location=false,status=false,menubar=false,scrollbars=yes,resizable=true");X.focus();return false});$("#tafForm").submit(function(){var V=$(this),Y=$("#facebook_share_tellafriend"),U=false,X=$("#recipientAddresses").val(),W="",T=new RegExp(/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9])+(\.[a-zA-Z0-9_-]+)+$/);if(X.match(",")){X=X.split(",")}else{X=X.split(" ")}$(X).each(function(Z){if(T.test(jQuery.trim(this))){W+="<li>"+this+"</li>"}else{U=true}});V.find(".email_error")[U?"show":"hide"]();V.find(".msg_error")[$("#personalMessage").val()===""?"show":"hide"]();if(U===true){return false}else{$.post("/taf/taf.html?step=processJSON",$("#tafForm").serialize(),function(){$("#tafRequest, .email_error, .msg_error").hide();$("#recipientAddresses").val("Use commas or spaces between each email address...");$("#tafResponse").show();$("#taf ul").html(W);if(Y.is(":checked")){var b,a=FBConnect.getSubject(),c,Z,d=function(){return" shared "+b+" with "+X.length+" friend"+(X.length===1?"":"s")+" at "+FBConnect.geteMusicLink(true)};switch(Y.attr("facebook_type")){case"tellafriend_album":b=a.primaryLink+" by "+a.secondaryLink;FBConnect.logEvent("tellafriend_album");c=jQuery.extend({},FBConnect.FACEBOOK_ALBUM_JSON,{oneLineToken:d()});FBConnect.getFeedDialog(FBConnect.primary_template_id,c);break;case"tellafriend_artist":b=a.primaryLink;FBConnect.logEvent("tellafriend_artist");Z=jQuery.extend({},FBConnect.FACEBOOK_ARTIST_JSON,{oneLineToken:d()});FBConnect.getFeedDialog(FBConnect.primary_template_id,Z);break}}});return false}})}function A(){var T=$("#fb_connect").find(".faqs li");$(".facebookConnect").each(function(){E(this,"fb_on");$(this).click(function(U){U.stopPropagation();K.setBounds(".facebookConnect, #facebookConnectBox",function(){$("#facebookConnectBox").hide();D()});if($(this).hasClass("open")){$("#facebookConnectBox").show()}else{$("#facebookConnectBox").hide();T.find("p").hide()}})});T.find("a").click(function(){var U=$(this).parent().find("p");$(this).parent().siblings().find("p").hide();if(U.is(":visible")){U.hide()}else{U.slideDown("fast")}return false})}function H(T,U){if($(T).length){U()}}$(document).ready(function(){F=$("#actionsModule");C=$("#actions");G=$(".actionBox");J=$("#leftBumper");L=$("#rightBumper");O=C.find("ul");M();H("#saveForLater",R);H("#addToList",I);H("#tellAFriend",Q);H("#facebookConnect",A)})}());(function(){DUMAS.registerModule("relatedEditorial",A,null);var D,G,E,H;function C(){return"/artist/relatedEditorial.html?artistID="+E.artist+"&genreID="+E.genre}function B(){return"/album/relatedEditorial.html?albumID="+E.album+"&artistID="+E.artist+"&genreID="+E.genre}function F(){if(G){return{fullAmount:1}}else{return{fullAmount:2,lessDots:1,padVisual:true}}}function A(){if(!$.browser.opera&&DUMAS.relatedEditorial){D=($("body").attr("id")==="albumPage");G=!D;H=$("#loadRelEdit");E=DUMAS.relatedEditorial;$.ajax({type:"get",url:D?B():C(),error:function(){H.hide()},success:function(I){H.html(I);H.update()},complete:function(){Carousel("eIterables",jQuery.extend({},F(),{addDotsToFrame:"relEditorial",fill:true}));$("#eIterables .box").click(function(){location.href=$(this).find(".link").attr("href")})}})}}})();var DUMAS=jQuery.extend(DUMAS,{});(function(){var jsEmId,jsUserRating,userRatings=[],domain,starsTxt=["Rate it!",'"I Hate It"','"I Don\'t Like It"','"It\'s OK"','"I Like It"','"I Love It"'];function setUserRating(id,r,d,size,cRating){jsEmId=id;r==""?r=0:r=r;jsUserRating=r;userRatings[id]=r;domain=d;if(cRating){cRating=eval(cRating)}else{cRating=0}init(id,size,cRating);setRateText(id,r)}function init(id,size,cRating){var target;$("li[id^='rating_img_"+id+"']").click(theClick).mouseover(theOver).mouseout(theOut);if(size=="small"){target=$("li[id^='rating_img_"+id+"']:first").parents("div.smallRatings");setTooltip($("#recentBuzz .smallStar"));if(userRatings[id]==0&&cRating>0){target.find(".smallUser").hide().end().find(".smallCom").show()}else{target.find(".smallUser").show().end().find(".smallCom").hide()}target.hover(function(){target.find(".smallUser").show().end().find(".smallCom").hide()},function(){if(userRatings[id]==0&&cRating>0){target.find(".smallUser").hide().end().find(".smallCom").show()}})}else{target=$("li[id^='rating_img_"+id+"']:first").parents(".albumRating, .rateContainer");setTooltip(target.find(".mediumStar"));if(userRatings[id]==0&&cRating>0){$("#userRate").hide();$("#comRate").show()}else{$("#userRate",target).show();$("#comRate",target).hide()}$(".rateContainer").hover(function(){$("#userRate",target).show();$("#comRate",target).hide()},function(){if(userRatings[id]==0&&cRating>0){$("#userRate",target).hide();$("#comRate",target).show()}})}}function setTooltip(jq_Ul){jq_Ul.each(function(i){var starUl=$(this);var starLi=starUl.find("li");starLi.each(function(i){$(this).attr("title",starsTxt[i+1])})})}function setRateText(id,r){$("#rating_txt_"+id).html(starsTxt[r])}function sendRating(emID,rating,domain){var ratingInput=document.getElementById("ratingForm_"+emID+"_rating");ratingInput.value=rating;var form=document.getElementById("ratingForm_"+emID);form.submit()}function ratingsRedirect(url,rootId){rootId=$("#"+rootId);$("#comRate, .smallCom",rootId).click(function(){window.location=url;return false})}function theClick(event){var elem=$(event.target),tmp=elem.attr("id");var rating=tmp.substring(tmp.length-1,tmp.length);var localEmId=tmp.substring(tmp.length-16,tmp.length-2);userRatings[localEmId]=rating;sendRating(localEmId,rating,domain);jsUserRating=userRatings[localEmId];if($("body").hasClass("facebook")&&FBConnect.getConnectStatus()){var eRate=(rating?rating:$(this).attr("rating"))+" stars ",subject,metaData=FBConnect.getSubject(),publish=FacebookAPIManager.Singletons.getPublish();function getOneLine(){if(publish){return"rated "+subject+" at eMusic: "+eRate}else{return"rated "+subject+" at "+ConnectJSONManager.geteMusicLink(true)+": "+eRate}}switch(elem.attr("facebook_type")){case"album_rating":subject=metaData[publish?"primaryName":"primaryLink"]+" by "+metaData[publish?"secondaryName":"secondaryLink"];FBConnect.FACEBOOK_ALBUM_RATING_JSON=jQuery.extend({},FBConnect.FACEBOOK_ALBUM_JSON,publish?{message:getOneLine()}:{oneLineToken:getOneLine()});break;case"artist_rating":subject=metaData[publish?"primaryName":"primaryLink"];FBConnect.FACEBOOK_ARTIST_RATING_JSON=jQuery.extend({},FBConnect.FACEBOOK_ARTIST_JSON,publish?{message:getOneLine()}:{oneLineToken:getOneLine()});break}$(".facebook_ratings_alert, .facebook_ratings_action").show()}}function theOver(event){var tmp=$(event.target).attr("id");var rating=tmp.substring(tmp.length-1,tmp.length);var localEmId=tmp.substring(tmp.length-16,tmp.length-2);for(var i=1;i<6;i++){if(i<=rating){$("#rating_img_"+localEmId+"_"+i).addClass("uRating").removeClass("offStar")}else{$("#rating_img_"+localEmId+"_"+i).addClass("offStar").removeClass("uRating")}}$("#rating_txt_"+localEmId).html(starsTxt[rating])}function theOut(event){var tmp=$(event.target).attr("id");var localEmId=tmp.substring(tmp.length-16,tmp.length-2);var userRating=userRatings[localEmId];updateRating(localEmId,userRating)}function updateRating(localEmId,userRating){for(var i=1;i<6;i++){if(i<=userRating){$("#rating_img_"+localEmId+"_"+i).addClass("uRating").removeClass("offStar")}else{$("#rating_img_"+localEmId+"_"+i).addClass("offStar").removeClass("uRating")}}$("#rating_txt_"+localEmId).html(starsTxt[userRating])}function refresh(id){var target=$("div[id^='rateContainer_"+id+"']");if($(".mediumStar .uRating",target).length){$("#userRate",target).show();$("#comRate",target).hide()}}DUMAS.RATINGS={refresh:function(id){refresh(id)},setUserRating:function(emId,rating,domain,size,cRating){setUserRating(emId,rating,domain,size,cRating)},redirect:function(url,rootId){ratingsRedirect(url,rootId)}}})();function cutItDown(H,G,B,A){var J=(typeof H=="string")?document.getElementsByTagName(H):H;for(var I=0;I<J.length;I++){var P=J[I];if((P.className==A)||(A==null)){for(var F=0;F<P.childNodes.length;F++){var Q=P.childNodes[F];if(Q.nodeType==3){if(!/\S/.test(Q.nodeValue)){P.removeChild(Q)}Q.nodeValue=Q.nodeValue.replace(new RegExp(/^\s+/),"");Q.nodeValue=Q.nodeValue.replace(new RegExp(/\s+$/),"");var E=Q.nodeValue.split(" ");for(var D=0;D<E.length;D++){try{if(E[D].length>G){var C=E[D];var K="";while(E[D].length>G){var L;L=E[D].slice(0,G);E[D]=E[D].substring(G,E[D].length);L+=B;K+=L;if((E[D].length<=G)&&(E[D].length!=0)){K+=E[D]}}var O=Q.nodeValue;O=O.replace(C,K);var N=document.createTextNode(O);P.replaceChild(N,Q)}}catch(M){}}}}}}}$(function(){cutItDown($("p.userTitle"),"15","- ");cutItDown($("p.userReviewText"),"20","- ");cutItDown("td","45","... ","track");cutItDown("a","22","- ","artist");cutItDown("a","22","- ","album");cutItDown("a","22","- ","label")});(function(){DUMAS.registerModule("sflInline",K,D);var E,B,N,H,J=".saveForLaterLink",A,G;function I(O){return O.settings({savedForLater:false,saveText:B.saveText,savedText:B.savedText,contentType:null,contentId:null})}function C(){var O=$(this),P;P=I(O);O.setClass(P.savedForLater,"saved").find("span.sflText").text(P.savedForLater?P.savedText:P.saveText)}function M(O){var P=I(O);$("[data-contentId = "+P.contentId+"]").filter("[data-contentType = "+P.contentType+"], "+J).set("savedForLater",P.savedForLater).each(C)}function F(O){window.location="https://"+window.location.host+"/security/signon.html?URL="+encodeURIComponent(N+O+"&redirect="+encodeURIComponent(window.location.href))}function L(){return function(Q){var R,P=$(this),O;R=I(P);O="contentType="+R.contentType+"&contentIds="+R.contentId+"&saving="+!R.savedForLater;if(!G){window.location="/"}else{if(A){jQuery.post(H+O,function(S){S=$("response",S);if(S.attr("auth")==="false"){F(O)}P.parents().andSelf().filter(J).set("savedForLater",S.attr("saved")==="true");M(P);$("#numSavedForLaterItems").html(S.attr("numSaved"))})}else{F(O)}}Q.stopPropagation();Q.preventDefault();return false}}function K(O){if(O=O.SFL){E=O.listId;A=O.auth;G=O.userKnown;B={savedText:O.savedText||"Saved!",saveText:O.saveText||"Save it!"};N="/lists/ajax.html?xml=true&method=addToList&listId="+E+"&";H=N+"js=yes&"}}function D(O){O.find(".saveForLaterLink:not(.sflDone)").addClass("sflDone").each(C).find("*").andSelf().click(L())}DUMAS.initSaveForLaterTag=function(){K(this)}})();function WebServiceFeed(A){var B,C;if(!A||!A.baseUrl){throw"must at least specify baseUrl!"}B=jQuery.extend({searchOptions:{},baseSearchOptions:{},jsonFormat:"format=json&callback=",pageSize:10,pageParam:"page",pageSizeParam:"page-size",pageIndexed:true,useQuotes:true,dataHandler:function(){throw"no dataHandler supplied!"},page:0,currentParams:{}},A);B=jQuery.extend(A,B);B.defaultParams=jQuery.extend({},B.baseSearchOptions,B.searchOptions);jQuery.extend(B.currentParams,B.defaultParams);function G(L,K,I,J){$.ajax({type:"get",dataType:"jsonp",timeout:3500,url:B.baseUrl+"?"+B.jsonFormat+"?",data:jQuery.extend({},B.currentParams,K),success:function(M,O){if(!O||O==="success"){try{L(I?I(M):M)}catch(N){if(J){J(N,M,O)}}}else{if(J){J(undefined,M,O)}}}})}function H(L){var I,K,N,M,J={};K=L.indexOf("?");if(K>=0){if(K>1){B.baseUrl=L.substring(0,K)}B.currentParams=jQuery.extend({},B.searchOptions,jQuery.deserialize(L));jQuery.extend(B.currentParams,B.baseSearchOptions)}else{J.baseUrl=L}}function E(I){if(!B.queryParam){throw"must specify queryParam!"}B.currentParams=jQuery.extend({},B.defaultParams);B.currentParams[B.queryParam]=B.useQuotes?'"'+I+'"':I}function F(K,J,I){D(B.page+1,K,J,I)}function D(L,M,J,I){var K={};B.page=L;K[B.pageParam]=B.pageIndexed?B.page:(B.page-1)*B.pageSize+1;K[B.pageSizeParam]=B.pageSize;G(M,K,(I!==undefined)?I:B.dataHandler,J)}return jQuery.extend(C,{specifyAllSearchOptionsByUrl:H,specifySearchString:E,jqJsonRequest:G,getResults:D,nextResults:F})}function YouTubeFeed(B){var D,A;D=jQuery.extend({baseUrl:"http://gdata.youtube.com/feeds/api/videos/-/Music/",baseSearchOptions:{client:"youTubeFeed-eMusic-1.0"},searchOptions:{format:5,orderby:"relevance",racy:"exclude"},jsonFormat:"alt=json-in-script&callback=",queryParam:"vq",pageParam:"start-index",pageSizeParam:"max-results",pageIndexed:false,dataHandler:C},B);A=new WebServiceFeed(D);function C(M){var I=[],O=M.feed.entry;I.total=parseInt(M.feed.openSearch$totalResults.$t);for(var J=0;J<O.length;J++){var L=O[J].media$group.media$thumbnail,P=0,E=0;for(var H=1;H<L.length;H++){if(parseInt(L[H].height,10)>parseInt(L[P].height,10)){P=H}}for(var G=0;G<L.length;G++){if(G!=P&&L[G].time===L[P].time){E=G}}var K=O[J].media$group.media$content,N=-1;for(var F=0;F<K.length;F++){if(K[F].isDefault==true||K[F].yt$format==5){N=F;break}}I.push({title:O[J].title.$t,thumbSmall:L[E],thumbLarge:L[P],description:O[J].content.$t,embed:(N===-1)?null:K[N]})}if(I.length===0){throw"search returned no viable results"}return I}return A}FlickrFeed.months=["January","February","March","April","May","June","July","August","September","October","November","December"];FlickrFeed.licenseUrls=["http://creativecommons.org/licenses/by/2.0/","http://creativecommons.org/licenses/by-sa/2.0/","http://creativecommons.org/licenses/by-nd/2.0/","http://www.flickr.com/commons/usage/"];function FlickrFeed(K){var F=jQuery.extend({baseUrl:"http://api.flickr.com/services/rest/",baseSearchOptions:{api_key:"12d99998c6de883b65269837fd8e9849",method:"flickr.photos.search",extras:"date_upload,owner_name,license"},searchOptions:{sort:"relevance",safe_search:1,license:"4,5,6,7"},jsonFormat:"format=json&jsoncallback=",pageSizeParam:"per_page",queryParam:"text"},K);var D;var H;var J=new WebServiceFeed(F);function E(O,M){var L=[];for(var N=0;N<O.length;N++){if(!M||!M[O[N].owner.id]){L.push(O[N])}}return L}function B(N,O){var L;if(D){O(D)}else{var M=[];for(L=0;L<N.length;L++){M.push(N[L].owner.id)}$.getJSON("/pics/blacklisted.html?callback=?&ids="+M.join(","),function(P,Q){O(!Q||Q=="success"?P:{})})}}function C(R,N,P){var Q,O=0,M=[],L=null;Q=function(V){var U,T,S=true;U=I(V);B(U,function(W){T=E(U,W);O+=T.length;L=(L||U.numGrayListed)-U.length+O;M=M.concat(T);if(O<F.pageSize&&(F.pageSize*F.page)<U.numGrayListed){J.nextResults(Q,N,null);S=false}else{if(P){M.numWhiteListed=L;R(M)}}if(!P&&(S||T.length>0)){T.numWhiteListed=L;R(T)}})};J.nextResults(Q,N,null)}function I(Q){var P=[],R=Q.photos.photo;P.numGrayListed=parseInt(Q.photos.total);for(var O=0;O<R.length;O++){var N=R[O];var M=new Date();var L="http://farm"+N.farm+".static.flickr.com/"+N.server+"/"+N.id+"_";M.setTime(N.dateupload*1000);P.push({title:N.title,id:N.id,url:"http://www.flickr.com/photos/"+N.owner+"/"+N.id,thumb:{url:L+N.secret+"_t.jpg"},large:{url:L+N.secret+".jpg"},owner:{name:N.ownername,id:N.owner,profile:"http://www.flickr.com/people/"+N.owner+"/",stream:"http://www.flickr.com/photos/"+N.owner+"/"},licenseUrl:FlickrFeed.licenseUrls[(parseInt(N.license)||7)-4],date:FlickrFeed.months[M.getMonth()]+" "+M.getDate()+", "+M.getFullYear()})}return P}function A(L){return L.person.realname._content}function G(M,N,L){J.jqJsonRequest(N,{method:"flickr.people.getInfo",user_id:M},L)}J.searchPhotosJsonScript=C;J.getRealName=G;J.setBlacklist=function(L){D=L};return J}WikipediaFeed.grabUsefulHtml=/<(p|h\d)>(.*?)<\/\1>/img;WikipediaFeed.stripHtml=/<.*?>/mg;WikipediaFeed.linksToSpans=/<a .*?>(.*?)<\/a>/img;WikipediaFeed.edits=/<span class="editsection".*?<\/span>/img;WikipediaFeed.headers5=/<h5>.*?<\/h5>(.*?)(?=$|<h(?:5|4|3|2|1)>)/img;WikipediaFeed.headers4=/<h4>.*?<\/h4>(.*?)(?=$|<h(?:4|3|2|1)>)/img;WikipediaFeed.headers3=/<h3>.*?<\/h3>(.*?)(?=$|<h(?:3|2|1)>)/img;WikipediaFeed.headers2=/<h2>.*?<\/h2>(.*?)(?=$|<h(?:2|1)>)/img;WikipediaFeed.headers1=/<h1>.*?<\/h1>(.*?)(?=$|<h(?:1)>)/img;function WikipediaFeed(){var F;var d;var i;var b;var H,l,D,c,Y,R,E,U,Z,j,W,A,O,k;(function(){var m=[];m[225]="a";m[193]="A";m[258]="A";m[259]="a";m[226]="a";m[194]="A";m[224]="a";m[192]="A";m[256]="A";m[257]="a";m[260]="A";m[261]="a";m[229]="a";m[197]="A";m[8491]="a";m[227]="a";m[195]="A";m[228]="a";m[196]="A";m[262]="C";m[263]="c";m[268]="C";m[269]="c";m[231]="c";m[199]="C";m[264]="C";m[265]="c";m[266]="C";m[267]="c";m[57469]="C";m[270]="D";m[271]="d";m[57486]="d";m[272]="D";m[273]="d";m[208]="E";m[240]="e";m[201]="E";m[233]="e";m[276]="E";m[277]="e";m[282]="E";m[283]="e";m[202]="E";m[278]="E";m[279]="e";m[200]="E";m[232]="e";m[274]="E";m[275]="e";m[280]="E";m[281]="e";m[203]="E";m[235]="e";m[501]="g";m[500]="G";m[286]="G";m[287]="g";m[290]="G";m[291]="g";m[284]="G";m[285]="g";m[288]="G";m[289]="g";m[57563]="g";m[292]="H";m[293]="h";m[294]="H";m[295]="h";m[205]="I";m[237]="i";m[300]="I";m[301]="i";m[206]="I";m[238]="i";m[304]="I";m[204]="I";m[236]="i";m[298]="I";m[299]="i";m[305]="i";m[302]="I";m[303]="i";m[296]="I";m[297]="i";m[207]="I";m[239]="i";m[308]="J";m[309]="j";m[310]="K";m[311]="k";m[313]="L";m[314]="l";m[317]="L";m[318]="l";m[315]="L";m[316]="l";m[57624]="l";m[321]="L";m[322]="l";m[323]="N";m[324]="n";m[327]="N";m[328]="n";m[325]="N";m[326]="n";m[209]="N";m[241]="n";m[330]="E";m[331]="e";m[211]="O";m[243]="o";m[335]="o";m[334]="O";m[212]="O";m[244]="o";m[210]="O";m[242]="o";m[57687]="O";m[57688]="o";m[332]="O";m[333]="o";m[216]="O";m[248]="o";m[213]="O";m[245]="o";m[214]="O";m[246]="o";m[222]="T";m[254]="t";m[340]="R";m[341]="r";m[344]="R";m[345]="r";m[342]="R";m[343]="r";m[59732]="R";m[346]="S";m[347]="s";m[352]="S";m[353]="s";m[350]="S";m[351]="s";m[348]="s";m[349]="S";m[57810]="S";m[57811]="s";m[356]="T";m[357]="t";m[354]="T";m[355]="t";m[358]="T";m[359]="t";m[59683]="t";m[59687]="u";m[59688]="U";m[218]="U";m[250]="u";m[364]="U";m[365]="u";m[219]="U";m[251]="u";m[217]="U";m[249]="u";m[362]="U";m[363]="u";m[370]="U";m[371]="u";m[366]="U";m[367]="u";m[360]="U";m[361]="u";m[220]="U";m[252]="u";m[372]="W";m[373]="w";m[221]="Y";m[253]="y";m[374]="Y";m[375]="y";m[255]="y";m[376]="Y";m[377]="Z";m[378]="z";m[381]="z";m[379]="Z";m[380]="z";m[59731]="z";m[7828]="Z";m[171]='"';m[187]='"';m[8249]='"';m[8256]='"';m[9001]='"';m[9008]='"';m[8968]="[";m[8969]="]";m[8970]="[";m[8971]="]";m[8216]="'";m[8217]="'";m[8224]="'";m[8220]='"';m[8221]='"';E=m})();U="and|with|featuring|under";Z="(?:^|^.*?(?:"+U+"|,) )";W="(?:The )?";A="(?: Band)?";O="band|musician|singer|songwriter|composer|producer";j="(?:$|(?: (?:"+U+")|,) .*$)";k="drum|bass|guitar|piano|pianist|keyboard|trumpet";l={};D={};H=[[Z,W,"__artistName",A," \\((?:",O,")\\)",j].join(""),[Z,W,"__artistName",A," \\(.*(?:",O,").*\\)",j].join(""),[Z,W,"__artistName",A," \\(.*(?:",k,").*\\)",j].join(""),[Z,W,"__artistName",A,j].join("")];Y=[null,(R=["^",W,"(.*?)",A,j].join("")),["^.*?(?: (?:",U,"|,) )",W,"(.*?)",A,j].join("")];var C={baseUrl:"http://en.wikipedia.org/w/api.php",jsonFormat:"format=json&callback=",defaultParams:{},queryParam:""};var P=jQuery.extend({},C.defaultParams,{action:"parse",prop:"text"});var N=jQuery.extend({},C.defaultParams,{action:"query",list:"search",srwhat:"text",srlimit:"20"});var J=new WebServiceFeed(C);function M(m){return jQuery.extend({},N,{srsearch:'"'+m+'"'})}function B(m){return jQuery.extend({},P,{page:m})}function f(m,q,n,r,o){i=m;c=L(i);d=q;b=n;var p=function(s){X(e(s),r,o)};J.jqJsonRequest(p,M(i),V,o)}function K(n,o,m){J.jqJsonRequest(o,M(n),V,m)}function X(o,n,m){F=o;if(o){J.jqJsonRequest(n,B(o),g,m)}else{m()}}function V(o){var p=[],n=o.query.search;for(var m=0;m<n.length;m++){p.push(n[m].title)}return p}function h(t,n){var m=0,q="",p=WikipediaFeed.grabUsefulHtml,s,z,u,y,AA=WikipediaFeed.stripHtml,x=WikipediaFeed.linksToSpans,v=WikipediaFeed.edits,o=WikipediaFeed.headers;do{s=p.exec(t);if(s){q+="<"+s[1]+">"+s[2]+"</"+s[1]+">";if(n){m+=s[2].replace(AA,"").length}}}while(p.lastIndex>0&&(!n||m<n));q=q.replace(v,"");z="";y=x;u=0;do{s=y.exec(q);if(s){z+=q.substring(u,y.lastIndex-s[0].length)+'<span class="link">'+s[1]+"</span>";u=y.lastIndex}else{z+=q.substring(u,q.length)}}while(y.lastIndex>0);q=((u===0)?q:z);for(var r=5;r>=1;r--){z="";y=WikipediaFeed["headers"+r];u=0;do{s=y.exec(q);var w;if(s){z+=q.substring(u,y.lastIndex-s[0].length);if(s[1]&&(w=s[1].replace(AA,""))){z+=s[0]}u=y.lastIndex}else{z+=q.substring(u,q.length)}}while(y.lastIndex>0);q=((u===0)?q:z)}return q}function S(n,m){var o;o=n+m;if(!(o in l)){l[o]={regEx:new RegExp(n,m?"i":undefined),match:{},replace:{}}}return l[o]}function I(o,n,m){var p,q;q=S(n,m);if(!(o in q.match)){p=o.match(q.regEx);q.match[o]=p&&(p[1]||p[0])}return q.match[o]}function T(o,m,r,n){var p,q;p=S(m,n);if(n){r=r.toLowerCase()}q=o+"_to_"+r;if(!(q in p.replace)){p.replace[q]=o.replace(p.regEx,r)}return p.replace[q]}function G(r,q,p,n,m){for(var o=0;o<p.length;o++){if(a(q%H.length,q%Y.length,r[p[o]],n,m)){return r[p[o]]}}return null}function Q(o,n,m){return G(o,n,m,false,false)||G(o,n,m,true,false)||G(o,n,m,true,true)||o[m[0]]}function L(o){o=o.replace(/\b\u0026\b/,"and").replace(/\b'n'\b/,"and").replace(/\b'n\b/,"and");var n=[];for(var m=0;m<o.length;m++){n[m]=E[o.charCodeAt(m)]||o.charAt(m)}return n.join("")}function a(q,o,r,n,m){var p;if(m){r=L(r)}if(!Y[o]){p=m?c:i}else{p=I(m?c:i,Y[o],n);if(!p){return false}}if(!p){}return I(r,T(H[q],"__artistName",p,n),n)}function e(r){var q,m,p;m=(H.length*Y.length)-1;p=[];for(var o=0;o<r.length;o++){q=r[o];for(var n=0;n<=m;n++){if(a(n%H.length,n%Y.length,q,true,true)){if(n<m){m=n;p=[]}p.push(o)}}}if(p.length===0){return null}else{if(p.length===1){return r[p[0]]}else{return Q(r,m,p)}}}function g(m){return m.parse.text["*"]}J.parseTitleJsonScript=X;J.searchArticleJsonScript=f;J.searchTitlesJsonScript=K;J.scrapeHtml=h;J.getLastTitle=function(){return F&&F.toString()||null};return J}(function(){DUMAS.registerModule("onTheNet",AC,f);var Y=($("body").attr("id")==="albumPage");var g=($("body").attr("id")==="artistPage");var c,v,M=2000;var k=new ModalHoverTimer;var AA,X,AI,z;var Z=true,r,q,n,a;var H=new WikipediaFeed(),O;var i=new YouTubeFeed(),o=new FlickrFeed(),Q=null;var d=null,e=null,b=null;var K=false,AD=false,AF=false;var w=AJ("#flickrmodule"),m=AJ("#wikipediamodule"),h=AJ("#youtubemodule");var B=false;function AH(){if(!K){K=true;function AK(AL){z=z||H.scrapeHtml(AL);$("#wikicontent").html(z);$("#wikiMore").append('<a id="moreWiki" class="moreLink">more.</a>');$(".goToWiki").attr("href","http://en.wikipedia.org/wiki/"+encodeURIComponent(H.getLastTitle()));$("#moreWiki").click(function(){pageTracker._trackEvent("On The Net","Clicked on Wikipedia more button");$("#bigWiki").html(z);a.jqmShow()})}if(O){H.parseTitleJsonScript(d,AK,m)}else{H.searchArticleJsonScript(d,r,q,AK,m)}}}function s(){if(!AF){AF=true;AA=new RemoteCarousel({id:"youTubeSmall",itemSelector:".yt",numVisible:5,visibleEnd:3,maxNumData:30,getHtmlFromData:function(AK){X.addToCollection(U(AA.get(AK)));var AL=document.createElement("div");AL.className="yt";AL.innerHTML=p(AA.get(AK));AA.addHighlight(AL);return AL},processHtml:function(AL,AK){AL.click(P(AA.get(AK)));X.Child(AK).click(P(AA.get(AK)))},getData:function(AL,AK){i.nextResults(function(AM){AA.setMax(Math.min(AM.total,AA.getMax()));AL(AM);if(AM.length<3){AE(AM.length)}},function(AM){AK(AM);h()})},movingCallback:function(AK,AL){pageTracker._trackEvent("On The Net","Clicked on YouTube next/prev");if(AK){X.GoTo(AA.current())}}});X=new Carousel("youTubeBig",{disposition:"vertical",itemSelector:".ytbig",controls:"no"})}}function AE(AK){if(AK){Q=(AK==2)?290:145;$("#youTubeBig").find(".goinside").css({height:Q+"px"})}}function AJ(AK){return function(){$(AK).hide("fast",function(){var AL=$(this).addClass("_error_").siblings("div:not(._error_)").length;if(AL===0&&!officialSitePresent){$("#media").hide()}else{$("#media").show()}})}}function y(){if(!AD){AD=true;AI=new RemoteCarousel({id:"flickrSmall",itemSelector:".fSmall",highlight:true,widths:"dynamic",numVisible:10,maxNumData:30,visibleEnd:3,fullAmount:4,getHtmlFromData:function(AK,AL){var AM=document.createElement("div");AM.className="fSmall";AM.innerHTML=[T(),'<img src="',AL[AK].thumb.url,'" alt="',AL[AK].title,"by",AL[AK].owner.name,'" />'].join("");AI.addHighlight(AM);return AM},processHtml:function(AL,AK,AM){AL.click(R(AK,AM))},getData:function(AL,AK){o.searchPhotosJsonScript(function(AM){AI.setMax(Math.min(AM.numWhiteListed,AI.getMax()));AL(AM);if(AI.size()<=0){w()}},w)},movingCallback:function(){pageTracker._trackEvent("On The Net","Clicked on Flickr next/prev")}})}}function u(AK,AL,AN,AM){$(AK).html(AM||"Not Available").animate(AN||{height:"50px"})}function C(AL,AM,AN,AO){var AK=(AL.title.length>AO)?AN:AM;return(AL.description.length>AK?AL.description.substring(0,AK)+"...":AL.description)}function J(AN,AM){if(AN.embed.url){var AL=new SWFObject(AN.embed.url+"&autoplay=1&rel=0","youTubeSwf","360","295","6","#FFFFFF");AL.addParam("allowFullscreen","false");AL.addParam("wmode","transparent");var AK=AL.write("videoHolder");var AO=['<div class="ytMeta">','<p class="title">',AN.title,"</p>",'<p class="description">',AM,"</p>",'<a id="ytPlayerOut">close this video</a><div class="clear"></div>',"</div>"].join("");Y?$("#youTubePlayer").prepend(AO):$("#youTubePlayer").append(AO)}}function U(AL){var AM=Y?C(AL,185,145,27):C(AL,85,60,27);var AK=AM;return['<div class="ytbig ytPlay">',p(AL),'<div class="ytMeta"><p class="title">',AL.title,"</p>",'<p class="description">',AK,"</p></div>",'<div class="clear"></div>',"</div>"].join("")}function T(){return'<div class="border-div"></div>'}function p(AK){return[T(),'<img class="ytPlay" src="',AK.thumbLarge.url,'" width="',AK.thumbLarge.width,'" height="',AK.thumbLarge.height,'" />'].join("")}function l(){$(".fnext").click()}function AG(AK){if(AK){$("#slideShow").addClass("playing").html("Playing Slideshow...")}clearInterval(v);v=setInterval(l,M)}function W(){$("#slideShow").removeClass("playing").html("Slideshow");clearInterval(v)}function I(){$(this).find("img").show()}function G(){$(this).find("img").hide()}function F(AK,AN,AR){if(n&&n.is(":hidden")){return }var AP=AK/2,AL=AN+150,AQ=$("#flickrNav"),AO=$("#bigFlickr"),AM=$("#flickrModal");AO.hide();AM.stop().animate({width:Math.max(AK,330)+"px",height:Math.max(500,AL+40)+"px"},"fast",function(){AO.css({width:Math.max(AK,330)+"px",height:Math.max(500,AL+20)+"px",paddingTop:(AN+20)+"px"});if(parseInt($.browser.version)==6){$("#bigFlickr").css({top:"30px",left:"20px"})}AQ.css({width:Math.max(330,AK)+"px",height:(AN-40)+"px"});$(".fprv, .fnxt").mouseover(I).mouseout(G).css({width:Math.max(165,AP)+"px",height:(AN-40)+"px"});AO.css({backgroundImage:"url("+AR+")"}).fadeIn("slow")})}function N(AM){var AK=AI.get(AM);c=AM;var AL=new Image();AL.src=AK.large.url;if(parseInt(AL.width)>0&&parseInt(AL.height)>0){S(AK,AM,AL.width,AL.height)}else{AL.onload=function(){S(AK,AM,AL.width,AL.height)}}}function S(AK,AM,AL,AP){var AO=$("#bigFlickr"),AN;AN=AO.find(".legalLink").attr("href")+", PhotoId: "+AK.id+", ProfileId: "+AK.owner.id;AO.removeAttr("style").find("img#origImg").remove().end().find("h3").html(AK.title).end().find(".imgLink").attr("href",AK.url).end().find(".licLink").attr("href",AK.licenseUrl).end().find(".legalLink").attr("href",AN).end().find(".profile").attr("href",AK.owner.profile).end().find(".photostream").attr("href",AK.owner.stream).end();AO.find(".date").html(AK.date);AO.find(".ownerName").each(function(){$(this).html(AK.owner.name)});AO.find(".total").html(AI.getMax());AO.find(".currentFlickr").html(AM+1);o.getRealName(AK.owner.id,function(AQ){if(jQuery.trim(AQ)!=""){AO.find(".realName").html(AQ)}});F(AL,AP,AK.large.url)}function R(AK){return function(){n.jqmShow();N(AK);$("#flickrNav div img").unbind("click.flickr").bind("click.flickr",function(){if(AI.unlocked){var AL=$(this).hasClass("fNext");var AM=(c+(AL?1:-1))%AI.getMax();if(parseInt(AM)<0){return false}else{if($("#slideShow").hasClass("playing")){AG()}if(AL&&c!=AI.current()){AI.loadAndGoTo(AM,function(AN){N(AM)})}else{AI.GoTo(AM);N(AM)}}}})}}function P(AL){var AK=C(AL,300,200,35),AN="slow";var AM=$("#youTubePlayer");return function(){pageTracker._trackEvent("On The Net","Clicked on You Tube thumbnail");if(document.getElementById("youTubePlayer")){$("#youTubePlayer").html('<div id="videoHolder"></div>');J(AL,AK)}else{$("#youTubeBig").prepend('<div id="youTubePlayer"><div id="videoHolder"></div></div>');J(AL,AK);AM=$("#youTubePlayer");AM.find(".ytMeta").hide();AM.animate({height:Y?"305px":"425px",width:Y?"612px":"425px"},AN,function(){AM.css("background"," transparent url(/images/youTubeLoading.gif) no-repeat")});$(".goinside",$("#youTubeBig")).animate({height:Y?"295px":"405px",width:"1px"},AN,function(){AM.find(".ytMeta").show()})}$("#ytPlayerOut").click(function(){AM=$("#youTubePlayer");AM.css("background","#fff none").animate({height:"0px",width:"0px"},AN,function(){AM.remove()});$(".goinside",$("#youTubeBig")).animate({height:Q||"430px",width:Y?"612px":"445px"},AN)})}}function V(){$("#slideShow").toggle(function(){AG(true)},function(){W()})}function AC(AL){var AK={};V();if(AL.onTheNet&&AL.onTheNet.flickrBlacklist){jQuery.map(AL.onTheNet.flickrBlacklist,function(AM){AK[AM]=true})}o.setBlacklist(AK);officialSitePresent=AL.onTheNet&&AL.onTheNet.officialSitePresent;if(officialSitePresent){$(".artistExtWebsite").click(function(){pageTracker._trackEvent("On The Net","External link to artist website clicked: "+$(this).attr("href"))})}n=$("#flickrModal").jqm({toTop:true,onHide:function(AM){$("#flickrModal, #flickrNav, #flickrNav, #flickrNav .fnxt, #flickrNav .fprv").stop();AM.w.hide();AM.o.remove()}}),a=$("#wikiModal").jqm({toTop:true,onShow:function(AM){AM.w.css({top:(DUMAS.scrollTop()+20)+"px",left:(DUMAS.clientWidth()/2)-300+"px"});AM.w.show()}})}function t(AK){pageTracker._trackEvent("On The Net","External link clicked from "+AK.parent().attr("class").replace(" done",""))}function A(){$(".seemore, #youTubeLogo, #flickrLogo, #wikipediaLogo").each(function(){var AK=$(this);AK.find("a").click(function(){t(AK)})})}function AB(AK,AL){$("."+AK+":not(.done)").addClass("done").each(function(){AL($(this))})}function x(){AB("youTubeModule",L);AB("flickrModule",D);AB("wikiModule",j)}function E(){var AK=$("#media");if(!AK.find(".frameOpen").length){if(!B){pageTracker._trackEvent("On The Net","Frame closed")}B=false}else{pageTracker._trackEvent("On The Net","Frame opened")}}function f(AK){var AL=$("#media");if(AL.find(".frameOpen").length){x()}else{pageTracker._trackEvent("On The Net","Closed by default");B=true;E();AL.find(".controller").one("click",x)}AL.find(".controller").click(E);A()}function L(AL){var AK=AL.settings("url, artist, work, band");if(AK.url){i.specifyAllSearchOptionsByUrl(AK.url.indexOf("?")>=0?AK.url:"?"+AK.url);s()}else{if(AK.artist){i.specifySearchString(AK.artist);s()}}}function D(AK){var AL=AK.settings("url, artist, work, band");if(AL.url){o.specifyAllSearchOptionsByUrl(AL.url.indexOf("?")>=0?AL.url:"?"+AL.url);y()}else{if(AL.artist){o.specifySearchString(AL.artist);y()}}}function j(AK){var AL=AK.settings("title, artist, work, band");O=!!AL.title;d=O?AL.title:AL.artist;if(d){AH()}}})();