﻿// Begin function
jQuery.fn.headerToggle = function(target, minHeight, maxHeight) {
return this.click(function(){
         if(!$(this).hasClass("active")){
            $(target).animate({height: maxHeight});
            $(this).toggleClass("active");
         }
         else{
            $(target).animate({height: minHeight});
            $(this).toggleClass("active");
         }
      });
};
// End function

$(document).ready(function() {
   $("#button").headerToggle("#box", "100px", "420px");
});
