/*
	jQuery toggleForm v1.0
	
	Wouter Beeftink
	wouter@footsteps.nl
*/
(function($){$.fn.toggleForm=function(b,c){var c=$.extend({action:'toggle',event:'click',startHidden:true},c);var d=$(b);var e=d.children('[nodeType=1]');c.startHidden?d.hide():d.show();toggleControls();return this.bind(c.event,function(){switch(c.action){case'show':d.show();break;case'hide':d.hide();break;default:d.toggle()};toggleControls()});function toggleControls(){if(d.is(':visible')){e.each(function(){if($(this).data('required')==true)$(this).attr('_required','')})}else{e.each(function(){var a=$(this);if(a.attr('_required')==''){a.removeAttr('_required').data('required',true)}})}}}})(jQuery);