$(document).ready(function(){
	$("ul.nav").supersubs({ 
            minWidth:    12,   // minimum width of sub-menus in em units 
            maxWidth:    27,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish();  // call supersubs first, then superfish, so that subs are 
                         // not display:none when measuring. Call before initialising 
                         // containing tabs for same reason. 
	$("#drawer").accordion({
   		autoHeight: true,
		active: $("dt:first"),
		selectedClass: 'open', 
		header: "dt" 
	});
	$("#imgalt").css({"filter": "alpha(opacity=85)", "-khtml-opacity": "0.85", "-moz-opacity": "0.85", "opacity": "0.85"});
	$("#slideshow").cycle({ 
    random: 1,
	fx: 'fade',
	speed: 750,
    timeout: 5000, 
	before: onBefore,
	after: onAfter
	});
	function onAfter() {
		var imgAnchor = $(this).attr("href");
		$("#imgalt").html($(this).children().attr("alt")).append("&nbsp;<a href='" + imgAnchor + "'>[More]</a>").fadeTo("normal", 0.85);
	}
	function onBefore() { 
	 	$("#imgalt").fadeTo("normal", 0);
	};
	/*var h = $("dd").height();
	$("dd").height(h);
	$("dd:not(:first)").hide();
	$("dt:first").addClass("open");
	$("dt").click(function(){
		$("dt.open").removeClass("open");
		$("dd:visible").slideUp("slow");
		$(this).addClass("open").next().slideDown("slow");
		return false;
	});*/
	var subscribe = $("#subscribe");
	var inside = $(".inside");
	subscribe.bind("focus", function(){
		inside.hide()
	});
	subscribe.bind("blur", function(){
		if (this.value==""){
			inside.show()}
		else {
			inside.hide()}
	});
});

	