
function inputShowHideText(jQueryObject) {
   jQueryObject.each(function(i) {
       $(this).attr('defaultValue', $(this).val());
       $(this).blur(function() {
           if (this.value=='') this.value = this.defaultValue;
       });
       $(this).focus(function() {
           if (this.value == this.defaultValue) this.value = '';
       });
    });
} 



  
function getGet(name) {
	var q = document.location.search;
	var i = q.indexOf(name + '=');
		
	if (i == -1) {
		return false;
	}

	var r = q.substr(i + name.length + 1, q.length - i - name.length - 1);

	i = r.indexOf('&');

	if (i != -1) {
		r = r.substr(0, i);
	}
	return r.replace(/\+/g, ' ');
}


$(document).ready(function() {
	inputShowHideText($('#search input[name=s]'));
	
	$('a.print').click(function() {
		href = document.location.href.split('#')[0];
		href += href.indexOf('?')>0?'&print':'?print';
		window.open(href,'_blank','toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=700, height=600')
	})
	
	$('a.lightbox').lightBox();
});

