 /**
 * @author Profitroom
 */

var mapFX;
var mapHolder;
var lastLI;

window.addEvent('domready',function(){
	mapHolder = $('holderLocal');
	mapHolder.setStyle('top','366px');
	mapFX = new Fx.Tween(mapHolder,{link:'cancel',transition:Fx.Transitions.SineEaseInOut});
	mapHolder.addEvents({
		'mouseenter':function()
		{
			toggleMap();
		},
		'mouseleave':function()
		{
			toggleMap();
		}
	});
})

function toggleMap()
{
	if(mapHolder.getStyle('top').toInt()>=300)
	{
		return mapFX.start('top','160px');
	}
	if(mapHolder.getStyle('top').toInt()<200)
	{
		return mapFX.start('top','366px');
	}
}

function setSound(option)
{
	Cookie.write('sound',option);
}

function getSound(option)
{
	var cookie = Cookie.read('sound');
	if(cookie=='true')
	{
		siteSound = cookie;
	}
	if(cookie=='false')
	{
		siteSound = cookie;
	}
}

// IE only function

startList = function(elementId) {
				document.addEvent('domready',function(){
                if (document.all||document.getElementById) {
                navRoot = $(elementId).getElement('ul');
                if (!navRoot) return;
                               for (i=0; i<navRoot.childNodes.length; i++) {

                               node = navRoot.childNodes[i];

                                               if ( (node.nodeName=="LI") || (node.nodeName=="DL") || (node.nodeName=="DD") || (node.nodeName=="DT") ) {

                                                               node.onmouseover=function() {
                                                                   this.className+=" over";
									

                                                               }

                                                               node.onmouseout=function() {
                                                                   this.className=this.className.replace(" over", "");

                                                               }

                                               }

                               }

                }
				})

}

