
if(typeof securely == "undefined")
{
	var securely = false;
}

path = new Array();
path.push('/static/js/lib/animator.js');
path.push('/static/js/lib/prototype.js');
path.push('/static/js/classes.js');
loadScrips(path);

function onDocumentLoad ()
{
	var elementhover = new classSwitcher( [ $$('#metanav li'), $$('#metanav li ul li'), $$('#metanav li ul li ul li') ] );
	
	if($('languages') != null)
	{
		var languages = new dropDown($('languages'));
	}

}


//window.onload = onDocumentLoad;

function loadScrips (path)
{
	for(i=0;i<path.length;i++)
	{
		if(securely == true)
		{
			document.write('<script type="text/javascript" src="https://secure.skiamade.com' + path[i] + '"></script>');
		}
		else
		{
			document.write('<script type="text/javascript" src="' + path[i] + '"></script>');
		}
	}
}


function getLink(vari,target)
{
	if(target == "_blank")
	{
		window.open(vari);
	}
	else
	{
		window.location.href = vari;
	}
}


function parseUri (str) {
	var	o   = parseUri.options,
		m   = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
		uri = {},
		i   = 14;

	while (i--) uri[o.key[i]] = m[i] || "";

	uri[o.q.name] = {};
	uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
		if ($1) uri[o.q.name][$1] = $2;
	});

	return uri;
};

parseUri.options = {
	strictMode: false,
	key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
	q:   {
		name:   "queryKey",
		parser: /(?:^|&)([^&=]*)=?([^&]*)/g
	},
	parser: {
		strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
		loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
	}
};

