$(document).ready(function()
	{
	    //alert('Hello World');
		MinusGlobal._initialize();
	});
	
	

MinusGlobal = {
		
		/*
		Variable instances created
		*/
		isFuncValid: true,
		_sampleArray: [],
		objContent: null,
		_xmlDoc: null,
		myJSONObject: null,
		mySecondJsonObject: null,
		_maxSpeed: null,
		_minSpeed: null,
		
		
		
		/*
		Once the Document is ready this function runs 
		*/
		checkLoadInfo: function(){
			//Do Nothing
		},
		
	
		
		/*
		Initialize any properties
		*/
		_initialize: function(){
			MinusGlobal._createListeners();
			$('#home').css('backgroundImage', 'url("images/home.png")');
			$('#skills').css('backgroundImage', 'url("images/SKILLS.png")');
			$('#blog').css('backgroundImage', 'url("images/BLOG.png")');
			$('#contact').css('backgroundImage', 'url("images/contact.png")');
			$('.portfolioButtonContainer').css('backgroundImage', 'url("images/viewlivebutton.jpg")');

		},
		
		/*
		Creation Functions
		*/
		_createListeners: function(){
			
			
			$('.portfolioButtonContainer').mouseover(MinusGlobal.onOverViewLive);
			$('.portfolioButtonContainer').mouseout(MinusGlobal.onOutViewLive);
			
			$('#axe').click(MinusGlobal.onAxeClick);
			$('#chrysler').click(MinusGlobal.onChryslerClick);
			$('#dodge').click(MinusGlobal.onDodgeClick);
			$('#reach').click(MinusGlobal.onReachClick);
			$('#powerade').click(MinusGlobal.onPowerClick);
			
			//One way of adding an event listener
			$("#home").mouseover(MinusGlobal.onOverHome);
			$("#skills").mouseover(MinusGlobal.onOverSkills);
			$("#blog").mouseover(MinusGlobal.onOverBlog);
			$("#contact").mouseover(MinusGlobal.onOverContact);
			
			$("#home").mouseout(MinusGlobal.onOutHome);
			$("#skills").mouseout(MinusGlobal.onOutSkills);
			$("#blog").mouseout(MinusGlobal.onOutBlog);
			$("#contact").mouseout(MinusGlobal.onOutContact);
			
			$("#home").click(MinusGlobal.onClickHome);
			$("#skills").click(MinusGlobal.onClickSkills);
			$("#blog").click(MinusGlobal.onClickBlog);
			$("#contact").click(MinusGlobal.onClickContact);
			
		    //$("#left").click(MinusGlobal.onLeftClick);
			//$("#right").click(MinusGlobal.onRightClick);
			$("#left").bind("click",MinusGlobal.onLeftClick);
			$("#right").bind("click",MinusGlobal.onRightClick);
			
			
		},
		
		onOverViewLive: function(event)
		{
			$(this).css('backgroundImage', 'url("images/viewlivebuttonOver.jpg")');
		},
		
		onOutViewLive: function(event)
		{
			$(this).css('backgroundImage', 'url("images/viewlivebutton.jpg")');
		},
		
		
		onOverHome: function(event)
		{
			$('#home').css('backgroundImage', 'url("images/homeOver.png")');
		},
		
		onOverSkills: function(event)
		{
			$('#skills').css('backgroundImage', 'url("images/SKILLSOVER.png")');
		},
		
		onOverBlog: function(event)
		{
		    $('#blog').css('backgroundImage', 'url("images/BLOGOVER1.png")');
		},
		
		onOverContact: function(event)
		{
			$('#contact').css('backgroundImage', 'url("images/CONTACTOVER.png")');
		},
		
		
		onOutHome: function(event)
		{
			$('#home').css('backgroundImage', 'url("images/home.png")');
		},
		
		onOutSkills: function(event)
		{
			$('#skills').css('backgroundImage', 'url("images/SKILLS.png")');
		},
		
		onOutBlog: function(event)
		{
			$('#blog').css('backgroundImage', 'url("images/BLOG.png")');
		},
		
		onOutContact: function(event)
		{
			$('#contact').css('backgroundImage', 'url("images/contact.png")');
		},
		
		
		/*
		Mouse events - Navigation - Click
		*/
		onClickHome: function(event)
		{
			window.location =  "index.html"
		},
		
		onClickSkills: function(event)
		{
			window.location = "skills.html"
		},
		
		onClickBlog: function(event)
		{
			//window.location = "/javascriptredirect.php"
		},
		
		onClickContact: function(event)
		{
			window.location = "contact.html"
		},
		
		/*
		Sample Button Clicks
		*/
		
		onLeftClick: function(event)
		{
			$(".imageContainer").animate({ left:  "-=300px" }, 'slow');
		},
		
		onRightClick: function(event)
		{
			$(".imageContainer").animate({ left: "+=300px" }, 'slow');
		},
		
		
		/*
		Portfolio Clicks
		*/	
			onAxeClick: function(event)
		{
			window.open("http://www.axedirtydilemmas.com/");
		},
		onChryslerClick: function(event)
		{
			window.open("http://www.chrysler.com/");
		},
		onDodgeClick: function(event)
		{
			window.open("http://www.dodge.com/en/2011/reveal.html");
		},
		onReachClick: function(event)
		{
			window.open("http://www.brushwithstyle.com");
		},
		onPowerClick: function(event)
		{
			window.open("http://www.youtube.com/powerade");
		},
		
}


