var player;
function playerReady(obj) {
	alert('the videoplayer '+obj['id']+' has been instantiated');
	player = document.getElementById(obj['id']);
};
var currentState;

function getUpdate(typ,pr1,pr2,pid) {
if(pid != "null") {
if((typ == "state")&&(pr1 != undefined)) {
	currentState = pr1;
	if(currentState=="3") {
		document.location.href="index.php?id=44";
	}
}
}
};

jQuery(document).ready(function() {
	var $ = jQuery
	jQuery('#menu > ul.menu > li > a').each(function(){
//		$(this).attr('href','#')

		var submenu = $(this).parent().find('ul')
		var dontClose = false
		submenu.hover(function(){
			dontClose = true
		}, function() {
			dontClose = false
			submenu.hide()
		})
		var s = $(this)
		s.hover(function(){
			//submenu.show()
			submenu.css('display','block');
		}, function(){
			s.animate({z:0},10, 'linear', function() {
			if(!dontClose) {
				submenu.hide()
			}
			})
		})
	})


})
