
/****************************************************************************

  This file is part of the GamesCast.tv Website

	GamesCast.tv coded by Steve "GreasedScotsman" Huff, 
	Copyright 2010 Steve Huff
	
	It is distributed under the terms of the 
	GNU General Public License
		
***************************************************************************/

function enableNavWarnings() {
	if ($('#navbar').attr("alt") == "1") {
		//alert("Navbar warnings enabled.");
		$("#navschedule").attr("href", "javascript:void(0);");
		$("#navvideos").attr("href", "javascript:void(0);");
		$("#navgames").attr("href", "javascript:void(0);");
		$("#navbroadcasters").attr("href", "javascript:void(0);");
		$("#navsuggested").attr("href", "javascript:void(0);");
		$("#navfeedback").attr("href", "javascript:void(0);");
	}
}

function disableNavWarnings() {
	//alert("Nav Warnings Disabled.");
	$("#navschedule").attr("href", "/schedule.php");
	$("#navgames").attr("href", "/games.php");
	$("#navbroadcasters").attr("href", "/broadcasters.php");
	$("#navfeedback").attr("href", "http://gamescast.tv/forums/viewforum.php?f=2");
}


function hideNavSched() { $("#navschedule").qtip("hide"); }
function hideNavVid() 	{ $("#navvideos").qtip("hide"); }
function hideNavGames() { $("#navgames").qtip("hide"); }
function hideNavBroad() { $("#navbroadcasters").qtip("hide"); }
function hideNavPod() 	{ $("#navpodcasts").qtip("hide"); }
function hideNavSuggest() { $("#navsuggested").qtip("hide"); }
function hideNavFeedback () { $("#navfeedback").qtip("hide"); }
function hideNavFavorites () { $("#favNav").qtip("hide"); }


