var currentSub = null;

function checkImg(currentImg) {
	if(currentSub != null) {
		fadeout(currentSub);
	}
		currentSub = currentImg;
}


if(BrowserDetect.OS != "iPhone/iPod") {
		$j(document).ready(function () {
			$j.localScroll.defaults.axis = 'y';
			
			$j.localScroll({
				target: 'body'
			});
		});	

}
		$j(document).ready(function() {
			$j('.fade').dwFadingLinks({
				color: '#ec008c',
				duration: 200
			});
		 });


/*		$j(document).ready(function() {
			$j('.subfade').dwFadingLinks({
				color: '#ec008c',
				duration: 300
			});
		 });


		$j(document).ready(function() {
			$j('.collapsed').dwFadingLinks({
				color: '#000',
				duration: 300
			});
		 });
*/

//		$j(document).ready(function() {
//			$j('.expanded').dwFadingLinks({
//				color: '#414142',
//				color: '#000',
//				duration: 300
//			});
//		 });


		function fade(div_id) {
			$j('#'+div_id).fadeIn('fast');
		}
		
		function fadeout(div_id) {
			$j('#'+div_id).fadeOut('fast');
		}		


	function setFooterLeft() {
		var x, y, msg='';
		
		// for all except Explorer
		if (self.innerHeight) {
		x = self.innerWidth;
		y = self.innerHeight;
		msg = x;
		
		// Explorer 6 Strict Mode
		} else if (document.documentElement	&& document.documentElement.clientHeight) {
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
		msg = x;
		
		// other Explorers
		} else if (document.body) {
		x = document.body.clientWidth;
		y = document.body.clientHeight;
		msg = x;
		}
		document.getElementById('dock').style.left=((x/2)-558)+"px";
	}

	
	var highlightedMenu = null;
	function setMenuColor(currentMenu) {
		highlightedMenu = currentMenu;
		document.getElementById("gMenu").style.color="black";
		document.getElementById("sMenu").style.color="black";
		document.getElementById("fMenu").style.color="black";
		document.getElementById("pMenu").style.color="black";
		document.getElementById("dMenu").style.color="black";
		document.getElementById(currentMenu).style.color="#ec008c";
	}	
	function hoverMenu(mItem) {
		if(mItem.id != highlightedMenu) {
			mItem.style.color="#ec008c";
		}
	}
	function hoverMenuOut(mItem) {
		if(mItem.id != highlightedMenu) {
			mItem.style.color="black";
		}
	}

