function loadMain(page_selected) {
		if (page_selected) {
			$("#menu li a#"+page_selected).addClass("active").css('opacity',1);
		}
        $("#menu li a").css('opacity',0.6);
        $("#menu li a").hover(function() {
            $(this).stop().animate({ opacity: 1 }, 200);
        },	function() {
            $(this).stop().animate({ opacity: 0.6 }, 300);
        });	
        if($(".gallery").length !=0) {
			$(".gallery li a").equalizeCols();
            $(".gallery li a").css('opacity',0.6);
            $(".gallery li a").hover(function() {
                $(this).stop().animate({ opacity: 1}, 300);
                //$(this).find('img').stop().animate({ borderTopColor:'#3d4a35', borderLeftColor:'#3d4a35', borderRightColor:'#3d4a35', borderBottomColor:'#3d4a35' }, 200);
            },	function() {
                $(this).stop().animate({ opacity: 0.6}, 300);
                //$(this).find('img').stop().animate({ borderTopColor:'#000000', borderLeftColor:'#000000', borderRightColor:'#000000', borderBottomColor:'#000000' }, 300);
            });	
        }
        if($("#videonav a").length !=0) {
            $("#videonav a").css('opacity',0.3);
            $("#videonav a").hover(function() {
                $(this).stop().animate({ opacity: 0.7}, 300);
            },	function() {
                $(this).stop().animate({ opacity: 0.3}, 300);
            });	
        }
        if($("#contactform").length !=0) {
			$(".input").css('opacity',0.7);
		}
}
function loadIndex() {
	jQuery.event.add(window, "load", resizeFrame);
	jQuery.event.add(window, "resize", resizeFrame);
	
	function resizeFrame() 
	{
	    var h = $(window).height() / 2 - 50;
	//	var h = $(window).height() - 150;
		$("#backgrounds").stop().animate({ height:h+'px', opacity:0.6}, 400);//(h < 1024 || w < 768) ? 500 : 400);
	}	
    $("#menu li a").css('opacity',0.6);
    $("#menu li a").hover(function() {
        $(this).stop().animate({ opacity: 1 }, 200);
    },	function() {
        $(this).stop().animate({ opacity: 0.6 }, 300);
    });	
	$("#menu li a").click(function(event) {
		var $bgDiv = $("#backgrounds");
		var $contentDiv = $("#wrapper-intro");
		var redir = $(this).attr("href");
		$bgDiv.stop().animate({height:'5px'},600, function() {
			$contentDiv.stop().animate({opacity:0},600, function() { document.location.href = redir; });
		});
		event.preventDefault();
	});		
}
function loadIndexIE() {
	jQuery.event.add(window, "load", resizeFrame);
	jQuery.event.add(window, "resize", resizeFrame);
	
	function resizeFrame() 
	{
		var h = $(window).height() / 2 - 50;
		$("#backgrounds").css({height:h, opacity:0.6});
	}	
    $("#menu li a").css('opacity',0.6);
    $("#menu li a").hover(function() {
        $(this).stop().animate({ opacity: 1 }, 200);
    },	function() {
        $(this).stop().animate({ opacity: 0.6 }, 300);
    });	
}
