// remap jQuery to $
(function($){})(window.jQuery);


/* trigger when page is ready */
$(document).ready(function (){

var mainLi = jQuery('#menu_nav li.page-item-6');

			mainLi
			.find('.children')
			.hide()
			.end()
			.hover(function () {

				jQuery(this).find('.children').stop(true, true).slideDown('slow');

			}, function() {

				jQuery(this).find('.children').stop(true, true).fadeOut('fast'); 	

			});


  $("#contactLink").click(function(){
                    if ($("#contactForm").is(":hidden")){
						$("#page-wrap").css({ opacity: 0.5 });
                        $("#contactForm").slideDown("slow");
						
                    }
                    else{
                        $("#contactForm").slideUp("slow");
						$("#page-wrap").css({ opacity: 1 });
                    }
					
			    });
				
	$("#page-wrap").click(function(){ 
		$("#contactForm").slideUp("slow"); 
		$("#page-wrap").css({ opacity: 1 })
		 });
				
				});
				
            function closeForm(){
                $("#messageSent").show("slow");
                setTimeout('$("#messageSent").hide();$("#contactForm").slideUp("slow");$("#page-wrap").css({ opacity: 1 })', 2000);
			}
		   


              

/* optional triggers

$(window).load(function() {
	
});

$(window).resize(function() {
	
});

*/
