var version="2.0.1";var winW,winH;function siteUtils(){this.session;this.random;this.date=new Date();this.domain=location.host;this.modalWin}siteUtils.prototype={setBCookie:function(){this.session=GetCookie("B");this.random=Math.ceil(2000000000*Math.random());var ysL=new Date(this.date.getTime());var expD=ysL.toGMTString();if(this.domain.indexOf(".slacker.com")>=0){this.domain="slacker.com"}else{if(this.domain.indexOf(".stg.")>=0){this.domain="stg.sdslacker.com"}else{if(this.domain.indexOf(".dev.")>=0){this.domain="dev.sdslacker.com"}}}if(this.session==null){SetCookie("B",this.random,5256000,"/",this.domain,false,false)}else{}},getLWLink:function(obj,r){var t=jQuery("#"+obj).title;var a=jQuery("#"+obj).author;var c=jQuery("#"+obj).caption;myLightWindow.activateWindow({href:r,title:t,author:a,caption:c})},emThis:function(pref,text,subj){var s="@";var d="slacker";var e="com";document.write('<a href="mailto:'+pref+s+d+"."+e+"?subject="+escape(subj)+'">'+text+"</a>")},adModal:function(mType,mHeight,mWidth,mBg,mContent){this.modalWin=new $($.fn.nyroModal.settings.openSelector).nyroModal();try{if(RockitDevice&&RockitDevice.player.states.isPlaying){if(RockitDevice.player.states.isPaused){return }else{RockitDevice.control.fire("pause")}}}catch(e){}this.mT=(mType=="div")?"div":"iframe";this.flvContent="";if(mType=="flv"){this.flvContent+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+mWidth+'" height="'+mHeight+'" id="FLVPlayer"><param name="movie" value="/lib/flash/FLVPlayer_Streaming.swf" />';this.flvContent+='<param name="salign" value="lt" /><param name="quality" value="high" /><param name="scale" value="noscale" />';this.flvContent+='<param name="FlashVars" value="&MM_ComponentVersion=1&serverName=bbinstr.fcod.llnwd.net&skinName=/lib/flash/Halo_Skin_3&appName=a1163/o16&streamName='+mContent+'&isLive=false&bufferTime=5&autoPlay=true&autoRewind=true" />';this.flvContent+='<embed src="/lib/flash/FLVPlayer_Streaming.swf" flashvars="&MM_ComponentVersion=1&serverName=bbinstr.fcod.llnwd.net&skinName=/lib/flash/Halo_Skin_3&appName=a1163/o16&streamName='+mContent+'&isLive=false&bufferTime=5&autoPlay=true&autoRewind=true" quality="high" scale="noscale" width="502" height="321" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" />';this.flvContent+="</object> ";this.flvContent+="<br/><br/>";this.flvContent+="<center><button onclick=\"jQuery.nyroModalRemove();if(RockitDevice.player.states.isPaused){RockitDevice.control.fire('play')};\">Close Window</button></center>"}if(mType=="iframe"){this.modalWin.nyroModalManual({modal:true,bgColor:mBg,minHeight:mHeight,minWidth:mWidth,type:this.mT,url:mContent})}else{if(mType=="flv"){this.modalWin.nyroModalManual({modal:true,bgColor:mBg,minHeight:mHeight,minWidth:mWidth,type:"iframe",content:this.flvContent})}else{this.modalWin.nyroModalManual({modal:true,bgColor:mBg,minHeight:mHeight,minWidth:mWidth,type:this.mT,content:mContent})}}}};UTIL=new siteUtils();UTIL.setBCookie();function popUpWindow(filename,title,windowHeight,windowWidth,scroll,options){var ScrollBar=0;var strOptions="";if(typeof (scroll)!="undefined"){if(scroll=="yes"||scroll=="Yes"){ScrollBar=1}}var features="top=20,left=20,alwaysRaised=1,resizable=yes,scrollbars="+ScrollBar;if(typeof (windowWidth)!="undefined"){if(windowWidth&&windowWidth>0){features+=",width="+windowWidth}else{features+=",width=550"}}if(typeof (windowHeight)!="undefined"){if(windowHeight&&windowHeight>0){features+=",height="+windowHeight}else{features+=",height=585"}}if(typeof (options)!="undefined"&&options&&options!=" "){var strChopList=options.split(",");strOptions="?";for(count=0;count<strChopList.length;count++){strOptions=strOptions+"&"+strChopList[count]}}if(typeof (title)!="undefined"||!title){title="SlackerWindow"}if(top.window.popupWindow&&!top.window.popupWindow.closed){top.window.popupWindow.close()}if(arguments.length!=popUpWindow.length){top.window.popupWindow=window.open(filename,title,"")}else{top.window.popupWindow=window.open(filename+strOptions,title,features)}void (0)}function GetCookie(name){var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if((!start)&&(name!=document.cookie.substring(0,name.length))){return null}if(start==-1){return null}var end=document.cookie.indexOf(";",len);if(end==-1){end=document.cookie.length}var c=document.cookie.substring(len,end);if(c.indexOf("<<::")>-1){c=decode64(c.substring(c.indexOf("<<::")+4,c.length))}return c}function GetCompoundCookie(name,delimiter){var c=GetCookie(name)||"";var data=c.split(delimiter);var struct={};if(data.length>1){while(data.length>0){struct[data.shift()]=data.shift()}}return struct}function SetCompoundCookie(name,struct,delimiter,expires,path,domain,secure,encode){var data=[];for(i in struct){data.push(i);data.push(struct[i])}SetCookie(name,data.join(delimiter),expires,path,domain,secure,encode)}function SetCookie(name,value,expires,path,domain,secure,encode){var c;var today=new Date();today.setTime(today.getTime());if(expires){expires=expires*1000*60}var expires_date=new Date(today.getTime()+(expires));if(encode){value="<<::"+encode64(value)}c=name+"="+value+((expires)?";expires="+expires_date.toGMTString():"")+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+((secure)?";secure":"");document.cookie=c}function DeleteCookie(name,value,path,domain,secure){var exp=new Date();exp.setTime(exp.getTime()-1);var cval=GetCookie(name);var c=name+"="+value+";expires="+exp.toGMTString()+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+((secure)?";secure":"");document.cookie=c}var oCopy="This code 64 bit encoding code was written by Tyler Akins and has been placed in the"+"public domain.  It would be nice if you left this header intact."+"Base64 code from Tyler Akins -- http://rumkin.com"+"2007 - Slacker, Inc. DB - Changed '=' in keyStr to '|' to allow storage of results in cookies."+"Also modified to fit into 'Jax' framework.";var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/|";function encode64(input){var output=[];var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;do{chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else{if(isNaN(chr3)){enc4=64}}output[output.length]=keyStr.charAt(enc1);output[output.length]=keyStr.charAt(enc2);output[output.length]=keyStr.charAt(enc3);output[output.length]=keyStr.charAt(enc4)}while(i<input.length);return output.join("")}function decode64(input){var output=[];var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;if(!input){return""}input=input.replace(/[^A-Za-z0-9\+\/\|]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output[output.length]=String.fromCharCode(chr1);if(enc3!=64){output[output.length]=String.fromCharCode(chr2)}if(enc4!=64){output[output.length]=String.fromCharCode(chr3)}}while(i<input.length);return output.join("")}function checkEmail(f){var str=jQuery("#"+f).value;var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)jQuery/i;if(filter.test(str)){return true}else{alert("Please input a valid email address. This field is required.");return false}return false}function checkFullName(f){var str=jQuery("#"+f).value;if(str.length>=2){return true}else{alert("Please enter your name. This field is required.");return false}return false}function checkComments(f){var str=jQuery("#"+f).value;if(str.length>=8){return true}else{alert("Please enter a comment with 8 or more letters. This field is required.");return false}return false}function gup(name){var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var tmpURL=window.location.href;var results=regex.exec(tmpURL);if(results==null){return""}else{return results[1]}}function getWinW(){winW=(parent.innerWidth!=undefined)?window.innerWidth:document.documentElement.clientWidth;return winW}function getWinH(){winH=(parent.innerWidth!=undefined)?window.innerHeight:document.documentElement.clientHeight;return winH}function scrollX(topObj,distance){var target=jQuery(topObj);var h=getWinH();var dist=(h<=distance)?h-distance:distance;if(target.length){$("html,body").scrollTo(distance)}};
