//Load jQuery
google.load("jquery", "1.4.2");
google.load("maps", "2");
google.load("search", "1");

// effectively 'on document ready'
google.setOnLoadCallback(function() {

	var J = jQuery.noConflict();
	J(function($) {
		var $form = $('form');
		if ($form.length) {
			var $submit = $('input[type=submit]',this);
			if ($submit.length) {
				$submit.click(function() {
					$.post('form-fallback.php',$form.serialize(),function(data,responseText) {
						if (responseText == 'success') {
							var doSub = true;
						}
						else {
							var doSub = false;
               			}
					});
					return doSub;
				});
			}
		}			
		var defaultValue = jQuery('#SearchForm_SearchForm_Search').val();   
		jQuery('#SearchForm_SearchForm_Search').click(function() { 
		if( this.value == defaultValue ) { 
		jQuery(this).val("");
		} 
		}).blur(function() {
		if (this.value == '')
		{
		jQuery(this).val(defaultValue);
		}
		});		
		
        if (jQuery.browser.msie && jQuery.browser.version == '6.0' && jQuery("#NoIE6Warn").length > 0) {
		   $('body').prepend(
			  '<div id="message_box">The web-browser you are using is 10 years old and not fully supported. Please consider <a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">upgrading</a> or <a href="http://www.mozilla-europe.org/en/firefox/">using an alternative</a>.</div>'
		   );
        }
	});
});

