var $id = function(objId){return document.getElementById(objId);}

$("document").ready
(
 	function()
	{
		if($("#worksConsole"))
		{
			$("#worksConsole").find("img").mouseover
			(
				function()
				{
					$(this).animate({top:"-=10px"}, 100);
				}
			);
			
			$("#worksConsole").find("img").mouseout
			(
				function()
				{
					$(this).animate({top:"+=10px"}, 100);
				}
			);
		}//end worksConsole function
		
		if($("#iconDock"))
		{
			$("#iconDock").find("img").mouseover
			(
				function()
				{
					$(this).animate({top:"-=5px"}, 100);
				}
			);
			
			$("#iconDock").find("img").mouseout
			(
				function()
				{
					$(this).animate({top:"+=5px"}, 100);
				}
			);
		}//end iconDock function
		
		//rightTabs
		$("#rightTabs").find("img").mouseover
		(
			function()
			{
				$(this).animate({right:"+=20px"}, 100);
			}
		);
		
		$("#rightTabs").find("img").mouseout
		(
			function()
			{
				$(this).animate({right:"-=20px"}, 100);
			}
		);//end rightTabs functions
		
		var externalLinks = document.getElementsByTagName("a");
		for (var i=0; i<externalLinks.length; i++)
		{
			if(externalLinks[i].className.indexOf("externalLink") > -1)
			{
				externalLinks[i].onclick = function()
				{
					window.open(this.getAttribute("href"));
					return false;
				}
			}
		}//end externalLinks function
	}
);

function validateForm()
{
	for(var i=0; i<arguments.length; i++)
	{
		if($id(arguments[i]).value == "")
		{
			alert("Please fill out all required fields");
			return false;
		}
	}
}
