

var newsWait=0;
var newsIndex=-1;
var tempTitle='';
var newsdata=new Array();
var newslink=new Array();

 
tempTitle=unescape('Video Premiere: Katrina&apos;s &quot;So Eden&quot;')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/video-premiere-katrina-apos-s-quot-so-eden-quot/9867972');
	
 
tempTitle=unescape('Slash Announces 2012 Tour Dates')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/slash-announces-2012-tour-dates/9867993');
	
 
tempTitle=unescape('OWN to Present Two-Hour Whitney Houston Special on Feb. 16')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/own-to-present-two-hour-whitney-houston-special-on-feb-16/9867995');
	
 
tempTitle=unescape('Tribeca Film Acquires Rights to Keanu Reeves&apos; &quot;Side By Side&quot;')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/tribeca-film-acquires-rights-to-keanu-reeves-apos-quot-side-by-side-quot/9867994');
	
 
tempTitle=unescape('Victoria Beckham Feared Having a Meltdown')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/victoria-beckham-feared-having-a-meltdown/9867997');
	
 
tempTitle=unescape('&quot;VH1 News Presents Whitney Houston&apos;s Greatest Moments&quot; to Air on VH1 on Feb. 16')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/quot-vh1-news-presents-whitney-houston-apos-s-greatest-moments-quot-to-air-on-vh1-on-feb-16/9867999');
	
 
tempTitle=unescape('Christina Milian Signs to Young Money')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/christina-milian-signs-to-young-money/9867998');
	
 
tempTitle=unescape('Gwen Stefani&apos;s Fall 2012 L.A.M.B. Collection Inspired by Early 1960s')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/gwen-stefani-apos-s-fall-2012-l-a-m-b-collection-inspired-by-early-1960s/9867996');
	
 
tempTitle=unescape('Whitney Houston&apos;s &quot;Sparkle&quot; to Be Released on Aug. 17')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/whitney-houston-apos-s-quot-sparkle-quot-to-be-released-on-aug-17/9867987');
	
 
tempTitle=unescape('Lil Kim to Appear on &quot;Watch What Happens Live&quot; Tonight')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/lil-kim-to-appear-on-quot-watch-what-happens-live-quot-tonight/9867989');
	
 
tempTitle=unescape('fun.&apos;s &quot;Some Nights&quot; Streaming Online Now')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/fun-apos-s-quot-some-nights-quot-streaming-online-now/9867990');
	
 
tempTitle=unescape('&quot;This is NRA Country Vol. 1&quot; Compilation Out Now')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/quot-this-is-nra-country-vol-1-quot-compilation-out-now/9867988');
	
 
tempTitle=unescape('Blink-182&apos;s Tom DeLonge Working on Three Film Projects')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/blink-182-apos-s-tom-delonge-working-on-three-film-projects/9867991');
	
 
tempTitle=unescape('Check Out Exclusive Photos From David Lynch&apos;s &quot;Crazy Clown Time&quot; Video')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/check-out-exclusive-photos-from-david-lynch-apos-s-quot-crazy-clown-time-quot-video/9867992');
	
 
tempTitle=unescape('Listen to &quot;Want My Blood&quot; by The Kickdrums Feat. Rockie Fresh and DZ Deathrays')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/listen-to-quot-want-my-blood-quot-by-the-kickdrums-feat-rockie-fresh-and-dz-deathrays/9867986');
	
 
tempTitle=unescape('Odd Future Working With Kanye West')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/odd-future-working-with-kanye-west/9867981');
	
 
tempTitle=unescape('Catholic League Blasts Nicki Minaj for Strange Grammy Performance')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/catholic-league-blasts-nicki-minaj-for-strange-grammy-performance/9867982');
	
 
tempTitle=unescape('Godsmack Almost Done With Covers EP')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/godsmack-almost-done-with-covers-ep/9867985');
	
 
tempTitle=unescape('Watch Japanese Superstar Miyavi Perform for MTV Iggy')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/watch-japanese-superstar-miyavi-perform-for-mtv-iggy/9867984');
	
 
tempTitle=unescape('Hilary Duff&apos;s Hockey Hubby Retires From NHL')
tempTitle=tempTitle.replace(/\&quot\;/g,'"');
tempTitle=tempTitle.replace(/\&apos\;/g,"'");
newsdata.push(tempTitle);
newslink.push('/entertainment-news/article/hilary-duff-apos-s-hockey-hubby-retires-from-nhl/9867983');
	if(typeof(wpath)=='undefined') {wpath=window.location.pathname;}

