$(document).ready(function() {
	$('input[title]').each(function() {
		if($(this).val() === '') {
			$(this).val($(this).attr('title'));
		}

		$(this).focus(function() {
			if($(this).val() === $(this).attr('title')) {
				$(this).val('').addClass('focused');
			}
		});

		$(this).blur(function() {
			if($(this).val() === '') {
				$(this).val($(this).attr('title')).removeClass('focused');
			}
		});
	});
});

$(document).ready(function() {
	$('textarea[title]').each(function() {
		if($(this).val() === '') {
			$(this).val($(this).attr('title'));
		}

		$(this).focus(function() {
			if($(this).val() === $(this).attr('title')) {
				$(this).val('').addClass('focused');
			}
		});

		$(this).blur(function() {
			if($(this).val() === '') {
				$(this).val($(this).attr('title')).removeClass('focused');
			}
		});
	});
});

/* Image Fade */

jQuery(function () {
        if (jQuery.browser.msie && jQuery.browser.version < 6) return;
        
        jQuery('.fade')
            .removeClass('highlight')
            .find('a:first')
            .append('<span class="hover" />').each(function () {
                    var span = jQuery('> span.hover', this).css('opacity', 0);
                    jQuery(this).hover(function () {
                        // on hover
                        span.stop().fadeTo(400, 1);
                    }, function () {
                        // off hover
                        span.stop().fadeTo(100, 0);
                    });
                });				
				
});
