/*!
 * webTicker 1.3
 * Examples and documentation at: 
 * http://jonmifsud.com
 * 2011 Jonathan Mifsud
 * Version: 1.2 (26-JUNE-2011)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires:
 * jQuery v1.4.2 or later
 * 
 */
(function(a){var b=new Array,c={init:function(a){return a=jQuery.extend({travelocity:.05,direction:1,moving:!0},a),b[jQuery(this).attr("id")]=a,this.each(function(){function g(b,d){a.direction==1?c.animate({left:"-="+b},d,"linear",function(){c.children().last().after(c.children().first());var b=c.children().first(),d=b.outerWidth(!0),e=d/a.travelocity;c.css("left","0"),g(d,e)}):c.animate({right:"-="+b},d,"linear",function(){c.children().last().after(c.children().first());var b=c.children().first(),d=b.outerWidth(!0),e=d/a.travelocity;c.css("right","0"),g(d,e)})}var c=jQuery(this);c.addClass("newsticker");var d=0,e=c.wrap("<div class='mask'></div>");e.after("<span class='tickeroverlay-left'>&nbsp;</span><span class='tickeroverlay-right'>&nbsp;</span>");var f=c.parent().wrap("<div class='tickercontainer'></div>");c.find("li").each(function(a){d+=jQuery(this,a).outerWidth(!0)}),c.width(d+200);var h=c.children().first(),i=h.outerWidth(!0),j=i/a.travelocity;g(i,j),c.hover(function(){jQuery(this).stop()},function(){if(b[jQuery(this).attr("id")].moving){var d=jQuery(this).offset(),e=c.children().first(),f=e.outerWidth(!0),h;a.direction==1?h=parseInt(jQuery(this).css("left").replace("px",""))+f:h=parseInt(jQuery(this).css("right").replace("px",""))+f;var i=h/a.travelocity;g(h,i)}})})},stop:function(){if(b[jQuery(this).attr("id")].moving)return b[jQuery(this).attr("id")].moving=!1,this.each(function(){jQuery(this).stop()})},cont:function(){if(!b[jQuery(this).attr("id")].moving){b[jQuery(this).attr("id")].moving=!0;var a=b[jQuery(this).attr("id")];return this.each(function(){function c(d,e){a.direction==1?b.animate({left:"-="+d},e,"linear",function(){b.children().last().after(b.children().first());var d=b.children().first(),e=d.outerWidth(!0),f=e/a.travelocity;b.css("left","0"),c(e,f)}):b.animate({right:"-="+d},e,"linear",function(){b.children().last().after(b.children().first());var d=b.children().first(),e=d.outerWidth(!0),f=e/a.travelocity;b.css("right","0"),c(e,f)})}var b=jQuery(this),d=jQuery(this).offset(),e=b.children().first(),f=e.outerWidth(!0),g;a.direction==1?g=parseInt(jQuery(this).css("left").replace("px",""))+f:g=parseInt(jQuery(this).css("right").replace("px",""))+f;var h=g/a.travelocity;c(g,h)})}}};a.fn.webTicker=function(b){if(c[b])return c[b].apply(this,Array.prototype.slice.call(arguments,1));if(typeof b=="object"||!b)return c.init.apply(this,arguments);a.error("Method "+b+" does not exist on jQuery.webTicker")}})(jQuery)