$(document).ready(function(){

/////////////////////////////////////////////////////////////////////
//
//			Time Zone Display
//
/////////////////////////////////////////////////////////////////////

	$('#tzdisplay').html("Times are local (GMT "+((nowlocal/60)*(-1))+")");


/////////////////////////////////////////////////////////////////////
//
//			Navigation
//
/////////////////////////////////////////////////////////////////////

var currPage = document.location.pathname;

if ($('#navbar').attr("alt") == "1" && currPage.match("index.php")) {
	
	$('#navschedule').qtip({
		content: {
			title: { text: 'Interrupt Stream?', button: '<img src="/images/icons/x_10.png" onclick="return false;" alt="Close" />' },
			text: 'Following this link will interrupt the stream you are watching.  Are you sure?<br/><a href="/schedule.php">Yes</a> | <a href="javascript:hideNavSched();">No</a>' 
		},
		show: { effect: { type: 'slide' }, when: { event: 'click' }, solo: true },
		hide: { when: { event: 'click' }, fixed: true },
		position: { corner: { target: 'bottomLeft', tooltip: 'bottomMiddle' }, adjust: { screen: true } },
		style: {
			title: { 'font-size': 10 },
			width: 400,
			textAlign: 'center',
			'font-size': 9,
			name: 'gctvstyle'
		}
	});

	$('#navvideos').qtip({
		content: {
			title: { text: 'Interrupt Stream?', button: '<img src="/images/icons/x_10.png" onclick="return false;" alt="Close" />' },
			text: 'Following this link will interrupt the stream you are watching.  Are you sure?<br/><a href="/indexlive.php#videos.php">Yes</a> | <a href="javascript:hideNavVid();">No</a>' 
		},
		show: { effect: { type: 'slide' }, when: { event: 'click' }, solo: true },
		hide: { when: { event: 'click' }, fixed: true },
		position: { corner: { target: 'bottomLeft', tooltip: 'bottomMiddle' }, adjust: { screen: true } },
		style: {
			title: { 'font-size': 10 },
			width: 400,
			textAlign: 'center',
			'font-size': 9,
			name: 'gctvstyle'
		}
	});


	$('#navgames').qtip({
		content: {
			title: { text: 'Interrupt Stream?', button: '<img src="/images/icons/x_10.png" onclick="return false;" alt="Close" />' },
			text: 'Following this link will interrupt the stream you are watching.  Are you sure?<br/><a href="/games.php">Yes</a> | <a href="javascript:hideNavGames();">No</a>' 
		},
		show: { effect: { type: 'slide' }, when: { event: 'click' }, solo: true },
		hide: { when: { event: 'click' }, fixed: true },
		position: { corner: { target: 'bottomLeft', tooltip: 'bottomMiddle' }, adjust: { screen: true } },
		style: {
			title: { 'font-size': 10 },
			width: 400,
			textAlign: 'center',
			'font-size': 9,
			name: 'gctvstyle'
		}
	});


	$('#navbroadcasters').qtip({
		content: {
			title: { text: 'Interrupt Stream?', button: '<img src="/images/icons/x_10.png" onclick="return false;" alt="Close" />' },
			text: 'Following this link will interrupt the stream you are watching.  Are you sure?<br/><a href="/broadcasters.php">Yes</a> | <a href="javascript:hideNavBroad();">No</a>' 
		},
		show: { effect: { type: 'slide' }, when: { event: 'click' }, solo: true },
		hide: { when: { event: 'click' }, fixed: true },
		position: { corner: { target: 'bottomLeft', tooltip: 'bottomMiddle' }, adjust: { screen: true } },
		style: {
			title: { 'font-size': 10 },
			width: 400,
			textAlign: 'center',
			'font-size': 9,
			name: 'gctvstyle'
		}
	});


	$('#navpodcasts').qtip({
		content: {
			title: { text: 'Interrupt Stream?', button: '<img src="/images/icons/x_10.png" onclick="return false;" alt="Close" />' },
			text: 'Following this link will interrupt the stream you are watching.  Are you sure?<br/><a href="/indexlive.php#podcasts.php">Yes</a> | <a href="javascript:hideNavPod();">No</a>' 
		},
		show: { effect: { type: 'slide' }, when: { event: 'click' }, solo: true },
		hide: { when: { event: 'click' }, fixed: true },
		position: { corner: { target: 'bottomLeft', tooltip: 'bottomMiddle' }, adjust: { screen: true } },
		style: {
			title: { 'font-size': 10 },
			width: 400,
			textAlign: 'center',
			'font-size': 9,
			name: 'gctvstyle'
		}
	});

	$('#navsuggested').qtip({
		content: {
			title: { text: 'Interrupt Stream?', button: '<img src="/images/icons/x_10.png" onclick="return false;" alt="Close" />' },
			text: 'Following this link will interrupt the stream you are watching.  Are you sure?<br/><a href="/indexlive.php#suggested.php">Yes</a> | <a href="javascript:hideNavSuggest();">No</a>' 
		},
		show: { effect: { type: 'slide' }, when: { event: 'click' }, solo: true },
		hide: { when: { event: 'click' }, fixed: true },
		position: { corner: { target: 'bottomLeft', tooltip: 'bottomMiddle' }, adjust: { screen: true } },
		style: {
			title: { 'font-size': 10 },
			width: 400,
			textAlign: 'center',
			'font-size': 9,
			name: 'gctvstyle'
		}
	});

	$('#navfeedback').qtip({
		content: {
			title: { text: 'Interrupt Stream?', button: '<img src="/images/icons/x_10.png" onclick="return false;" alt="Close" />' },
			text: 'Following this link will interrupt the stream you are watching.  Are you sure?<br/><a href="/forums/viewforum.php?f=2">Yes</a> | <a href="javascript:hideNavFeedback();">No</a>' 
		},
		show: { effect: { type: 'slide' }, when: { event: 'click' }, solo: true },
		hide: { when: { event: 'click' }, fixed: true },
		position: { corner: { target: 'bottomLeft', tooltip: 'bottomMiddle' }, adjust: { screen: true } },
		style: {
			title: { 'font-size': 10 },
			width: 400,
			textAlign: 'center',
			'font-size': 9,
			name: 'gctvstyle'
		}
	});

	$('#favNav').qtip({
		content: {
			title: { text: 'Interrupt Stream?', button: '<img src="/images/icons/x_10.png" onclick="return false;" alt="Close" />' },
			text: 'Following this link will interrupt the stream you are watching.  Are you sure?<br/><a href="/favorites.php">Yes</a> | <a href="javascript:hideNavFavorites();">No</a>' 
		},
		show: { effect: { type: 'slide' }, when: { event: 'click' }, solo: true },
		hide: { when: { event: 'click' }, fixed: true },
		position: { corner: { target: 'bottomLeft', tooltip: 'bottomMiddle' }, adjust: { screen: true } },
		style: {
			title: { 'font-size': 10 },
			width: 400,
			textAlign: 'center',
			'font-size': 9,
			name: 'gctvstyle'
		}
	});

}


});


// EOF