function startNews() {
	$("#globalNavi > ul > li").each(function() {
		var linktext=$("> a",$(this)).text();
		if(linktext=="Users"||linktext=="Movies") {$(this).remove();}
		
		
		if(linktext=="Tickets") {$(this).remove();}
	});

	
	$("#globalNavi > ul")
	.append('<li class="bannerNavi"><a title="Act of Valor" target="_blank" href="http://www.actofvalor.com/?utm_source=adnav"><img width="120" height="30" src="http://images.artistdirect.com/Images/artd/uploads/advertising/aov/nav.gif"></a></li>');
	
	
	var foundPhotos = 0;
	$("#globalNavi ul li a").each(function() {
		if($(this).text()=="Photos") {foundPhotos=1;}
	});
	if(!foundPhotos) {
		$("#globalNavi ul li a").each(function() {
			if($(this).text()=="Videos") {
				$(this).parent().after('<li><a target="_top" href="http://www.artistdirect.com/artists/photo-galleries" title="Band, Music Artist & Celebrity Photos">Photos</a></li>');
			}
		});
	}
	
	
	$("#globalNavi ul li a").each(function() {
		if($(this).text()=="Free Stuff") {
			$(this).parent().html('<a title="Free Songs and Music Downloads" href="/music/free-downloads">Free Downloads</a>');
		}
	});
	$("#nav_artists ul li a").each(function() {
		if($(this).text()=="Featured Stories") {
			$(this).parent().html('<a title="ARTISTdirect Exclusive Interviews" href="/artists/exclusive-interviews">Exclusive Interviews</a>');
		}		
	});
	
	
	
	
	$("#globalNavi > ul > li[id^=nav]").hover(
		function() {
			$("> ul",$(this)).css("visibility","visible");
			$("#tickerdate").hide();
			$("#thenews").hide();
			if(typeof(newsWait)!="undefined") {
				clearTimeout(newsWait);
				newsWait=-1;
			}
		},
		function() {
			$("> ul",$(this)).css("visibility","hidden");
			$("#tickerdate").show();
			$("#thenews").show();
			if(typeof(updateTicker)!="undefined") {
				newsWait=setTimeout('updateTicker()',3000);
			}
		}
	);
	
	
	googleSearch();
	
	
	
	
	
	if(window.top==window && window.location.hostname.indexOf("artistdirect.com")!=-1) {OAS_AD('x94');}

	

	
	if(document.location.protocol=="http:") {
		document.write(unescape("%3Cscript src='http://s7.addthis.com/js/250/addthis_widget.js#username=artistdirect' type='text/javascript'%3E%3C/script%3E"));
	} else {
		document.write(unescape("%3Cscript src='https://s7.addthis.com/js/250/addthis_widget.js#username=artistdirect' type='text/javascript'%3E%3C/script%3E"));
	}

	$news=$("#thenews");
	$news.hover(function() {clearTimeout(newsWait);newsWait=-1;},function() {newsWait=setTimeout('updateTicker()',3000);});
	$news.click(function() {window.top.location.href=newslink[newsIndex];});
	newsIndex=0; $news.html(newsdata[newsIndex]);
	
	newsWait=setTimeout('updateTicker()',5000);
}

var searchboxFocus = false;
var searchboxText=""
var searchboxUrl="";
if(document.location.protocol=="http:") {document.write(unescape('%3Cscript type="text/javascript" src="http://www.google.com/jsapi"%3E%3C/script%3E'));}
function googleSearch() {

	$("form.searchForm").each(function() {
		var $thisform=$(this);
		if($thisform.attr("processed")) {return;}




		$(".box",$thisform).each(function() {
			if($(this).val()==""&&(!searchboxFocus)) {
				$(this).val(searchboxText);
			}
		});
		$(".box",$thisform).css("font-weight","bold").css("color","#999999");
		$(".box",$thisform).bind("focus", function(event) { 
			if($(".box",$thisform).val()==searchboxText) {
				$(".box",$thisform).val("");
			}
			searchboxFocus = true;
		});
		$(".box",$thisform).bind("blur", function(event) { 
			if($(".box",$thisform).val()=="") {
				$(".box",$thisform).val(searchboxText);
			}
			searchboxFocus = false;
		});	
		$thisform.submit(function() {
			if($("input[name=q]",$thisform).val()==searchboxText) {
				window.location.href=searchboxUrl;
				return false;
			}
		});

		$thisform.attr("processed",1);
	});
	return;
}

function writeFreeDownloads(outputType) {
	var tempHTML = "";

	
	

	
	
	
	
	
	
	
	OAS_rn = '001234567890'; OAS_rns = '1234567890';
	OAS_rn = new String (Math.random()); OAS_rns = OAS_rn.substring (2, 11);	
	tempHTML+='<div id="redcross">';
	tempHTML+="<scr"+"ipt type='text/javascript' src='http://oascentral.artistdirect.com/RealMedia/ads/adstream_jx.ads/artistdirect.com/1" + OAS_rns +"@TopLeft'></script>";
	tempHTML+='</div>';

	if(outputType=="write") {
		document.writeln(tempHTML);
	}
	return tempHTML;
}

