$(document).ready(function(){

// Initialise Superfish main menu.
	$('ul.sf-menu').superfish({
		autoArrows:		false,				// if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance
		delay:			800,				// the delay in milliseconds that the mouse can remain outside a submenu without it closing
		dropShadows:	false,				// completely disable drop shadows by setting this to false
//		pathClass:		'current',			// current navigation path indicator
		hoverClass:		'sfHover'			// the class applied to hovered list items 

	});

// Generate a window.open function when the document is ready.
    $('A[rel="external"]').click( function(){
        window.open( $(this).attr('href') );
        return false;
    });

// Search form watermarking
    swapValues = [];
    $("#search, #addr").each(function(i){
        swapValues[i] = $(this).val();
        $(this).focus(function(){
            if ($(this).val() == swapValues[i]) {
                $(this).val("");
            }
        }).blur(function(){
            if ($.trim($(this).val()) == "") {
                $(this).val(swapValues[i]);
            }
        });
    });

// Generate the footer's copyright year.
//    $("#copy-year").text( (new Date).getFullYear() );

});

