/* BON JOVI */
/* Home Page Section Javascript Functions
--------------------------------------------------------------------------- */


	$(window).load(function() {
	
		nextStop();
		
		if (page == "index" || page == "home") {
			
			$('.merch').tabs();
			msgCountdown();
			specialEdition();
			geoNews();
			
		}
		
		merchandise();
		Cufon.refresh();
		liveStream();
		featuredBlogs();
				
		ieFix();
			
	});


/* LOCALIZED INTRO MESSAGE
--------------------------------------------------------------------------- */
		

	function intro() { $('#introduction ul.actions a').each(function() { $(this).attr('href', 'http://en.bonjovi.com/').text('Go to the English Site'); }); }


/* EMBED FEATURED MERCHANDISE
-----------------------------------------------------------------------------*/ 


	function merchandise() {
					
		var _so = new SWFObject(asset_host + '/2/flash/merchandise.swf', 'bonjovionline_featured', '780', '250', '#FFFFFF');
		_so.addParam('allowScriptAccess', 'always');
		_so.addParam('wmode', 'transparent');
		_so.write('bonjovionline');	
	
	}


/* LIVE STREAM
--------------------------------------------------------------------------- */


	function liveStream() {

		$('#dallas p var').empty().append('<a href="/">Watch Now</a>');

		/*
		
		$('#dallas p var').countdown({
		
			until: $.countdown.UTCDate(-5, 2010, 4, 11, 19, 0, 0),
			format: "yowdHMS",
			layout: "{dn} {dl}, {hn} {hl}, {mn} {ml}, {sn} {sl}",
			onExpiry: "Now!"
			
		});		

		*/
		
	}

	
/* FEATURED BLOGS
----------------------------------------------------------------------------- */


	function featuredBlogs() {
		
		$('#latest_news div.sidebar div.featured div.widget-editorial ul.leads > li').each(function() {
						
			var blogTitle = $(this).parent().siblings('h3').text();
			$(this).find('h4').prepend('<strong>' + blogTitle + '</strong><br />');		
					
		});
		
	}
	
	
/* GEO-TARGETED NEWS
----------------------------------------------------------------------------- */


	function geoNews() {
		
		if (geoLocation.country == "UK") {

			$(".sidebar div.widget-editorial.uk").show();

		} else if (geoLocation.country == "CA") {

			$(".sidebar div.widget-editorial.ca").show();

		} else if (geoLocation.country == "AU") {

			$(".sidebar div.widget-editorial.au").show();

		}
		
	}