$(document).ready(function(){	
	$("div.hSecondaryFeat").last().addClass("last"); // Home secondary feature
	$("div.testimonial-item:first").addClass("testimonial-first"); // Testimonials & stories
	$(".eventContent ul.productfeaturelist").before("<h3 class='regH3'>Registration and Sponsorship<a name='eventReg'></a></h3>");

	$("#topnav").find("ul").each(function(i){
		$('li', this).last().addClass('tnlast');
	});	

	$('.sbevent').hover(function(){
		$(".cover", this).stop().animate({top:'0'},{queue:false,duration:160});
	}, function() {
		$(".cover", this).stop().animate({top:'100px'},{queue:false,duration:160});
	});

	$("input#Amount").val('0');
	$("span.total").text($("input#Amount").val());
	
	var output = $("#poker-reg #Amount");
	$("#poker-reg #CAT_Custom_254984").keyup(function() {
		var value = parseFloat($(this).val());
		output.val(value*75 + '.00');
		$("span.total").text($("input#Amount").val());
	});

	$("#gallery").append("<ul />");

        $("ul#topnav").supersubs({ 
            minWidth:    10.714,	// min width 
            maxWidth:    18,   		// max width 
            extraWidth:  1			// extra width can ensure lines don't sometimes turn over 
									// due to slight rounding differences and font-family 
        }).superfish({ 
            delay:       500,                       // one second delay on mouseout 
            animation:   {opacity:'show'},  		// fade-in and slide-down animation 
            speed:       'fast',                  // faster animation speed 
            autoArrows:  false,	                  	// disable generation of arrow mark-up  
     		dropShadows: true 
		});
		
		$(".ffocus").each(function() {
			$(this).val($(this).attr("title"));
			$(this).css({ color: "#999999" });
		});
		$(".ffocus").focus(function() {
			if ($(this).val() == $(this).attr("title")) {
				$(this).val("");
				$(this).css({ color: "#666666" });
			}
		}).blur(function() {
			if ($(this).val() == "") {
				$(this).val($(this).attr("title"));
				$(this).css({ color: "#999999" });
			}
		});
}); 

