jQuery.preloadImages = function()
{
 for(var i = 0; i<arguments.length; i++)
 {
  jQuery("<img>").attr("src", arguments[i]);
 }
};
$.preloadImages("images/navi_about_on.jpg","images/navi_expertise_on.jpg","images/navi_news_on.jpg","images/navi_projects_on.jpg","images/navi_contact_on.jpg");

$(document).ready(function() {
$('.navi').hover(function() {
	
	activeSrc = $(this).attr("src");
	activeSrc = activeSrc.replace("_off","_on");
	$(this).attr("src",activeSrc);
		}, function() {
	activeSrc = $(this).attr("src");
	activeSrc = activeSrc.replace("_on","_off");
	$(this).attr("src",activeSrc);
});



});

$(document).ready(function() {

    $('input').keydown(function(event) {
        if (event.keyCode == 13) {
            return false;
        }
    });

    $('input.searchItems').focus(function() {
        theString = $(this).attr("value");
        if (theString == "Keyword Search") {

            $(this).attr("value", "");
        }

    });



});

var searchFlag = 0;

function toggleSearch() {
    if (searchFlag == 0) {

        searchFlag = 1;
        $("#property_search img").attr("src","images/property_search_up.jpg");
        $("#property_search_form").css("display","block");
    }
    else {
    	$("#property_search img").attr("src","images/property_search.jpg");
        $("#property_search_form").css("display", "none");
        searchFlag = 0;
    }

};