jQuery.fn.fadeToggle = function(speed, easing, callback) {
   return this.animate({opacity: 'toggle'}, speed, easing, callback);

};

$(document).ready(function() {
$(".trigger").click(function(){
		$("#panel").toggle("fast");
		$(this).toggleClass("trigger-active");
                $('#newsletter-overlay').fadeToggle('0.5, 3000');
		return false;
     }); 


     $("#email").click(function() {
        if ($(this).attr("value") == 'name@example.com'){
              $(this).attr("value","");
            }
     });
     $("#email").blur(function() {
        if ($(this).attr("value") == ''){
              $(this).attr("value","name@example.com");
           }
     });
	 
    $("#emailaddress").click(function() {
        if ($(this).attr("value") == 'name@example.com'){
              $(this).attr("value","");
            }
     });
     $("#emailaddress").blur(function() {
        if ($(this).attr("value") == ''){
              $(this).attr("value","name@example.com");
           }
     });
     
     $("#request_name").click(function() {
        if ($(this).attr("value") == 'Your Name'){
              $(this).attr("value","");
            }
     });
     $("#request_name").blur(function() {
        if ($(this).attr("value") == ''){
              $(this).attr("value","Your Name");
           }
     });
     
     $("#practice_name").click(function() {
        if ($(this).attr("value") == 'Practice Name'){
              $(this).attr("value","");
            }
     });
     $("#practice_name").blur(function() {
        if ($(this).attr("value") == ''){
              $(this).attr("value","Practice Name");
           }
     });
});