$(function(){
	
	$("#Toolbar ul li a").mouseover(function(){
	    $(this).find("img").attr("src",$(this).find("img").attr("src").replace("-off","-on"));
	});
	
	$("#Toolbar ul li a").mouseout(function(){
	    if (!$(this).find("img").hasClass("current")){
		    $(this).find("img").attr("src",$(this).find("img").attr("src").replace("-on","-off"));
		}
	})

    // Textbox hints
    $.fn.textboxhint = function (userOptions) {
        var options = $.extend({}, $.fn.textboxhint.defaults, userOptions);
        return $(this).filter(':text,textarea').each(function () {
            if ($(this).val() == options.hint) { $(this).val(''); }
            if ($(this).val() == '') {
                $(this).focus(function () {
                    if ($(this).attr('typedValue') == '') {
                        $(this).removeClass(options.classname).val('');
                    }
                }).blur(function () {
                    $(this).attr('typedValue', $(this).val());
                    if ($(this).val() == '') {
                        $(this).addClass(options.classname).val(options.hint);
                    }
                }).blur();
            }
        });
    };

    $.fn.textboxhint.defaults = {
        hint: 'Please enter a value',
        classname: 'text-hint'
    };

    // Common textbox hints
    $('.Address').textboxhint({ hint: 'Address' });
    $('.City').textboxhint({ hint: 'City' });
    $('.State').textboxhint({ hint: 'State' });
    $('.Zip').textboxhint({ hint: 'Zip' });
    $('.Country').textboxhint({ hint: 'Country' });
    $('.Email').textboxhint({ hint: 'Email' });
});
