//header help button
jQuery(function(){
	jQuery('a#needhelp').click(function(){jQuery('#helpPanel').slideToggle(); return false;});
	jQuery('a#closeHelp').click(function(){jQuery('#helpPanel').slideToggle(); return false;});
	jQuery('#helpPanel').css('display', 'none');
});// JavaScript Document

jQuery(function(){
	jQuery('a#authorEmailButton').click(function(){jQuery('div.authorForm').slideToggle(); return false;});
	jQuery('div.authorForm').css('display', 'none');
});// JavaScript Document

// Clear input text and darken color on a form field
function clearAndColor(el, e2) {
	//grab the current fields value and set a variable
	if (el.defaultValue==el.value) el.value = "";
	//Change the form fields text color
	if (el.style) el.style.color = "#333";

}
//Replace the default text
function reText(el){
	//Change the form fields text color
	if (el.style) el.style.color = "#ccc";
	if (el.value== "") el.value = el.defaultValue;
}

//---------------------------------------------------------------------------------------------
//tooltips
//---------------------------------------------------------------------------------------------

//Search bar buttons
//---------------------------------------------------------------------------------------------
jQuery('a#casebutton').qtip({
   content: 'Do I have a case? Fill out our general intake form to find out.',
   show: 'mouseover',
   hide: 'mouseout',
   style: { name: 'cream', tip: true },
   position: {
      corner: {
         target: 'mouse',
         tooltip: 'bottomLeft'
      }
   }
});

jQuery('a#insbutton').qtip({
   content: 'Resources on how to handle your insurance law case from the insurance law team',
   show: 'mouseover',
   hide: 'mouseout',
   style: { name: 'cream', tip: true },
   position: {
      corner: {
         target: 'mouse',
         tooltip: 'bottomLeft'
      }
   }
});

jQuery('a#helpartbutton').qtip({
   content: 'Read helpful articles written to aid in your decisions',
   show: 'mouseover',
   hide: 'mouseout',
   style: { name: 'cream', tip: true },
   position: {
      corner: {
         target: 'mouse',
         tooltip: 'bottomLeft'
      }
   }
});

//Help button
jQuery('a#needhelp').qtip({
   content: 'Click to Reveal Help Options',
   show: 'mouseover',
   hide: 'mouseout',
   style: { name: 'cream', tip: true },
   position: {
      corner: {
         target: 'bottomRight',
         tooltip: 'topRight'
      }
   }
});

//Replace all titles with qtips
jQuery('a.tip[title]').qtip({ 
						
	style: { name: 'blue', tip: true },
	position: {
    	corner: {
       		target: 'rightTop',
         	tooltip: 'bottomRight'
    	}
   } 
})
// end tooltips --------------------------------------------------------------------------------

jQuery(function(){
	//jQuery('input[name=alias]:radio').focus(function(){$('div.formOptionNames').slideToggle();return false;alert('Radio Box Selected');});
	//jQuery('div.formOptionNames').css('display', 'none');
});// JavaScript Document