(function(b){b.efzcarousel=function(c,d,e,f){var a=this;a.$el=b(c);a.el=c;a.$el.data("efzcarousel",a);a.init=function(){a.next=d;a.prev=e;a.options=b.extend({},b.efzcarousel.defaultOptions,f);$opt=a.options;$current_num=1;$panel=a.$el.css("width",$opt.width+"px").css("height",$opt.height+"px").css("overflow","hidden");$images=b("#"+$opt.images).css("width",$opt.width*$opt.count).css("height",$opt.height);$panel.find("img[rel='efzcarousel-image']").show().css("float","left").css("width",$opt.width).css("height",
$opt.height).css("margin-left","0");if($opt.timer>0)switch($opt.direction){case "left":setInterval(a.fNext,$opt.timer);break;case "right":setInterval(a.fPrev,$opt.timer)}b("#"+$opt.idnext).click(function(){a.fNext()});b("#"+$opt.idprev).click(function(){a.fPrev()})};a.fNext=function(){$current_num++;$current_num<=$opt.count?b("#"+$opt.images).animate({"margin-left":"-="+$opt.width+"px"},$opt.duration):(b("#"+$opt.images).animate({"margin-left":"+="+$opt.width*($current_num-2)+"px"},$opt.duration),
$current_num=1)};a.fPrev=function(){$current_num--;$current_num>=1?b("#"+$opt.images).animate({"margin-left":"+="+$opt.width+"px"},$opt.duration):(b("#"+$opt.images).animate({"margin-left":"-="+$opt.width*($opt.count-1)+"px"},$opt.duration),$current_num=$opt.count)};a.init()};b.efzcarousel.defaultOptions={images:"efzcarousel-images",idnext:"efzcarousel-next",idprev:"efzcarousel-prev",width:0,height:0,count:0,timer:!1,duration:4E3,direction:"left"};b.fn.efzcarousel=function(c,d,e){return this.each(function(){new b.efzcarousel(this,
c,d,e)})}})(jQuery);

