/* slide menu */
var _id = 'menu';
var _slideEl = 'ul';
var _duration = 300;
var _hide = true;

var wrap;
var clicked;

$(document).ready(function() {
    $('#' + _id + ' a').click(function() {
        //if (_hide) hideLevels(this);
        //$(this).next(_slideEl).toggle(_duration);
        //$(this).parent().toggleClass('active');
    });

    $('input[title!=""]').hint();

    $("ul.menu a:not(.active)").parent().find("ul").hide();

    $("a.popup").click(function() {
        var url = $(this).attr("href");
        if (url != undefined) {
            enlarge($.url.setUrl(url).attr("path"));
            return false;
        }
    });
    //var detail = window.location.href;
    //var list = $(".link").attr("href");

    if ($("#popup").length >= 1) {
        enlarge1();
    }
});

////function loadPopup(detail) {
////    alert('Begin Popup');
////	alert($("#fader").html());
////	alert($("#lightbox").html());
////	
////    $("#content").append("<div id='popup'></div>");
////    $("#popup").load(detail + " #popup", function() { enlarge1(); });
////    
////    
////    
////    alert('Einde Popup');
////	        alert($("#fader").html());
////	        alert($("#lightbox").html());
////}

//function hideLevels(_this){
//	$('.'+_id+' li').each(function() {
//		var _f = false;
//		var _a = $('a', this).each(function(i, _el) {
//			if (_el == _this) _f = true;
//		});
//		if (!_f)  {
//			$(_slideEl, this).hide(_duration);
//			$(this).removeClass('active');
//		}
//	});
//}