var newMICounter = 0;/*function checkMenuInsert() {	if (newMICounter == 0) {		alert("U heeft nog geen menuitems toegevoegd.")		return false;	}	return true;}*/function newMenuitem() {	showLoading();	$.ajax({		url: "modules/Menu/ajax/newMenuitem.php?counter=" + newMICounter,		success: function(data) {		    $("#sortable").append(data);			$("#sortable").sortable({ 				axis: 'y', 				cursor: 'n-resize' 			});			$("#sortable").disableSelection();						$("#sortable li").hover(			  function () {			    $(this).find('span').html('<img src=\"../img/icons/arrow_inoutgrey.png\" alt=\"sort\">');			  }, 			  function () {			    $(this).find('span').html('&nbsp;');			  }			);			hideLoading();		}	});	newMICounter++;}function deleteMI(id) {	elem = document.getElementById("mi_" + id);	elem.parentNode.removeChild(elem);}function deleteNMI(counter) {	elem = document.getElementById("n_mi_" + counter);	elem.parentNode.removeChild(elem);}function editMI(id) {	showLoading();	$.ajax({		url: "modules/Menu/ajax/editMenuitem.php?id=" + id,		success: function(data) {			$("#editItem").html(data);			hideLoading();		}	});}function newPageFromMI(pid, mid, lang) {	var r = confirm("Er is nog geen pagina aan dit menuitem gekoppeld. Wilt u een nieuwe pagina aanmaken?");	if (r == true) {		showLoading();		$.ajax({			url: "modules/Menu/ajax/newPage.php?pid=" + pid + "&mid=" + mid + "&lang=" + lang,			success: function(data) {				hideLoading();				document.location = 'index.php?pid=' + data + "&lang=" + lang;			}		});	}}function changeUrl(pid, type) {	if(type == 'url'){		document.getElementById('url'+pid).style.display = "inline-block";		document.getElementById('page'+pid).style.display = "none";	} else {		document.getElementById('page'+pid).style.display = "inline-block";		document.getElementById('url'+pid).style.display = "none";	}	}function changeN_Url(NMId, type) {	if(type == 'url'){		document.getElementById('N_url'+NMId).style.display = "inline-block";		document.getElementById('N_page'+NMId).style.display = "none";	} else {		document.getElementById('N_page'+NMId).style.display = "inline-block";		document.getElementById('N_url'+NMId).style.display = "none";	}}/*$(function () {    $(".tabs li a").hover(function() {        $(this).next(".dropdown").slideDown('fast').show();       });    $('.dropdown').mouseleave(function(){        $('.dropdown').slideUp('slow').hide();    });        $('body:not(.tabs)').hover(function() {        $('.dropdown').slideUp('slow').hide();    })        });*/$(document).ready(function() {        $("ul.topnav li").hover(function() { //When trigger is clicked...	//Following events are applied to the subnav itself (moving subnav up and down)	$(this).find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click	$(this).hover(function() {	}, function(){		$(this).find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up		//alert('a');	})	//Following events are applied to the trigger (Hover events for the trigger)	});		/*	).hover(function() {		$(this).addClass("subhover"); //On hover over, add class "subhover"	}, function(){	//On Hover Out		$(this).removeClass("subhover"); //On hover out, remove class "subhover"    })	*/    });			
