$j(document).ready(function(){
	setMenuNavigation();
	
	$j('a[class|=iframe]').click(function() {
			
			var url = this.href;
			
			myLightWindow.activateWindow({
				href: url + '?lightboxPage=true',
				height: 400,
				width: 600,
				title: '&nbsp;'
			});
			
			return false;
		}
	);

	var params = { menu: "false", wmode: "transparent", allowScriptAccess: "sameDomain", allowFullScreen: true };
	swfobject.embedSWF("/userfiles/flash/344x199_unta_palloon.swf", "cumulus-flash", "344", "199", "9.0.0", false, false, params);
	
});

function updateMenu(pid) {
	
	$j('a[href*=#]').removeClass('on');
	
	return;
	
	var request = new Ajax.Request(location.href, {
		method: 'post',
		parameters: 'do=ajaxUpdateMenu&pid=' + encodeURIComponent(pid),
		onComplete: function(t) {
			$('mainMenu').innerHTML = t.responseText;
			setMenuNavigation();
		}
	});
	
}

function setMenuNavigation() {
	
	$j('a[href*=#]').click(function() {
		$j(this).addClass('on');
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
				&& location.hostname == this.hostname) {
			var $target = $j(this.hash);
			$target = $target.length && $target || $j('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffsetTop = $target.offset().top;
				$j('html,body').animate({scrollTop: targetOffsetTop}, 1000, 'easeOutCirc');
				return false;
			}
		}
	 });	
}