function writeSocialLinksTower() {
	var tempHTML='';
	tempHTML+='<div class="social"><a target="_blank" href="http://www.facebook.com/pages/ARTISTdirect/85437842151"><img src="http://images.artistdirect.com/Images/a4/banners/fb.png"></a></div>';
	tempHTML+='<div class="social"><a target="_blank" href="http://twitter.com/artistdirect"><img src="http://images.artistdirect.com/Images/a4/banners/tw.png"></a></div>';
	tempHTML+='<div class="social"><a target="_blank" href="http://www.myspace.com/artistdirect"><img src="http://images.artistdirect.com/Images/a4/banners/ms.png"></a></div>';
	document.writeln(tempHTML);
}

function writeLoginTower() {
}

function writeSubscribeRHS() {

	
	var tempHTML='';
	if($("div.ad_300").length>0) {
	  
		tempHTML+='<iframe src="http://www.facebook.com/plugins/likebox.php?id=85437842151&amp;width=298&amp;connections=0&amp;stream=false&amp;header=false&amp;height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:298px; height:62px; margin:0px; padding:0px; position:relative; margin-top:260px" allowTransparency="true"></iframe>';
	} else {
		
		tempHTML+='<iframe src="http://www.facebook.com/plugins/likebox.php?id=85437842151&amp;width=298&amp;connections=0&amp;stream=false&amp;header=false&amp;height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:298px; height:62px; margin:0px; padding:0px;" allowTransparency="true"></iframe>';
	}

	

	tempHTML+='<div id="newsSignupSide">';
	tempHTML+='<h2 title="Digital Music News, Latest Music Industry News Online">ARTISTdirect Newsletter</h2>';
	tempHTML+='<form target="_new" method="post" id="e2ma_signup" action="https://app.e2ma.net/app/view:Join/acctId:3745/signupId:6605">';
	tempHTML+='<input type="hidden" name="private_set" value="1">';
	tempHTML+='<input type="hidden" name="groups[]" value="49900">';
	tempHTML+='<input id="nlemail" class="box" type="text" name="emma_member_email" OnChange="isEmail(this)" value="Email Address" onclick="this.value=\'\';"/>';
	//tempHTML+='<div class="cmntBttnXSm ucLeft"><a onClick="$(\'#e2ma_signup\').submit();" href="#">Sign up</a></div>';
	tempHTML+='<div class="cmntBttnXSm ucLeft"><input type=submit value="Sign up"></div>';
	tempHTML+='<p>Clicking submit means you agree to receive information from ARTISTdirect. See our <a href="/nad/misc/term/">TERMS OF USE</a> for more.</p>';
	tempHTML+='</form>';
	tempHTML+='</div>';
	document.writeln(tempHTML);
	rhsMiscCalls();
}

function submitNewsletter() {
	$email = ($("#nlemail").length > 0) ?  $("#nlemail") : $("#nlemailS");
	if(isEmail($email.get(0))) {
		window.open('http://www.artistdirect.com/nad/email/signup/trans/?email=' + escape($email.val()),'register','width=400,height=320,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no');
	}
	return false;
}

function writeFavHTML(fav_type,fav_id) {

}

function switchRogueNews() {


}

function hideAdOverlay() {
	$(".ad_overlay").hide();
	$(".ad_overlay").html("");
	$(".ad_overlayIn").hide();
	$(".ad_overlayIn").html("");
}

function writePageTop() {
	
	if ($(".ad_728Home").length > 0) {return;}
	if (isCustomPage==true) {return;}

	var tempHTML = '';
	tempHTML += writeFreeDownloads();
	if(wpath.indexOf('/nad/window/media/page/')!=0) {
		tempHTML+='<div class="ad_728Home"><scr' + 'ipt>OAS_AD(n_top2);</scr' + 'ipt></div>';
	} else {
		tempHTML+='<div class="ad_728Home"><iframe id="ad_mjxtop" src="" width=728 height=90 noresize scrolling=no hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0></iframe></div>';
	}
	document.write(tempHTML);
}

jQuery(function() {
var tempHTML = '';
tempHTML += '<br class="clearfloat">';
tempHTML += '<ul>';
tempHTML += '<li><h5>ROGUE 3D eyewear</h5></li>';
tempHTML += '<li><a target="_blank" title="ROGUE 3D eyewear" href="http://www.ex3d.com/rogue3d/">Shop</li>';
tempHTML += '<li><a target="_blank" title="ROGUE 3D eyewear FAQ" href="http://www.ex3d.com/rogue3d/faq.php">FAQ</li>';
tempHTML +='</ul>';
$("#footerBottom div.item160:first").append(tempHTML);
});

jQuery(function() {
	if($(".pollArea a").length>0) {$('head').append('<scr' + 'ipt type="text/javascr'+'ipt" src="/a3/includes/js/polls/" ></scr'+'ipt>');}
	$(".pollArea a").click(function() {
		var $pollArea = $(this).parents('.pollArea');
		var val = $("input:checked",$pollArea).val();
		$(".pollVoteArea",$pollArea).hide();
		$(".pollWait",$pollArea).show();
		$(".pollResults",$pollArea).hide();
		if(val) {pollVote(val);}
		return false;
	});
});
