/* File: js/common.js, Ratio: 44.6% */

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.1g.1w=6(o){o=$.1f({r:n,x:n,N:n,17:q,J:n,L:1a,16:n,y:q,u:12,H:3,B:0,k:1,K:n,I:n},o||{});8 G.R(6(){p b=q,A=o.y?"15":"w",P=o.y?"t":"s";p c=$(G),9=$("9",c),E=$("10",9),W=E.Y(),v=o.H;7(o.u){9.1h(E.D(W-v-1+1).V()).1d(E.D(0,v).V());o.B+=v}p f=$("10",9),l=f.Y(),4=o.B;c.5("1c","H");f.5({U:"T",1b:o.y?"S":"w"});9.5({19:"0",18:"0",Q:"13","1v-1s-1r":"S","z-14":"1"});c.5({U:"T",Q:"13","z-14":"2",w:"1q"});p g=o.y?t(f):s(f);p h=g*l;p j=g*v;f.5({s:f.s(),t:f.t()});9.5(P,h+"C").5(A,-(4*g));c.5(P,j+"C");7(o.r)$(o.r).O(6(){8 m(4-o.k)});7(o.x)$(o.x).O(6(){8 m(4+o.k)});7(o.N)$.R(o.N,6(i,a){$(a).O(6(){8 m(o.u?o.H+i:i)})});7(o.17&&c.11)c.11(6(e,d){8 d>0?m(4-o.k):m(4+o.k)});7(o.J)1p(6(){m(4+o.k)},o.J+o.L);6 M(){8 f.D(4).D(0,v)};6 m(a){7(!b){7(o.K)o.K.Z(G,M());7(o.u){7(a<=o.B-v-1){9.5(A,-((l-(v*2))*g)+"C");4=a==o.B-v-1?l-(v*2)-1:l-(v*2)-o.k}F 7(a>=l-v+1){9.5(A,-((v)*g)+"C");4=a==l-v+1?v+1:v+o.k}F 4=a}F{7(a<0||a>l-v)8;F 4=a}b=12;9.1o(A=="w"?{w:-(4*g)}:{15:-(4*g)},o.L,o.16,6(){7(o.I)o.I.Z(G,M());b=q});7(!o.u){$(o.r+","+o.x).1n("X");$((4-o.k<0&&o.r)||(4+o.k>l-v&&o.x)||[]).1m("X")}}8 q}})};6 5(a,b){8 1l($.5(a[0],b))||0};6 s(a){8 a[0].1k+5(a,\'1j\')+5(a,\'1i\')};6 t(a){8 a[0].1t+5(a,\'1u\')+5(a,\'1e\')}})(1x);',62,96,'||||curr|css|function|if|return|ul|||||||||||scroll|itemLength|go|null||var|false|btnPrev|width|height|circular||left|btnNext|vertical||animCss|start|px|slice|tLi|else|this|visible|afterEnd|auto|beforeStart|speed|vis|btnGo|click|sizeCss|position|each|none|hidden|overflow|clone|tl|disabled|size|call|li|mousewheel|true|relative|index|top|easing|mouseWheel|padding|margin|200|float|visibility|append|marginBottom|extend|fn|prepend|marginRight|marginLeft|offsetWidth|parseInt|addClass|removeClass|animate|setInterval|0px|type|style|offsetHeight|marginTop|list|jCarouselLite|jQuery'.split('|'),0,{}))
$(document).ready(function(){$('.mc-selectinput').click(function(){$(this).focus();$(this).select();});$('.mc-selectgo').change(function(){var v=$(this).attr('value');if(v!='0'){document.location.href=v;}});if($('#UserUsername').length>0){$('#UserUsername').focus();}});jQuery.extend({LoadingUI:{add:function(domObject,msg){domObject.html(msg);domObject.addClass('mc-icloading');},remove:function(domObject){domObject.html('');domObject.removeClass('mc-icloading');}}});$('.mc-resultstbl tr').ready(function(){$('.mc-resultstbl tr').click(function(){var detailUrl=$(this).contents().find('a:first').attr('href');document.location.href=detailUrl;});$('.mc-resultstbl tr').hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});});jQuery.pop0='',jQuery.pop1='',jQuery.pop2='';jQuery.pop3='';$('.mc-popbtn').ready(function(){jQuery.pop0=$('#mc-hmpopular').html();$('.mc-popbtn').click(function(){var popContainer=$('#mc-hmpopular'),type=$(this).attr('rel');$('.mc-popbtn').removeClass('active');$(this).addClass('active');if(type=='0'&&jQuery.pop0==''||type=='1'&&jQuery.pop1==''||type=='2'&&jQuery.pop2==''||type=='3'&&jQuery.pop3==''){jQuery.LoadingUI.add(popContainer,'Loading...');$.ajax({type:'GET',url:'/services/vitality/',dataType:'json',data:'action=popular&type='+type,success:function(json){var html='';jQuery.LoadingUI.remove(popContainer);for(var i=0;i<json.length;i++){var uploadsId=json[i]['Upload']['uploadsid'],albumCover=json[i]['Upload']['labelimg'],title=json[i]['Upload']['title'],artist=json[i]['Upload']['artist'],desc=json[i]['Upload']['description'],date=json[i]['Upload']['dateadded'],link=json[i]['Upload']['link'],last='';if(i==(json.length-1)){last=' last';}
html+='<li class="mc-clear'+last+'">'
+'<a href="'+link+'" class="thumb"><img src="/scripts/timthumb.php?src='+albumCover+'&w=75&h=75&zc=1" width="75" height="75"></a>'
+'<a href="'+link+'" class="mc-bold">'+title+'</a>'
+'<em class="mc-block">'+artist+'</em>'
+'<em class="mc-block mc-tiny mc-colormd">'
+date
+'</em>'
+'<span class="mc-small">'
+desc
+'</span></li>';}
popContainer.fadeOut('fast',function(){popContainer.html('');popContainer.append(html);popContainer.fadeIn('fast');});switch(type){case'1':jQuery.pop1=html;break;case'2':jQuery.pop2=html;break;case'3':jQuery.pop3=html;break;default:jQuery.pop0=html;break;}}});}else{switch(type){case'1':html=jQuery.pop1;break;case'2':html=jQuery.pop2;break;case'3':html=jQuery.pop3;break;default:html=jQuery.pop0;break;}
popContainer.fadeOut('fast',function(){popContainer.html('');popContainer.append(html);popContainer.fadeIn('fast');});}
return false;});});jQuery.recent0='',jQuery.recent1='';$('.mc-recentbtn').ready(function(){jQuery.recentSeeAllMixesHtml=$('#mc-allrecent').html(),jQuery.recent0=$('#mc-hmrecent').html();$('.mc-recentbtn').click(function(){var recentContainer=$('#mc-hmrecent'),allRecentLink=$('#mc-allrecent'),type=$(this).attr('rel'),innerHtml='';recentContainer.html('');$('.mc-tabular > li').removeClass('active');$(this).parent().addClass('active');if(type=='0'&&jQuery.recent0==''||type=='1'&&jQuery.recent1==''||type=='2'&&jQuery.recent2==''){jQuery.LoadingUI.add(recentContainer,'Loading...');$.ajax({type:'GET',url:'/services/vitality/',dataType:'json',data:'action=recent&type='+type,success:function(json){var html='';jQuery.LoadingUI.remove(recentContainer);if(type=='0'){for(var i=0;i<(json.length-1);i++){var uploadsId=json[i]['Upload']['uploadsid'],albumCover=json[i]['Upload']['labelimg'],title=json[i]['Upload']['title'],artist=json[i]['Upload']['artist'],date=json[i]['Upload']['dateadded'],link=json[i]['Upload']['link'],last='';if(i=='0'){last='  first';}
html+='<li class="mc-clear'+last+'">'
+'<a href="'+link+'" class="thumb">'
+'<img src="/scripts/timthumb.php?src='+albumCover+'&w=35&h=35&zc=1" width="35" height="35">'
+'</a>'
+'<span class="item">'
+'<a href="'+link+'" class="mc-bold mc-block">'+title+'</a>'
+artist
+'<em class="mc-block">'+date+'</em>'
+'</span>'
+'</li>';}
jQuery.recent0=html;innerHtml=html;jQuery.recentSeeAllMixesHtml=json[json.length-1]['seeall'];jQuery.recentSeeAllHtml=jQuery.recentSeeAllMixesHtml;}else if(type=='1'){for(var i=0;i<(json.length-1);i++){var profileImg=json[i]['User']['profileimg'],username=json[i]['User']['username'],name=(json[i]['User']['displayname'])?json[i]['User']['displayname']:json[i]['User']['username'],bio=(json[i]['User']['bio'])?'<em class="mc-block">'+json[i]['User']['bio']+'</em>':'',last='';if(i=='0'){last='  first';}
html+='<li class="mc-clear'+last+'">'
+'<a href="'+username+'" class="thumb">'
+'<img src="/scripts/timthumb.php?src='+profileImg+'&w=35&h=35&zc=1" width="35" height="35">'
+'</a>'
+'<span class="item">'
+'<a href="/'+username+'" class="mc-bold mc-block">'+name+'</a>'
+bio
+'</span>'
+'</li>';}
jQuery.recent1=html;innerHtml=html;jQuery.recentSeeAllUserHtml=json[json.length-1]['seeall'];jQuery.recentSeeAllHtml=jQuery.recentSeeAllUserHtml;}
recentContainer.fadeOut('fast',function(){recentContainer.html('');recentContainer.append(innerHtml);recentContainer.fadeIn('fast');});allRecentLink.html(jQuery.recentSeeAllHtml);}});}else{switch(type){case'1':innerHtml=jQuery.recent1;jQuery.recentSeeAllHtml=jQuery.recentSeeAllUserHtml;break;default:innerHtml=jQuery.recent0;jQuery.recentSeeAllHtml=jQuery.recentSeeAllMixesHtml;break;}
recentContainer.fadeOut('fast',function(){recentContainer.html('');recentContainer.append(innerHtml);recentContainer.fadeIn('fast');});allRecentLink.html(jQuery.recentSeeAllHtml);}
return false;});});$('#whatsthisbtn').ready(function(){$('#whatsthisbtn').click(function(){if(!$(this).hasClass('mc-icarrowdwn')){$('#whatsthis').slideDown();$(this).addClass('mc-icarrowdwn');}else{$('#whatsthis').slideUp();$(this).removeClass('mc-icarrowdwn');}
return false;});});$('#mc-welcomebtn').ready(function(){$('#mc-welcomebtn').click(function(){$.ajax({type:'GET',url:'/services/writecookie',dataType:'json',data:'name=welcome&value=close',success:function(){$('.mc-welcomemod').fadeOut();}});return false;});});$('#mc-pghelp').ready(function(){if(location.hash){var header=$(location.hash).children('h2');$(location.hash).children('.answer').slideDown();header.addClass('mc-icarrowdwn');}
$('#mc-pghelp h2').click(function(){if(!$(this).hasClass('mc-icarrowdwn')){$(this).next('.answer').slideDown();$(this).addClass('mc-icarrowdwn');}else{$(this).next('.answer').slideUp();$(this).removeClass('mc-icarrowdwn');}});});$('.mc-carousel').ready(function(){var itemsToDisplay=4;$(".image_thumb").jCarouselLite({btnNext:".next",btnPrev:".prev",circular:false,scroll:itemsToDisplay,visible:itemsToDisplay});$(".image_thumb ul li").hover(function(){var imgAlt=$(this).find('img').attr("longdesc");var imgURL=$(this).find('img').attr("longdesc");var imgDesc=$(this).find('.block').html();var imgDescHeight=$(".exclusives-desc").find('.block').height();if($(this).is(".active")){return false;}else{$(".exclusives-desc .block").html(imgDesc).show();$(".main-image img").attr({src:imgURL,alt:imgAlt});}
$(".image_thumb ul li").removeClass('hover');$(this).addClass('hover');return false;},function(){$(this).removeClass('hover');}).click(function(){var imgURL=$(this).find('a').attr("href");window.location=imgURL;return false;});var totalExclusives=$('div.image_thumb > ul > li').size();var firstExclusiveDisplayed=1;var lastExclusiveDisplayed=itemsToDisplay;var htmlPagination=firstExclusiveDisplayed+' - '+lastExclusiveDisplayed+' of '+totalExclusives;$('.carousel_page').html(htmlPagination);$(".carousel_nav .next").click(function(event){if(lastExclusiveDisplayed<totalExclusives){firstExclusiveDisplayed=firstExclusiveDisplayed+4;lastExclusiveDisplayed=lastExclusiveDisplayed+4;htmlPagination=firstExclusiveDisplayed+' - '+lastExclusiveDisplayed+' of '+totalExclusives;$('.carousel_page').html(htmlPagination);return false;}});$(".carousel_nav .prev").click(function(event){if(firstExclusiveDisplayed>1){firstExclusiveDisplayed=firstExclusiveDisplayed-4;lastExclusiveDisplayed=lastExclusiveDisplayed-4;htmlPagination=firstExclusiveDisplayed+' - '+lastExclusiveDisplayed+' of '+totalExclusives;$('.carousel_page').html(htmlPagination);return false;}});});