/* jQuery News Ticker is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License. jQuery News Ticker is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with jQuery News Ticker. If not, see . */ (function($){ $.fn.ticker = function(options) { // Extend our default options with those provided. // Note that the first arg to extend is an empty object - // this is to keep from overriding our "defaults" object. var opts = $.extend({}, $.fn.ticker.defaults, options); /* Get the id of the UL to get our news content from */ var newsID = '#' + $(this).attr('id'); /* Get the tag type - we will check this later to makde sure it is a UL tag */ var tagType = $(this).get(0).tagName; return this.each(function() { /* Internal vars */ var settings = { position: 0, time: 0, distance: 0, newsArr: {}, play: true, paused: false, contentLoaded: false, dom: { contentID: '#ticker-content', titleID: '#ticker-title', titleElem: '#ticker-title SPAN', tickerID : '#ticker', wrapperID: '#ticker-wrapper', revealID: '#ticker-swipe', revealElem: '#ticker-swipe SPAN', controlsID: '#ticker-controls', prevID: '#prev', nextID: '#next', playPauseID: '#play-pause' } }; // if we are not using a UL, display an error message and stop any further execution if (tagType != 'UL' && tagType != 'OL' && opts.htmlFeed === true) { debugError('Cannot use <' + tagType.toLowerCase() + '> type of element for this plugin - must of type