jQuery(document).ready(function($) {

	$('#search_field').focus(function() {
		current_val = $(this).val();
		if(current_val == "Search...") {
			$(this).val("");
		}
	 	$(this).addClass('search_field_focus');
	})
	$('#search_field').blur(function() {
		current_val = $(this).val();
		if(current_val == "") {
			$(this).val("Search...");
		} 
	 	$(this).removeClass('search_field_focus');
	})

	$.preLoadImages("images/home_free_consultation_over.jpg");
	
	$('#action_button a img').hover(function(){
		$(this).attr('src', "images/home_free_consultation_over.jpg");
	}, function () {
		$(this).attr('src', "images/home_free_consultation.jpg");
	});
	
	$('#sub_menu ul li a.active').prepend('&raquo;&nbsp;&nbsp;&nbsp;');
	
});

$(function() {
	$('.popup').lightBox({fixedNavigation:true});
});

(function($) {
	var cache = [];
	// Arguments are image paths relative to the current page.
	$.preLoadImages = function() {
		var args_len = arguments.length;
		for (var i = args_len; i--;) {
			var cacheImage = document.createElement('img');
			cacheImage.src = arguments[i];
			cache.push(cacheImage);
		}
	}
})(jQuery)

