(function($){$.fn.robQuee=function(options){var
defaults={robDebug:false,gap:100},settings=$.extend({},defaults,options);this.each(function(){var $this=$(this);var robQueeText=' '+$this.text()+' ';$this.text('');$this.append('<span style="margin-right:'+settings.gap+'px">'+robQueeText+'</span>');var robQueeTextContainerWidth=$this.width();var robQueeTextWidth=$this.find('span').outerWidth(true);var repeatBy=Math.ceil(robQueeTextContainerWidth/robQueeTextWidth)+1;$this.html('');$this.css('white-space','nowrap').css('overflow','hidden').css('cursor','pointer');var i=0;while(i<=repeatBy)
{$this.append('<span style="margin-right:'+settings.gap+'px">'+robQueeText+'</span>');i++;};if(settings.robDebug==true){if($('.robDebugBar').length==0){$('body').append('<div class="robDebugBar" style="border: 1px solid #000; background: yellow; padding: 10px;  margin: 20px; width: 200px;"><h2>Debug Information</h2></div>');}
$('.robDebugBar').append("<h3>"+robQueeText+'</h3>');$('.robDebugBar').append("<ul");$('.robDebugBar').append("<li style='list-style: none; border-bottom: 1px solid #000; padding: 5px;'>Text width :<strong style='float: right'>"+robQueeTextWidth+'px</strong></li>');$('.robDebugBar').append("<li style='list-style: none; border-bottom: 1px solid #000; padding: 5px;'>Text gap :<strong style='float: right'>"+settings.gap+'px</strong></li>');$('.robDebugBar').append("<li style='list-style: none; border-bottom: 1px solid #000; padding: 5px;'>Container width :<strong style='float: right'>"+robQueeTextContainerWidth+'px</strong></li>');$('.robDebugBar').append("<li style='list-style: none; border-bottom: 1px solid #000; padding: 5px;'>Repeat text string by :<strong style='float: right'>"+repeatBy+'px</strong></li>');$('.robDebugBar').append("</ul>");var resetID=$this.attr("id");$('.robDebugBar').append("<div class='"+resetID+"debug' style='padding: 5px;'></div>");var resetInfo='.'+resetID+'debug';}
var robscroll=$this[0];var lastPos;var resetPoint=$this.find('span:first').outerWidth(true);if(resetPoint%2==0){}
else{resetPoint=resetPoint+1}
robscroll.scrollLeft=2;var robsPauseHover=false;$this.hover(function(){robsPauseHover=true;},function(){robsPauseHover=false;});setInterval(function(){if(robsPauseHover==false){robscroll.scrollLeft+=2;}
if(lastPos==resetPoint){if(settings.robDebug==true){$(resetInfo).append("RESET! ");}
robscroll.scrollLeft=2;}
lastPos=robscroll.scrollLeft;},50);});return this;}})(jQuery);
