
if (typeof addLoadEvent != 'function') {
	function addLoadEvent(func) {
	  var oldonload = window.onload;
	  if (typeof window.onload != 'function') {
		window.onload = func;
	  } else {
		window.onload = function() {
		  if (oldonload) {
		    oldonload();
		  }
		  func();
		}
	  }
	}
}

function searchBarFeature() {
	var queryInput = document.getElementById('ths_simpleSearch_query');
	queryInput.value = 'Tánciskola keresés';
	queryInput.rel = '';
	queryInput.style.color = '#999';
	queryInput.onfocus = function () {
		this.style.color = '#000';
		if (this.rel == '') {
			this.rel = this.value;
			this.value = '';
		}
	}
	queryInput.onblur = function () {
		this.style.color = '#999';
		if (this.value == '') {
			this.value = this.rel;
			this.rel = '';
		}
	}
	var submitForm = document.getElementById('ths_simpleSearch');
	submitForm.onsubmit = function () {
		var queryInput = document.getElementById('ths_simpleSearch_query');
		if (queryInput.rel == '') {
			queryInput.rel = queryInput.value;
			queryInput.value = '';
		}
	}
	
}
addLoadEvent(searchBarFeature);

