
if(!window.jQuery) alert('jQuery not loaded');
else (function($){
	
	function init() {
		
		// BEGIN: initialize the superfish menu
	
//		$.event.special.hover.delay = 100;
//		$.event.special.hover.speed = 100;
			
		$(".sf-menu")
			.supersubs({minWidth:15, maxWidth:25, extraWidth:0})
			.superfish({hoverClass:'sfHover', pathClass:'active', pathLevels:0, delay:200, animation:{opacity:'show'}, speed:'def', autoArrows:1, dropShadows:1})
			.find('ul').bgIframe({top:'auto', left:'auto', width:'auto', height:'auto', opacity:0, src:'javascript:false;'});
		
		// END: initialize the superfish menu
		
		// set up input focus/blur display text //
		$('input[type=text]').each( function() {
			if(!$(this).data('displaytext')) return;
			$(this).focus( function() { if($(this).removeClass('blank').val()==$(this).data('displaytext')) $(this).val(''); } );
			$(this).blur( function() { if($(this).val()=='') $(this).addClass('blank').val($(this).data('displaytext')); } );
			// blur initially
			$(this).addClass('blank').val($(this).data('displaytext'));
			// clear the display text on submission
			$theEl = $(this);
			$(this.form).bind('submit', function() { if($theEl.val()==$theEl.data('displaytext')) $theEl.val(''); } );
		} );
		
	}
	
	$(init);
	
})(jQuery);
