var si;
$(document).ready(function(){
													 
	/* ------- TOP SECTION LAYOUTING --------- */
	$("#top-section-wrapper div:eq(0)").css("float", "left");
	$("#top-section-wrapper div:eq(0)").css("height", 165);
	
	/* ------- PNG FIX --------- */
	$(document).pngFix();
	
	/* ------- LAVA LAMP --------- */
	$(function() { $(".lavaLamp").lavaLamp({ fx: "backout", speed: 700 })});
	/*$('#fade').cycle();*/
	
	/* ------- SUBMENU --------- */
	$("ul.submenu").css('display','none');
	$("a.sub").hover(function() {	
			$("ul.submenu").slideDown("slow");
	}, function(){
			si = setTimeout(function(){ $("ul.submenu").slideUp("slow"); }, 500); 
	});
	$("ul.submenu").hover(function() {		
			clearInterval(si);
			//$(this).show();
	}, function(){
			$(this).slideUp("slow");
	});
});

/* -------- SLIDE PANEL --------- */
var slider_opened = false;
		var opened_height = 150;
		var closed_height = 35;
		$(function(){
			$("#contact-header").click(function(){
					var h = (!slider_opened) ? opened_height : closed_height;
					var t = -h;
					$("#contact_slider").animate({ height:h+"px", top: t+"px" }, 500)
					slider_opened = !slider_opened;
			});
			
		});
