/*----------------------------------------
APHNYS Javascript
Author: Marcus Ellis
Last Updated: January 31, 2012
(c) 2012 Affiniscape, Inc.
All Rights Reserved. This JavaScript file must not be reproduced without the express written permission of Affiniscape, Inc.
For questions regarding licensing or setup please contact Affiniscape, projects @ affiniscape dot com
----------------------------------------*/

var j = jQuery.noConflict();
j(document).ready(function($){	
	
	// Custom Map	
	$('#aphnysmap').attr('src','/global/css/imgs/trans1.gif');
	$('#m_aphnysmap area').hover(function(){
		var a = $(this).attr('alt');
		$('#aphnysmap').attr('src','/associations/7653/imgs/map/'+ a +'.png');
	},function(){
		$('#aphnysmap').attr('src','/global/css/imgs/trans1.gif');
	}).click(function(e){
		e.preventDefault();
		var a = $(this).attr('alt');
		selectSearch(a);
	});
		
	// Clickable Logo
    $('body').addClickableLogo({
        name: 'Association of Public Historians of New York State',
        url: 'http://aphnys.org'
    });
						   
});

function selectSearch(loc) {
	j('input[name="search_field13"]').val(loc);
	document.searchform.submit();
}


