$(document).ready(function() {

	$.fn.search = function() {
	    return this.focus(function() {
	        if( this.value == this.defaultValue ) {
	            this.value = "";
	        }
	    }).blur(function() {
	        if( !this.value.length ) {
	            this.value = this.defaultValue;
	        }
	    });
	};
	
	$('a.new-window').click(function(){
		window.open(this.href);
		return false;
	});
	
	$('input.txt').search();
	$('textarea').search();
	
	$('.modal').fancybox();

});

$('a[href="https://secure.livebookings.com/LBDirect/"]').click(function() {
	_gaq.push(['_trackEvent', 'Table booking form', 'Open']);
	return false;
});
