// JavaScript Document

// Display Roll Over

function closeMenu() {
    $('#'+$(this).attr('id')+' .second_level').hide();
	$('#'+$(this).attr('id')+' .landmark').css({position:''});
	$('#'+$(this).attr('id')+' .landmark').css({color:'#333'});
	$('#'+$(this).attr('id')+' .desc').css({position:''});
	$('#'+$(this).attr('id')+' .desc').css({color:'#333'});
    $('#'+$(this).attr('id')+' .desc').css({marginTop:''});
}

$().ready(function(e) {
    //console.log($(window).height());
    //console.log($(document).height());
    $('#container').css({height: $(document).height()});
    $('#wrapper').css({height: $(document).height()});
    
    $('.strip').bind('mouseleave', function(e) {
		$('.strip').hide();
		$('.menu').each(closeMenu);
    });
    
});

function showMenu (landmark){
    
	if (landmark){
		document.getElementById("M" + landmark).style.zIndex = 200;

		if ($.browser.safari || ($.browser.msie && $.browser.version >= 7.0) || $.browser.mozilla) {
		    var position = 'absolute';
		    var marginTop = '12px';
		    if (document.getElementById("MM" + landmark)) {
        		document.getElementById("MM" + landmark).style.marginTop = '95px';
		    }
		} else {
		    var position = 'fixed';
		    var marginTop = '0px';
    		//document.getElementById("L" + landmark).style.top = (currentY-scrollY)+'px';
		}
		$("#M" + landmark + ' .landmark').css({position: position});
		$("#M" + landmark + ' .desc').css({position: position});
		$("#M" + landmark + ' .desc').css({marginTop: marginTop});
        
        if (document.getElementById("MM" + landmark)) {
    		document.getElementById("MM" + landmark).style.position = position;
    		document.getElementById("MM" + landmark).style.zIndex = 100;
    		document.getElementById("MM" + landmark).style.display = "block";
        }
		
		if (document.getElementById("L" + landmark).style.color != 'white') {
    		$('#M' + landmark + ' .landmark').css({color: "white"});
    		$('#M' + landmark + ' .desc').css({color: "white"});
    		
		}
		var h = $('#wrapper').height();
		$('#STRIP'+landmark).css({height: h});
        $('#STRIP'+landmark).show();
		
		$('.strip:not(#STRIP'+landmark+')').hide();
		$('.menu:not(#M'+landmark+')').each(closeMenu);
	}
}