/*
* collapsor (1.0) // 2008.04.05 // <http://plugins.jquery.com/project/collapsor>
* 
* REQUIRES jQuery 1.2.3+ <http://jquery.com/>
* 
* Copyright (c) 2008 TrafficBroker <http://www.trafficbroker.co.uk>
* Licensed under GPL and MIT licenses
* 
* @author    Jesus Carrera <jesus.carrera@trafficbroker.co.uk>
*/
(function(A){A.fn.collapsor=function(C){C=A.extend({},A.fn.collapsor.defaults,C);var B=this;return this.each(function(){A(this).find("+ "+C.sublevelElement).hide();if(A(this).hasClass(C.openClass)){A(this).find("+ "+C.sublevelElement).show()}A(this).click(function(){A(B).not(A(this)).removeClass(C.openClass);if(A(this).next().is(C.sublevelElement)){A(this).blur().toggleClass(C.openClass);A(this).next().animate({height:"toggle",opacity:"toggle"},C.speed,C.easing);A(this).parent().parent().find(C.sublevelElement).not(A(this).next()).animate({height:"hide",opacity:"hide"},C.speed,C.easing);return false}})})};A.fn.collapsor.defaults={activeClass:"active",openClass:"open",sublevelElement:"ul",speed:500,easing:"swing"}})(jQuery);