/**
 * Author => Company       : Prodo Ltd
 *        => Website       : http://www.prodo.com
 * Code   => Last Modified : 7 January 2010
 */

$(document).ready(function() {
	
	$('a[rel=external]').click(function(e) {
		open(this.href);
		e.preventDefault();
	}).attr('title', 'Opens in a new window');
	
	$('input.clear-default').clearDefault();
	
	// 
	$('#header ul li a').hover(function() {
		$(this).parent().find('ul').show();
		
		$(this).parent().hover(function() {
		}, function() {
			$(this).parent().find('ul').hide();
		});
	});
	
	// 
	$('#header ul li a[href^="http"]').attr('target', '_blank');
	
});

// Remove default text from an input box
(function($) {
	$.fn.clearDefault = function() {
		return this.each(function() {
			var default_value = $(this).val();
			$(this).focus(function() {
				if($(this).val() == default_value)
					$(this).val('');
			});
			$(this).blur(function() {
				if($(this).val() == '')
					$(this).val(default_value);
			});
		});
	};
})(jQuery);