var metro=(function(){var b;function a(f){var e=f.find(".subway"),g=f.find(".proposal");var h=1;g.animate({height:(f.data("onHeight")-b)+"px"},300,function(){if(h==g.length){e.removeClass("subway-more-off");e.each(function(){e.removeClass("subway-more-off");var i=$(this).find(".subway-station");i.addClass("visible")})}h++})}function c(f){var e=f.find(".subway"),g=f.find(".proposal");e.each(function(h){var i=$(this).find(".subway-station");i.removeClass("visible");if(h==e.length-1){g.animate({height:(f.data("offHeight")-b)+"px"},300,function(){e.addClass("subway-more-off");g.css({height:""})})}})}function d(g,f,e){g.delegate(f,"click",this,function(){b=parseInt(e);var j=$(this),h=j.parents(".proposals-group"),i=h.find(".subway");if(h.find(".subway").hasClass("subway-more-off")){h.data("offHeight",h.height());i.removeClass("subway-more-off");h.data("onHeight",h.height());i.addClass("subway-more-off");a(h)}else{c(h)}})}return{init:d}})();$(function(){var b=$("#content"),a=$(".proposal").css("padding-bottom");metro.init(b,".subway",a)});
