$(document).ready(function() {
	$('#header form .text').each(function() {
		searchText = $(this).val();

		$(this).focus(function() {
			if($(this).val()==searchText) {
				$(this).val('');
			}
		});

		$(this).blur(function() {
			if(empty($(this).val())) {
				$(this).val(searchText);
			}
		});
	});
});

function empty(str) {
	if (str === "" || str === 0 || str === "0" || str === null || str === false || typeof str === 'undefined') {
		return true;
	}
	if (typeof str == 'object') {
		var key;
		for (key in str) {
			return false;
		}
		return true;
	}
	return false;
}

// Google Analytics
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12426860-1']);
_gaq.push(['_trackPageview']);

(function() {
  var ga = document.createElement('script');
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
      'http://www') + '.google-analytics.com/ga.js';
  ga.setAttribute('async', 'true');
  document.documentElement.firstChild.appendChild(ga);
})();