$(document).ready(function () {

	/*
	$(window).scroll(function() {
		$('#forumlink').css('top', ($(this).scrollTop() + 252) + "px");
	});
	*/
	
	// SEARCH LIVE COMPETITIONS

	var searchText = 'Search live competitions';
	$("#searchField").val(searchText);
	$("#searchField").live('focus', function() {
		if ($(this).val() == searchText) {
			$(this).val('');
		}
	});
	$("#searchField").live('blur', function() {
		if ($(this).val() == '') {
			$(this).val(searchText);
		}
	});
	
	
	// SEARCH LIVE COMPETITIONS
	
	$(".defaultText").focus(function(srcc) {
		if ($(this).val() == $(this)[0].title) {
			$(this).removeClass("defaultTextActive");
			$(this).val("");
		}
	});
	
	$(".defaultText").blur(function() {
		if ($(this).val() == "") {
			$(this).addClass("defaultTextActive");
			$(this).val($(this)[0].title);
		}
	});
	
	$(".defaultText").blur();        
	
});

$.fn.extend({ 
	disableSelection: function() { 
		this.each(function() { 
			if (typeof this.onselectstart != 'undefined') {
				this.onselectstart = function() { return false; };
			} else if (typeof this.style.MozUserSelect != 'undefined') {
				this.style.MozUserSelect = 'none';
			} else {
				this.onmousedown = function() { return false; };
			}
		}); 
	} 
});
