/******************************/
/* Monmouth Dean jQuery Core  */
/******************************/
/* Author:	James Murphy	  */
/* Company:	How Splendid	  */
/* For:		Global			  */
/******************************/

/* Fire up the scripts! */

$(document).ready(function(){

	/* Overlays */
	$("a[rel='#overlay']").overlay({ 
 
 		expose: { 
			color: '#333', 
			loadSpeed: 200, 
			opacity: 0.4 
		},
        onBeforeLoad: function() { 
 
            // grab wrapper element inside content 
            var wrap = this.getContent().find(".contentWrap"); 
 
            // load the page specified in the trigger 
            wrap.load(this.getTrigger().attr("href")); 
        }
 
    });
	
	/* Input values */
	$('.inputValue').focus(function(){ 
		if (this.value == 'enter search term') { 
			this.value = ''
		}
	});
	$('.inputValue').blur(function(){ 
		if (this.value == '') { 
			this.value = 'enter search term'
		}
    });

    $('.updateListing').hover(
    	    function() { // Change the input image's source when we "roll on"
    	        $(this).attr({ src: '/img/buttons/btn_update_listing_hover.gif' });
    	    },
            function() { // Change the input image's source back to the default on "roll off"
                $(this).attr({ src: '/img/buttons/btn_update_listing.gif' });
            }
        );

    $('.searchBlog').hover(
    	    function() { // Change the input image's source when we "roll on"
    	        $(this).attr({ src: '/img/buttons/btn_search_hover.gif' });
    	    },
            function() { // Change the input image's source back to the default on "roll off"
                $(this).attr({ src: '/img/buttons/btn_search.gif' });
            }
    );
	
});
