$(function() {
	
	// IE fix - add :hover to any element
    if (document.all) {
        $("#pnav li.pnav-li").hoverClass("sfhover");
    }
	   
});	

$.fn.hoverClass = function(c) {
    return this.each(function(){
        $(this).hover( 
            function() { $(this).addClass(c); $('div.junk').remove();  },
            function() { 
				var element = $(this);
				element.removeClass(c); 
				setTimeout(function() {element.append('<div class="junk"></div>');}, 0);
			}
        );
    });
};

// 
// jQuery Input Hints plugin
// Copyright (c) 2009 Rob Volk
// http://www.robvolk.com

jQuery.fn.inputHints=function() {
    // hides the input display text stored in the title on focus
    // and sets it on blur if the user hasn't changed it.

    // show the display text
    $(this).each(function(i) {
        $(this)
            .addClass('inputHint')
            .val($(this).attr('title'));
    });

    // hook up the blur & focus
    $(this).focus(function() {
        if ($(this).val() == $(this).attr('title'))
            $(this)
                .removeClass('inputHint')
                .val('');
    }).blur(function() {
        if ($(this).val() == '')
            $(this)
                .addClass('inputHint')
                .val($(this).attr('title'));
    });
};
