(function(b){var a={start:function(c){return this.each(function(){var e=b(this);if(true==e.data("rolling")){return}var d=b.extend({},b.fn.rollchildren.defaults,c);if(0==d.height){d.height=e.children().first().height()}if(true==d.pause_on_mouseover){e.hover(function(){b(this).rollchildren("pause",true)},function(){b(this).rollchildren("pause",false)})}if(null==e.data("showing_item")){e.css({position:"relative",height:d.height});e.children().css({position:"absolute",top:d.height,opacity:0})}e.data("rolling",true);e.rollchildren("conti",d)})},stop:function(){return this.each(function(){var c=b(this);c.data("rolling",false)})},pause:function(c){return this.each(function(){var d=b(this);d.data("pause",c)})},conti:function(c){return this.each(function(){var g=b(this);var f=g.children().first();var d=g.children().last();if(false==g.data("rolling")){return}if(true==g.data("pause")){setTimeout(function(){g.rollchildren("conti",c)},1000);return}var e=null;if(g.data("showing_item")){g.data("showing_item").clearQueue();g.data("showing_item").animate(c.roll_up_old_item?{top:-c.height,opacity:0}:{opacity:0},c.speed,"swing",function(){b(this).css({top:c.height})});e=g.data("showing_item").next()}if(null==e||null==e.html()){e=f}e.clearQueue();e.animate({top:0,opacity:1},c.speed,"swing");g.data("showing_item",e);if(1>=g.children().length){return}if(c.loop==false){if(g.data("showing_item").get(0)===d.get(0)){return}}setTimeout(function(){g.rollchildren("conti",c)},c.delay_time)})}};b.fn.rollchildren=function(d,c){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d=="object"||!d){return a.start.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.rollchildren")}}};b.fn.rollchildren.defaults={delay_time:3000,loop:true,pause_on_mouseover:true,roll_up_old_item:true,speed:"slow",height:0}})(jQuery);

jQuery.fn.carousel=function(f,e,l){var c=jQuery(this).children()[0];if(c){var j=jQuery(c).children().outerWidth("true"),h=jQuery(c).children(),d=h.length,k=j,g=Math.round(jQuery(this).width()/k),b=1,a=false;for(i=0;i<g;i++){jQuery(c).css("width",(d+g)*j+j+"px");jQuery(c).append(jQuery(h[i]).clone())}jQuery(f).click(function(m){if(!a){if(b==1){jQuery(c).css("left","-"+d*k+"px");b=d}else{b--}jQuery(c).animate({left:"+="+j,y:0,queue:true},"swing",function(){a=false});a=true}});jQuery(e).click(function(m){if(!a){if(b>d){b=2;jQuery(c).css("left","0px")}else{b++}jQuery(c).animate({left:"-="+j,y:0,queue:true},"swing",function(){a=false});a=true}})}};


jQuery(document).ready(function(){

$("#mansetim").carousel("#lft","#rht");

});
