(function($){$.fn.openClose=function(options){options=$.extend({},$.fn.openClose.defaults,options);$(options.trigger).click(function(event){event.preventDefault();if($(options.container).is(':visible')){$(options.container).animate({opacity:0},{duration:options.animation,complete:function(){$(this).slideUp(options.animation,function(){$(this).addClass('hide');});}});} if(!$(options.container).is(':visible')){$(options.container).css('opacity',0).fadeIn(options.animation,function(){$(this).animate({opacity:1},{duration:options.animation,complete:function(){$(this).removeClass('hide')}});});}});};$.fn.openClose.defaults={animation:1000,trigger:'.ocTrigger',container:'.ocContainer'};})(jQuery);;