
$(document).ready(function() {

	
	// alter the attribute on all external links
	$('a.external').attr("target","_blank");


	if (!jQuery.browser.mozilla){
	
		// fix widths and spacing
		$('#search_form').css("width","565px");
		$('#find_info').css("width","405px");
		$('#pdf_download_box').css("width","405px");
		$('#pdf_download_box').css("margin","0");
		$('.contact_record').css("width","990px");
		$('.roundedBox').css("-moz-border-radius","0");
		$('.roundedBox').css("margin-top","20px");
		$('.roundedBox').css("margin-bottom","20px");
		
		// rounded boxes settings for curvycorners
		settings = {
			tl: { radius: 20 },
			tr: { radius: 20 },
			bl: { radius: 20 },
			br: { radius: 20 },
			antiAlias: true,
			autoPad: true,
			validTags: ["div","form"]
		}
		// apply
		var myBoxObject = new curvyCorners(settings, "roundedBox contact_record");
		myBoxObject.applyCornersToAll();
		var myBoxObject = new curvyCorners(settings, "roundedBox");
		myBoxObject.applyCornersToAll();
	
	
	
	}

	// hide all divs decending from contact_info
	$('.contact_info> div').hide(); 
	// display span with 'show'
	$('.contact_info> h3 span').show();
	// modify cursor
	$('.contact_info> h3 span').css({cursor:'pointer'});
	// define onclick operation on the h3 to toggle show and hide
	$('.contact_info> h3').click(function() {
		$(this).next('div').slideToggle('fast');
		var toggle= $(this).children().html();
		if (toggle=='show'){
			$(this).children().html('hide');
		}
		else{
			$(this).children().html('show');
		}
	
	});	
});



