(function($) {
	// clear searchbox 
	$('#SearchForm_SearchForm_Search').addClass('init');
	$('#SearchForm_SearchForm_Search').focus(function() {
		value = $(this).val();
		if (value == "Search") {
			$(this).val('');
			$(this).removeClass('init');
		}
	});
	$('#SearchForm_SearchForm_Search').blur(function() {
		value = $(this).val();
		if (value == "") {
			$(this).addClass('init');
			$(this).val('Search');
		}
	});
	
	$(document).ready(function() {
		// The tabs plugin always scroll page to the top (in IE) in order to workaround a bug with first tab selection
		// Below is a work around to preserve the last scroll position of the page
		if ($.browser.msie) lastScrollTop = $(window).scrollTop();
		
		// set up the tab
		$('#tabs').tabs();
		$('#ec-tabs').tabs();
		$('#ec-flight-tabs').tabs();
				
		// Re-assign the last scroll position to the window
		if ($.browser.msie) $(window).scrollTop(lastScrollTop);
	});
})(jQuery);
