/* Project Name Global Javascript Functions

By Will Moore  - ISITE Design


*/

//start the jQuery functions
$(document).ready(function() {

	function cl(logit){
		if(window.console&&window.console.firebug){
			console.log(logit)
		}
	};//cl("hi");


	/*apply automatic input clearing to the search input - add as needed*/
	$("#searchform input").inputClear();


	/* add class to drop downs and buttons  */

	    $("#nav li, button").hover(
	            function() {
					$(this).addClass("over");
				},
	            function() {
					$(this).removeClass("over");
				}
	    );


});// document ready / end jquery functions


/* clear search field on click - made into plugin so it can easily be used more than once. */
jQuery.fn.inputClear = function() {
	return this.focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});
};