$(function(){
		   
		   /* This script changes main nav links hover state*/

		   
	$('#navList a')
		.css( {backgroundPosition: "0px -60px"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(60px 0px)"}, {duration:200})
		})
		
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0px -60px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0px -60px"})
			}})
		})
		
		
		/* This script changes square picture links hover state*/
		
				
		
	$('.square1')
		.css( {backgroundPosition: "0px 0px"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px -213px)"}, {duration:200})
		})
		
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0px 0px"})
			}})
		})
		
			$('.square2')
		.css( {backgroundPosition: "0px 0px"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px -213px)"}, {duration:200})
		})
		
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0px 0px"})
			}})
		})
		
			$('.square3')
		.css( {backgroundPosition: "0px 0px"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px -213px)"}, {duration:200})
		})
		
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0px 0px"})
			}})
		})
		
			$('.square4')
		.css( {backgroundPosition: "0px 0px"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px -213px)"}, {duration:200})
		})
		
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0px 0px"})
			}})
		})
		
		
		
		
		
});


/*DOM Style Controls - by Paul @ Yellow Pencil .com

This script changes the nav links to show active*/

function scriptInit() {
if (!document.getElementById) {
	return;
	}
}
function addEvent(elm, evType, fn, useCapture) {
	if (elm.addEventListener) {
	elm.addEventListener(evType, fn, useCapture);
	return true;
	} else if (elm.attachEvent) {
	var r = elm.attachEvent('on' + evType, fn);
	return r;
	} else {
	elm['on' + evType] = fn;
	}
}
function checkActive() {
	var a = document.getElementsByTagName("a");
	if (window.location.href.substr(location.href.length - 1, 1) == '/') {
		var loc = window.location.href + 'index.html'; 
	}
	else {
		var loc = window.location.href;
	}
	for(var i=0; i < a.length; i++) {
		if (a[i].href == loc) {
			a[i].setAttribute("class", "active");
			a[i].setAttribute("className", "active");
		}
	}
}
addEvent(window, 'load', checkActive, false);