!function(a,b,c,d){function e(d,e){function f(){n.timer=setInterval(function(){1==n.winFocus&&i(n.opts.direction)},n.opts.interval),a(n.opts.controls.toggle).addClass("et-run").html(n.opts.controls.stopText)}function h(){clearInterval(n.timer),n.timer=0,a(n.opts.controls.toggle).removeClass("et-run").html(n.opts.controls.playText)}function i(a){var b,c,d;if(n.elem.is(":visible")){"up"==a?(b=":first-child",c="-=",d="appendTo"):(b=":last-child",c="+=",d="prependTo");var e=n.targ.children(b),f=e.outerHeight();n.targ.stop(!0,!0).animate({top:c+f+"px"},n.opts.speed,n.opts.easing,function(){e.hide()[d](n.targ).fadeIn(),n.targ.css("top",0),m()})}}function j(a){h(),i("up"==a?"up":"down")}function k(){var b=0,c=n.elem.css("display");n.elem.css("display","block"),n.targ.children().each(function(){b+=a(this).outerHeight()}),n.elem.css({display:c,height:b})}function l(b){var c=0;n.targ.children(":lt("+n.opts.visible+")").each(function(){c+=a(this).outerHeight()}),1==b?n.elem.stop(!0,!0).animate({height:c},n.opts.speed):n.elem.css("height",c)}function m(){"auto"==n.opts.height&&0!=n.opts.visible?(anim="init"==arguments.callee.caller.name?0:1,l(anim)):"auto"==n.opts.height&&k()}var n=this;return n.opts=a.extend({},g,e),n.elem=a(d),n.targ=a(d).children(":first-child"),n.timer=0,n.mHover=0,n.winFocus=1,function(){n.elem.children().css("margin",0).children().css("margin",0),n.elem.css({position:"relative",height:n.opts.height,overflow:"hidden"}),n.targ.css({position:"absolute",margin:0}),setInterval(function(){m()},100)}(),f(),a([b,c]).off("focus.jqet").on("focus.jqet",function(){n.winFocus=1}).off("blur.jqet").on("blur.jqet",function(){n.winFocus=0}),1==n.opts.mousePause&&n.elem.mouseenter(function(){n.timerTemp=n.timer,h()}).mouseleave(function(){0!==n.timerTemp&&f()}),a(n.opts.controls.up).on("click",function(a){a.preventDefault(),j("up")}),a(n.opts.controls.down).on("click",function(a){a.preventDefault(),j("down")}),a(n.opts.controls.toggle).on("click",function(a){a.preventDefault(),0==n.timer?f():h()}),{up:function(){j("up")},down:function(){j("down")},start:f,stop:h,options:n.opts}}var f="easyTicker",g={direction:"up",easing:"swing",speed:"slow",interval:2e3,height:"auto",visible:0,mousePause:1,controls:{up:"",down:"",toggle:"",playText:"Play",stopText:"Stop"}};a.fn[f]=function(b){return this.each(function(){a.data(this,f)||a.data(this,f,new e(this,b))})}}(jQuery,window,document);