
$(document).ready(function(){
//side navigation

//fixes attributes that are stripped due to Contact Form 7 plugin limitations
$('#contact_form_container input[type=text],#contact_form_container textarea').attr('onfocus', 'clearText(this)').attr('onblur','clearText(this)');

//hide that pop-up
$('*').click(function(){
	$('#popup').hide();
});
//.noLink is the FIX!!! yay!
//This is how certain top level Nav items' href=# 
//$('li.noLink > a').attr('href', '#');
//$('div#inside_left_menu_container #menu ul li.page-item-9 a:first').attr('href', '#');
        //Ajax for Attorney page forms.
		$('#attorneyForm').ajaxForm(function(data) {
			if (data==1){
				$('#popup').fadeIn('slow');
			}
			else if (data==2){
				alert('Problem with the server!\n Not sent!');
			}
			else if (data==3)
			{
				alert('Bad email address, please fix!!\n Not sent!');
			}
		});
		
//tooltip for directions widget. Maybe it would be interesting to pull map in iFrame? 		
$('.tooltip').bt({
  padding: 10,
  width: 100,
  spikeLength: 20,
  spikeGirth: 20,
  cornerRadius: 6,
  fill: 'rgba(0, 58, 109, .8)',
  strokeWidth: 0,
  strokeStyle: '#003A6D',
  cssStyles: {color: '#C6AB7F', fontWeight: 'bold'},
  positions: ['right'],
});
});//end of jquery

