$(document).ready(function() {
 
	/*
	 * open external links in new window
	 */
    $('a[href^="http://"]').attr("onclick", "window.open(this.href); return false");
 
	/*
	 * clear search box on focus
	 */
	$('#SearchText').formFocus();

});

(function($) {
 
	$.fn.formFocus = function() {  
		return this.each(function() {
			var field = $(this);
			
			field.focus(function() {
				if (this.value == this.defaultValue) {
					field.val('');
				}
			});
			
			field.blur(function() {
				if (!this.value.length) {
					field.val(this.defaultValue);
				}
			});
		});
	};

})(jQuery);