/* qListrows for jQuery by CSantos (csantos@quilogy.com) 2009-apr-08 - breaks a single list into several with given number of items per list */
(function($){$.fn.qListrows=function(options){var opts=$.extend({},$.fn.qListrows.defaults,options);var container=this;var olist=$('<ul class="'+opts.listClass+' '+opts.firstClass+'"></ul>').insertBefore(container);this.children().each(function(i){$(this).appendTo(olist);if((i%opts.itemsPerList)==(opts.itemsPerList-1)){olist=$('<ul class="'+opts.listClass+'"></ul>').insertBefore(container);}});this.remove();};$.fn.qListrows.defaults={itemsPerList:3,listClass:'listrow',firstClass:'first'};return this;})(jQuery);