$(document).ready(function(){
	
	$('#jambo').hover(function(){
		$(this).attr('src', '/common/images/n/jambo-on.jpg');
		
	},function(){
		$(this).attr('src', '/common/images/n/jambo-off.jpg');
		
	});
	
	
	
	//contents:
	// feedback tab
	// map popout
	// search box
	
	
	//####   ####     feedback tab
   /*$('#feedback-div').tabSlideOut({
        tabHandle: '.handle',                     //class of the element that will become your tab
        pathToTabImage: '/common/images/feedback-on.gif', //path to the image for the tab //Optionally can be set using css
        imageHeight: '122px',                     //height of tab image           //Optionally can be set using css
        imageWidth: '40px',                       //width of tab image            //Optionally can be set using css
        tabLocation: 'left',                      //side of screen where tab lives, top, right, bottom, or left
        speed: 300,                               //speed of animation
        action: 'click',                          //options: 'click' or 'hover', action to trigger animation
        topPos: '200px',                          //position from the top/ use if tabLocation is left or right
        leftPos: '20px',                          //position from left/ use if tabLocation is bottom or top
        fixedPosition: false                      //options: true makes it stick(fixed position) on scroll
    });*/

	//####   ####     map popout
	$("#map-link-image")
        .mouseover(function() { 
            var src = $(this).attr("src").match(/[^\.]+/) + "-hover.jpg";
            $(this).attr("src", src);
        })
        .mouseout(function() {
            var src = $(this).attr("src").replace("-hover", "");
            $(this).attr("src", src);
        });
	
	
		$('a#mapl').fancybox(
			{
				'zoomSpeedIn': 		300,
				'zoomSpeedOut': 	300,
				'frameWidth':  		920,
				'frameHeight':		620,
				'overlayShow':      true
			}	
		);
	
	//####   ####     search box
	$("#searchbox").hoverIntent(clearSearch, nothing);
	
});

function clearSearch(e) {
	if ($('#searchbox').val() == "search nethope.org") ($('#searchbox').val('').focus());
	if ($('#searchbox').val() == "") $("#searchbox").focus();	
}
function nothing(e) { return null; }