
$(document).ready(function(event){
    $("#divHeaderMenu .icons a").mouseover(function(){
        $(".linkRef").html($(this).attr('alt'));
    });
    $("#divHeaderMenu .icons a").mouseout(function(){
        $(".linkRef").html('');
    });
    $("#searchMain .text").focus(function(){
        if($(this).val()==' Search the Sermon Network'){
	    $(this).val('');
        }
    });
    $("#searchMain .text").blur(function(){
        if('' == $(this).val()){
    	    $(this).val(' Search the Sermon Network');
	}
    });
                                                                        
$("#searchMain .but").click(function(){
    key = $("#searchMain .text").val();
    if ( key=='' || key==' Search the Sermon Network') {
        alert('Please enter keyword')
        $("#searchMain .text").focus();
    }
    else
        searchMain($("#searchMain .text").val());
    });

$("#searchMain").submit(function(){
    $("#searchMain .but").click();
    return false;
    });
});

