// $Id: jquery.cycle.all.js,v 1.1.4.1 2010/11/11 13:58:25 danprobo Exp $
/*!
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.86 (05-APR-2010)
 * 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.2.6 or later
 */

jQuery(document).ready(function($) {
    $('.slideshow').cycle({
		fx: 'fade' , timeout: 8000, delay: 2000});
});

;(function($) {

var ver = '2.86';

// if $.support is not defined (pre jQuery 1.3) add what I need
if ($.support == undefined) {
	$.support = {
		opacity: !($.browser.msie)
	};
}

function debug(s) {
	if ($.fn.cycle.debug)
		log(s);
}		
function log() {
	if (window.console && window.console.log)
		window.console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
};

// the options arg can be...
//   a number  - indicates an immediate transition should occur to the given slide index
//   a string  - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
//   an object - properties to control the slideshow
//
// the arg2 arg can be...
//   the name of an fx (only used in conjunction with a numeric value for 'options')
//   the value true (only used in first arg == 'resume') and indicates
//	 that the resume should occur immediately (not wait for next timeout)

$.fn.cycle = function(options, arg2) {
	var o = { s: this.selector, c: this.context };

	// in 1.3+ we can fix mistakes with the ready state
	if (this.length === 0 && options != 'stop') {
		if (!$.isReady && o.s) {
			log('DOM not ready, queuing slideshow');
			$(function() {
				$(o.s,o.c).cycle(options,arg2);
			});
			return this;
		}
		// is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
		log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
		return this;
	}

	// iterate the matched nodeset
	return this.each(function() {
		var opts = handleArguments(this, options, arg2);
		if (opts === false)
			return;

		opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
		
		// stop existing slideshow for this container (if there is one)
		if (this.cycleTimeout)
			clearTimeout(this.cycleTimeout);
		this.cycleTimeout = this.cyclePause = 0;

		var $cont = $(this);
		var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
		var els = $slides.get();
		if (els.length < 2) {
			log('terminating; too few slides: ' + els.length);
			return;
		}

		var opts2 = buildOptions($cont, $slides, els, opts, o);
		if (opts2 === false)
			return;

		var startTime = opts2.continuous ? 10 : getTimeout(opts2.currSlide, opts2.nextSlide, opts2, !opts2.rev);

		// if it's an auto slideshow, kick it off
		if (startTime) {
			startTime += (opts2.delay || 0);
			if (startTime < 10)
				startTime = 10;
			debug('first timeout: ' + startTime);
			this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts2.rev)}, startTime);
		}
	});
};

// process the args that were passed to the plugin fn
function handleArguments(cont, options, arg2) {
	if (cont.cycleStop == undefined)
		cont.cycleStop = 0;
	if (options === undefined || options === null)
		options = {};
	if (options.constructor == String) {
		switch(options) {
		case 'destroy':
		case 'stop':
			var opts = $(cont).data('cycle.opts');
			if (!opts)
				return false;
			cont.cycleStop++; // callbacks look for change
			if (cont.cycleTimeout)
				clearTimeout(cont.cycleTimeout);
			cont.cycleTimeout = 0;
			$(cont).removeData('cycle.opts');
			if (options == 'destroy')
				destroy(opts);
			return false;
		case 'toggle':
			cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
			checkInstantResume(cont.cyclePause, arg2, cont);
			return false;
		case 'pause':
			cont.cyclePause = 1;
			return false;
		case 'resume':
			cont.cyclePause = 0;
			checkInstantResume(false, arg2, cont);
			return false;
		case 'prev':
		case 'next':
			var opts = $(cont).data('cycle.opts');
			if (!opts) {
				log('options not found, "prev/next" ignored');
				return false;
			}
			$.fn.cycle[options](opts);
			return false;
		default:
			options = { fx: options };
		};
		return options;
	}
	else if (options.constructor == Number) {
		// go to the requested slide
		var num = options;
		options = $(cont).data('cycle.opts');
		if (!options) {
			log('options not found, can not advance slide');
			return false;
		}
		if (num < 0 || num >= options.elements.length) {
			log('invalid slide index: ' + num);
			return false;
		}
		options.nextSlide = num;
		if (cont.cycleTimeout) {
			clearTimeout(cont.cycleTimeout);
			cont.cycleTimeout = 0;
		}
		if (typeof arg2 == 'string')
			options.oneTimeFx = arg2;
		go(options.elements, options, 1, num >= options.currSlide);
		return false;
	}
	return options;
	
	function checkInstantResume(isPaused, arg2, cont) {
		if (!isPaused && arg2 === true) { // resume now!
			var options = $(cont).data('cycle.opts');
			if (!options) {
				log('options not found, can not resume');
				return false;
			}
			if (cont.cycleTimeout) {
				clearTimeout(cont.cycleTimeout);
				cont.cycleTimeout = 0;
			}
			go(options.elements, options, 1, 1);
		}
	}
};

function removeFilter(el, opts) {
	if (!$.support.opacity && opts.cleartype && el.style.filter) {
		try { el.style.removeAttribute('filter'); }
		catch(smother) {} // handle old opera versions
	}
};

// unbind event handlers
function destroy(opts) {
	if (opts.next)
		$(opts.next).unbind(opts.prevNextEvent);
	if (opts.prev)
		$(opts.prev).unbind(opts.prevNextEvent);
	
	if (opts.pager || opts.pagerAnchorBuilder)
		$.each(opts.pagerAnchors || [], function() {
			this.unbind().remove();
		});
	opts.pagerAnchors = null;
	if (opts.destroy) // callback
		opts.destroy(opts);
};

// one-time initialization
function buildOptions($cont, $slides, els, options, o) {
	// support metadata plugin (v1.0 and v2.0)
	var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
	if (opts.autostop)
		opts.countdown = opts.autostopCount || els.length;

	var cont = $cont[0];
	$cont.data('cycle.opts', opts);
	opts.$cont = $cont;
	opts.stopCount = cont.cycleStop;
	opts.elements = els;
	opts.before = opts.before ? [opts.before] : [];
	opts.after = opts.after ? [opts.after] : [];
	opts.after.unshift(function(){ opts.busy=0; });

	// push some after callbacks
	if (!$.support.opacity && opts.cleartype)
		opts.after.push(function() { removeFilter(this, opts); });
	if (opts.continuous)
		opts.after.push(function() { go(els,opts,0,!opts.rev); });

	saveOriginalOpts(opts);

	// clearType corrections
	if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
		clearTypeFix($slides);

	// container requires non-static position so that slides can be position within
	if ($cont.css('position') == 'static')
		$cont.css('position', 'relative');
	if (opts.width)
		$cont.width(opts.width);
	if (opts.height && opts.height != 'auto')
		$cont.height(opts.height);

	if (opts.startingSlide)
		opts.startingSlide = parseInt(opts.startingSlide);

	// if random, mix up the slide array
	if (opts.random) {
		opts.randomMap = [];
		for (var i = 0; i < els.length; i++)
			opts.randomMap.push(i);
		opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
		opts.randomIndex = 1;
		opts.startingSlide = opts.randomMap[1];
	}
	else if (opts.startingSlide >= els.length)
		opts.startingSlide = 0; // catch bogus input
	opts.currSlide = opts.startingSlide || 0;
	var first = opts.startingSlide;

	// set position and zIndex on all the slides
	$slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
		var z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
		$(this).css('z-index', z)
	});

	// make sure first slide is visible
	$(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
	removeFilter(els[first], opts);

	// stretch slides
	if (opts.fit && opts.width)
		$slides.width(opts.width);
	if (opts.fit && opts.height && opts.height != 'auto')
		$slides.height(opts.height);

	// stretch container
	var reshape = opts.containerResize && !$cont.innerHeight();
	if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
		var maxw = 0, maxh = 0;
		for(var j=0; j < els.length; j++) {
			var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
			if (!w) w = e.offsetWidth || e.width || $e.attr('width')
			if (!h) h = e.offsetHeight || e.height || $e.attr('height');
			maxw = w > maxw ? w : maxw;
			maxh = h > maxh ? h : maxh;
		}
		if (maxw > 0 && maxh > 0)
			$cont.css({width:maxw+'px',height:maxh+'px'});
	}

	if (opts.pause)
		$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});

	if (supportMultiTransitions(opts) === false)
		return false;

	// apparently a lot of people use image slideshows without height/width attributes on the images.
	// Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
	var requeue = false;
	options.requeueAttempts = options.requeueAttempts || 0;
	$slides.each(function() {
		// try to get height/width of each slide
		var $el = $(this);
		this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
		this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);

		if ( $el.is('img') ) {
			// sigh..  sniffing, hacking, shrugging...  this crappy hack tries to account for what browsers do when
			// an image is being downloaded and the markup did not include sizing info (height/width attributes);
			// there seems to be some "default" sizes used in this situation
			var loadingIE	= ($.browser.msie  && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
			var loadingFF	= ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete);
			var loadingOp	= ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete);
			var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete);
			// don't requeue for images that are still loading but have a valid size
			if (loadingIE || loadingFF || loadingOp || loadingOther) {
				if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
					log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
					setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout);
					requeue = true;
					return false; // break each loop
				}
				else {
					log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
				}
			}
		}
		return true;
	});

	if (requeue)
		return false;

	opts.cssBefore = opts.cssBefore || {};
	opts.animIn = opts.animIn || {};
	opts.animOut = opts.animOut || {};

	$slides.not(':eq('+first+')').css(opts.cssBefore);
	if (opts.cssFirst)
		$($slides[first]).css(opts.cssFirst);

	if (opts.timeout) {
		opts.timeout = parseInt(opts.timeout);
		// ensure that timeout and speed settings are sane
		if (opts.speed.constructor == String)
			opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed);
		if (!opts.sync)
			opts.speed = opts.speed / 2;
		
		var buffer = opts.fx == 'shuffle' ? 500 : 250;
		while((opts.timeout - opts.speed) < buffer) // sanitize timeout
			opts.timeout += opts.speed;
	}
	if (opts.easing)
		opts.easeIn = opts.easeOut = opts.easing;
	if (!opts.speedIn)
		opts.speedIn = opts.speed;
	if (!opts.speedOut)
		opts.speedOut = opts.speed;

	opts.slideCount = els.length;
	opts.currSlide = opts.lastSlide = first;
	if (opts.random) {
		if (++opts.randomIndex == els.length)
			opts.randomIndex = 0;
		opts.nextSlide = opts.randomMap[opts.randomIndex];
	}
	else
		opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;

	// run transition init fn
	if (!opts.multiFx) {
		var init = $.fn.cycle.transitions[opts.fx];
		if ($.isFunction(init))
			init($cont, $slides, opts);
		else if (opts.fx != 'custom' && !opts.multiFx) {
			log('unknown transition: ' + opts.fx,'; slideshow terminating');
			return false;
		}
	}

	// fire artificial events
	var e0 = $slides[first];
	if (opts.before.length)
		opts.before[0].apply(e0, [e0, e0, opts, true]);
	if (opts.after.length > 1)
		opts.after[1].apply(e0, [e0, e0, opts, true]);

	if (opts.next)
		$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1)});
	if (opts.prev)
		$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1)});
	if (opts.pager || opts.pagerAnchorBuilder)
		buildPager(els,opts);

	exposeAddSlide(opts, els);

	return opts;
};

// save off original opts so we can restore after clearing state
function saveOriginalOpts(opts) {
	opts.original = { before: [], after: [] };
	opts.original.cssBefore = $.extend({}, opts.cssBefore);
	opts.original.cssAfter  = $.extend({}, opts.cssAfter);
	opts.original.animIn	= $.extend({}, opts.animIn);
	opts.original.animOut   = $.extend({}, opts.animOut);
	$.each(opts.before, function() { opts.original.before.push(this); });
	$.each(opts.after,  function() { opts.original.after.push(this); });
};

function supportMultiTransitions(opts) {
	var i, tx, txs = $.fn.cycle.transitions;
	// look for multiple effects
	if (opts.fx.indexOf(',') > 0) {
		opts.multiFx = true;
		opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
		// discard any bogus effect names
		for (i=0; i < opts.fxs.length; i++) {
			var fx = opts.fxs[i];
			tx = txs[fx];
			if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
				log('discarding unknown transition: ',fx);
				opts.fxs.splice(i,1);
				i--;
			}
		}
		// if we have an empty list then we threw everything away!
		if (!opts.fxs.length) {
			log('No valid transitions named; slideshow terminating.');
			return false;
		}
	}
	else if (opts.fx == 'all') {  // auto-gen the list of transitions
		opts.multiFx = true;
		opts.fxs = [];
		for (p in txs) {
			tx = txs[p];
			if (txs.hasOwnProperty(p) && $.isFunction(tx))
				opts.fxs.push(p);
		}
	}
	if (opts.multiFx && opts.randomizeEffects) {
		// munge the fxs array to make effect selection random
		var r1 = Math.floor(Math.random() * 20) + 30;
		for (i = 0; i < r1; i++) {
			var r2 = Math.floor(Math.random() * opts.fxs.length);
			opts.fxs.push(opts.fxs.splice(r2,1)[0]);
		}
		debug('randomized fx sequence: ',opts.fxs);
	}
	return true;
};

// provide a mechanism for adding slides after the slideshow has started
function exposeAddSlide(opts, els) {
	opts.addSlide = function(newSlide, prepend) {
		var $s = $(newSlide), s = $s[0];
		if (!opts.autostopCount)
			opts.countdown++;
		els[prepend?'unshift':'push'](s);
		if (opts.els)
			opts.els[prepend?'unshift':'push'](s); // shuffle needs this
		opts.slideCount = els.length;

		$s.css('position','absolute');
		$s[prepend?'prependTo':'appendTo'](opts.$cont);

		if (prepend) {
			opts.currSlide++;
			opts.nextSlide++;
		}

		if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
			clearTypeFix($s);

		if (opts.fit && opts.width)
			$s.width(opts.width);
		if (opts.fit && opts.height && opts.height != 'auto')
			$slides.height(opts.height);
		s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
		s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();

		$s.css(opts.cssBefore);

		if (opts.pager || opts.pagerAnchorBuilder)
			$.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);

		if ($.isFunction(opts.onAddSlide))
			opts.onAddSlide($s);
		else
			$s.hide(); // default behavior
	};
}

// reset internal state; we do this on every pass in order to support multiple effects
$.fn.cycle.resetState = function(opts, fx) {
	fx = fx || opts.fx;
	opts.before = []; opts.after = [];
	opts.cssBefore = $.extend({}, opts.original.cssBefore);
	opts.cssAfter  = $.extend({}, opts.original.cssAfter);
	opts.animIn	= $.extend({}, opts.original.animIn);
	opts.animOut   = $.extend({}, opts.original.animOut);
	opts.fxFn = null;
	$.each(opts.original.before, function() { opts.before.push(this); });
	$.each(opts.original.after,  function() { opts.after.push(this); });

	// re-init
	var init = $.fn.cycle.transitions[fx];
	if ($.isFunction(init))
		init(opts.$cont, $(opts.elements), opts);
};

// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
function go(els, opts, manual, fwd) {
	// opts.busy is true if we're in the middle of an animation
	if (manual && opts.busy && opts.manualTrump) {
		// let manual transitions requests trump active ones
		debug('manualTrump in go(), stopping active transition');
		$(els).stop(true,true);
		opts.busy = false;
	}
	// don't begin another timeout-based transition if there is one active
	if (opts.busy) {
		debug('transition active, ignoring new tx request');
		return;
	}

	var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];

	// stop cycling if we have an outstanding stop request
	if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
		return;

	// check to see if we should stop cycling based on autostop options
	if (!manual && !p.cyclePause &&
		((opts.autostop && (--opts.countdown <= 0)) ||
		(opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
		if (opts.end)
			opts.end(opts);
		return;
	}

	// if slideshow is paused, only transition on a manual trigger
	var changed = false;
	if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
		changed = true;
		var fx = opts.fx;
		// keep trying to get the slide size if we don't have it yet
		curr.cycleH = curr.cycleH || $(curr).height();
		curr.cycleW = curr.cycleW || $(curr).width();
		next.cycleH = next.cycleH || $(next).height();
		next.cycleW = next.cycleW || $(next).width();

		// support multiple transition types
		if (opts.multiFx) {
			if (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length)
				opts.lastFx = 0;
			fx = opts.fxs[opts.lastFx];
			opts.currFx = fx;
		}

		// one-time fx overrides apply to:  $('div').cycle(3,'zoom');
		if (opts.oneTimeFx) {
			fx = opts.oneTimeFx;
			opts.oneTimeFx = null;
		}

		$.fn.cycle.resetState(opts, fx);

		// run the before callbacks
		if (opts.before.length)
			$.each(opts.before, function(i,o) {
				if (p.cycleStop != opts.stopCount) return;
				o.apply(next, [curr, next, opts, fwd]);
			});

		// stage the after callacks
		var after = function() {
			$.each(opts.after, function(i,o) {
				if (p.cycleStop != opts.stopCount) return;
				o.apply(next, [curr, next, opts, fwd]);
			});
		};

		debug('tx firing; currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
		
		// get ready to perform the transition
		opts.busy = 1;
		if (opts.fxFn) // fx function provided?
			opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
		else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
			$.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
		else
			$.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
	}

	if (changed || opts.nextSlide == opts.currSlide) {
		// calculate the next slide
		opts.lastSlide = opts.currSlide;
		if (opts.random) {
			opts.currSlide = opts.nextSlide;
			if (++opts.randomIndex == els.length)
				opts.randomIndex = 0;
			opts.nextSlide = opts.randomMap[opts.randomIndex];
			if (opts.nextSlide == opts.currSlide)
				opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
		}
		else { // sequence
			var roll = (opts.nextSlide + 1) == els.length;
			opts.nextSlide = roll ? 0 : opts.nextSlide+1;
			opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
		}
	}
	if (changed && opts.pager)
		opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
	
	// stage the next transition
	var ms = 0;
	if (opts.timeout && !opts.continuous)
		ms = getTimeout(curr, next, opts, fwd);
	else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
		ms = 10;
	if (ms > 0)
		p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.rev) }, ms);
};

// invoked after transition
$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
   $(pager).each(function() {
       $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
   });
};

// calculate timeout value for current transition
function getTimeout(curr, next, opts, fwd) {
	if (opts.timeoutFn) {
		// call user provided calc fn
		var t = opts.timeoutFn(curr,next,opts,fwd);
		while ((t - opts.speed) < 250) // sanitize timeout
			t += opts.speed;
		debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
		if (t !== false)
			return t;
	}
	return opts.timeout;
};

// expose next/prev function, caller must pass in state
$.fn.cycle.next = function(opts) { advance(opts, opts.rev?-1:1); };
$.fn.cycle.prev = function(opts) { advance(opts, opts.rev?1:-1);};

// advance slide forward or back
function advance(opts, val) {
	var els = opts.elements;
	var p = opts.$cont[0], timeout = p.cycleTimeout;
	if (timeout) {
		clearTimeout(timeout);
		p.cycleTimeout = 0;
	}
	if (opts.random && val < 0) {
		// move back to the previously display slide
		opts.randomIndex--;
		if (--opts.randomIndex == -2)
			opts.randomIndex = els.length-2;
		else if (opts.randomIndex == -1)
			opts.randomIndex = els.length-1;
		opts.nextSlide = opts.randomMap[opts.randomIndex];
	}
	else if (opts.random) {
		opts.nextSlide = opts.randomMap[opts.randomIndex];
	}
	else {
		opts.nextSlide = opts.currSlide + val;
		if (opts.nextSlide < 0) {
			if (opts.nowrap) return false;
			opts.nextSlide = els.length - 1;
		}
		else if (opts.nextSlide >= els.length) {
			if (opts.nowrap) return false;
			opts.nextSlide = 0;
		}
	}

	var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
	if ($.isFunction(cb))
		cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
	go(els, opts, 1, val>=0);
	return false;
};

function buildPager(els, opts) {
	var $p = $(opts.pager);
	$.each(els, function(i,o) {
		$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
	});
	opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
};

$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
	var a;
	if ($.isFunction(opts.pagerAnchorBuilder)) {
		a = opts.pagerAnchorBuilder(i,el);
		debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
	}
	else
		a = '<a href="#">'+(i+1)+'</a>';
		
	if (!a)
		return;
	var $a = $(a);
	// don't reparent if anchor is in the dom
	if ($a.parents('body').length === 0) {
		var arr = [];
		if ($p.length > 1) {
			$p.each(function() {
				var $clone = $a.clone(true);
				$(this).append($clone);
				arr.push($clone[0]);
			});
			$a = $(arr);
		}
		else {
			$a.appendTo($p);
		}
	}

	opts.pagerAnchors =  opts.pagerAnchors || [];
	opts.pagerAnchors.push($a);
	$a.bind(opts.pagerEvent, function(e) {
		e.preventDefault();
		opts.nextSlide = i;
		var p = opts.$cont[0], timeout = p.cycleTimeout;
		if (timeout) {
			clearTimeout(timeout);
			p.cycleTimeout = 0;
		}
		var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
		if ($.isFunction(cb))
			cb(opts.nextSlide, els[opts.nextSlide]);
		go(els,opts,1,opts.currSlide < i); // trigger the trans
//		return false; // <== allow bubble
	});
	
	if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
		$a.bind('click.cycle', function(){return false;}); // suppress click
	
	if (opts.pauseOnPagerHover)
		$a.hover(function() { opts.$cont[0].cyclePause++; }, function() { opts.$cont[0].cyclePause--; } );
};

// helper fn to calculate the number of slides between the current and the next
$.fn.cycle.hopsFromLast = function(opts, fwd) {
	var hops, l = opts.lastSlide, c = opts.currSlide;
	if (fwd)
		hops = c > l ? c - l : opts.slideCount - l;
	else
		hops = c < l ? l - c : l + opts.slideCount - c;
	return hops;
};

// fix clearType problems in ie6 by setting an explicit bg color
// (otherwise text slides look horrible during a fade transition)
function clearTypeFix($slides) {
	debug('applying clearType background-color hack');
	function hex(s) {
		s = parseInt(s).toString(16);
		return s.length < 2 ? '0'+s : s;
	};
	function getBg(e) {
		for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
			var v = $.css(e,'background-color');
			if (v.indexOf('rgb') >= 0 ) {
				var rgb = v.match(/\d+/g);
				return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
			}
			if (v && v != 'transparent')
				return v;
		}
		return '#ffffff';
	};
	$slides.each(function() { $(this).css('background-color', getBg(this)); });
};

// reset common props before the next transition
$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
	$(opts.elements).not(curr).hide();
	opts.cssBefore.opacity = 1;
	opts.cssBefore.display = 'block';
	if (w !== false && next.cycleW > 0)
		opts.cssBefore.width = next.cycleW;
	if (h !== false && next.cycleH > 0)
		opts.cssBefore.height = next.cycleH;
	opts.cssAfter = opts.cssAfter || {};
	opts.cssAfter.display = 'none';
	$(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
	$(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
};

// the actual fn for effecting a transition
$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
	var $l = $(curr), $n = $(next);
	var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
	$n.css(opts.cssBefore);
	if (speedOverride) {
		if (typeof speedOverride == 'number')
			speedIn = speedOut = speedOverride;
		else
			speedIn = speedOut = 1;
		easeIn = easeOut = null;
	}
	var fn = function() {$n.animate(opts.animIn, speedIn, easeIn, cb)};
	$l.animate(opts.animOut, speedOut, easeOut, function() {
		if (opts.cssAfter) $l.css(opts.cssAfter);
		if (!opts.sync) fn();
	});
	if (opts.sync) fn();
};

// transition definitions - only fade is defined here, transition pack defines the rest
$.fn.cycle.transitions = {
	fade: function($cont, $slides, opts) {
		$slides.not(':eq('+opts.currSlide+')').css('opacity',0);
		opts.before.push(function(curr,next,opts) {
			$.fn.cycle.commonReset(curr,next,opts);
			opts.cssBefore.opacity = 0;
		});
		opts.animIn	   = { opacity: 1 };
		opts.animOut   = { opacity: 0 };
		opts.cssBefore = { top: 0, left: 0 };
	}
};

$.fn.cycle.ver = function() { return ver; };

// override these globally if you like (they are all optional)
$.fn.cycle.defaults = {
	fx:			  'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
	timeout:	   4000,  // milliseconds between slide transitions (0 to disable auto advance)
	timeoutFn:     null,  // callback for determining per-slide timeout value:  function(currSlideElement, nextSlideElement, options, forwardFlag)
	continuous:	   0,	  // true to start next transition immediately after current one completes
	speed:		   1000,  // speed of the transition (any valid fx speed value)
	speedIn:	   null,  // speed of the 'in' transition
	speedOut:	   null,  // speed of the 'out' transition
	next:		   null,  // selector for element to use as event trigger for next slide
	prev:		   null,  // selector for element to use as event trigger for previous slide
//	prevNextClick: null,  // @deprecated; please use onPrevNextEvent instead
	onPrevNextEvent: null,  // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
	prevNextEvent:'click.cycle',// event which drives the manual transition to the previous or next slide
	pager:		   null,  // selector for element to use as pager container
	//pagerClick   null,  // @deprecated; please use onPagerEvent instead
	onPagerEvent:  null,  // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
	pagerEvent:	  'click.cycle', // name of event which drives the pager navigation
	allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
	pagerAnchorBuilder: null, // callback fn for building anchor links:  function(index, DOMelement)
	before:		   null,  // transition callback (scope set to element to be shown):	 function(currSlideElement, nextSlideElement, options, forwardFlag)
	after:		   null,  // transition callback (scope set to element that was shown):  function(currSlideElement, nextSlideElement, options, forwardFlag)
	end:		   null,  // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
	easing:		   null,  // easing method for both in and out transitions
	easeIn:		   null,  // easing for "in" transition
	easeOut:	   null,  // easing for "out" transition
	shuffle:	   null,  // coords for shuffle animation, ex: { top:15, left: 200 }
	animIn:		   null,  // properties that define how the slide animates in
	animOut:	   null,  // properties that define how the slide animates out
	cssBefore:	   null,  // properties that define the initial state of the slide before transitioning in
	cssAfter:	   null,  // properties that defined the state of the slide after transitioning out
	fxFn:		   null,  // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
	height:		  'auto', // container height
	startingSlide: 0,	  // zero-based index of the first slide to be displayed
	sync:		   1,	  // true if in/out transitions should occur simultaneously
	random:		   0,	  // true for random, false for sequence (not applicable to shuffle fx)
	fit:		   0,	  // force slides to fit container
	containerResize: 1,	  // resize container to fit largest slide
	pause:		   0,	  // true to enable "pause on hover"
	pauseOnPagerHover: 0, // true to pause when hovering over pager link
	autostop:	   0,	  // true to end slideshow after X transitions (where X == slide count)
	autostopCount: 0,	  // number of transitions (optionally used with autostop to define X)
	delay:		   0,	  // additional delay (in ms) for first transition (hint: can be negative)
	slideExpr:	   null,  // expression for selecting slides (if something other than all children is required)
	cleartype:	   !$.support.opacity,  // true if clearType corrections should be applied (for IE)
	cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
	nowrap:		   0,	  // true to prevent slideshow from wrapping
	fastOnEvent:   0,	  // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
	randomizeEffects: 1,  // valid when multiple effects are used; true to make the effect sequence random
	rev:		   0,	 // causes animations to transition in reverse
	manualTrump:   true,  // causes manual transition to stop an active transition instead of being ignored
	requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
	requeueTimeout: 250,  // ms delay for requeue
	activePagerClass: 'activeSlide', // class name used for the active pager link
	updateActivePagerLink: null // callback fn invoked to update the active pager link (adds/removes activePagerClass style)
};

})(jQuery);


/*!
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version:	 2.72
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function($) {

//
// These functions define one-time slide initialization for the named
// transitions. To save file size feel free to remove any of these that you
// don't need.
//
$.fn.cycle.transitions.none = function($cont, $slides, opts) {
	opts.fxFn = function(curr,next,opts,after){
		$(next).show();
		$(curr).hide();
		after();
	};
}

// scrollUp/Down/Left/Right
$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
	$cont.css('overflow','hidden');
	opts.before.push($.fn.cycle.commonReset);
	var h = $cont.height();
	opts.cssBefore ={ top: h, left: 0 };
	opts.cssFirst = { top: 0 };
	opts.animIn	  = { top: 0 };
	opts.animOut  = { top: -h };
};
$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
	$cont.css('overflow','hidden');
	opts.before.push($.fn.cycle.commonReset);
	var h = $cont.height();
	opts.cssFirst = { top: 0 };
	opts.cssBefore= { top: -h, left: 0 };
	opts.animIn	  = { top: 0 };
	opts.animOut  = { top: h };
};
$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
	$cont.css('overflow','hidden');
	opts.before.push($.fn.cycle.commonReset);
	var w = $cont.width();
	opts.cssFirst = { left: 0 };
	opts.cssBefore= { left: w, top: 0 };
	opts.animIn	  = { left: 0 };
	opts.animOut  = { left: 0-w };
};
$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
	$cont.css('overflow','hidden');
	opts.before.push($.fn.cycle.commonReset);
	var w = $cont.width();
	opts.cssFirst = { left: 0 };
	opts.cssBefore= { left: -w, top: 0 };
	opts.animIn	  = { left: 0 };
	opts.animOut  = { left: w };
};
$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
	$cont.css('overflow','hidden').width();
	opts.before.push(function(curr, next, opts, fwd) {
		$.fn.cycle.commonReset(curr,next,opts);
		opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
		opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
	});
	opts.cssFirst = { left: 0 };
	opts.cssBefore= { top: 0 };
	opts.animIn   = { left: 0 };
	opts.animOut  = { top: 0 };
};
$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
	$cont.css('overflow','hidden');
	opts.before.push(function(curr, next, opts, fwd) {
		$.fn.cycle.commonReset(curr,next,opts);
		opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
		opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
	});
	opts.cssFirst = { top: 0 };
	opts.cssBefore= { left: 0 };
	opts.animIn   = { top: 0 };
	opts.animOut  = { left: 0 };
};

// slideX/slideY
$.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$(opts.elements).not(curr).hide();
		$.fn.cycle.commonReset(curr,next,opts,false,true);
		opts.animIn.width = next.cycleW;
	});
	opts.cssBefore = { left: 0, top: 0, width: 0 };
	opts.animIn	 = { width: 'show' };
	opts.animOut = { width: 0 };
};
$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$(opts.elements).not(curr).hide();
		$.fn.cycle.commonReset(curr,next,opts,true,false);
		opts.animIn.height = next.cycleH;
	});
	opts.cssBefore = { left: 0, top: 0, height: 0 };
	opts.animIn	 = { height: 'show' };
	opts.animOut = { height: 0 };
};

// shuffle
$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
	var i, w = $cont.css('overflow', 'visible').width();
	$slides.css({left: 0, top: 0});
	opts.before.push(function(curr,next,opts) {
		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
	});
	// only adjust speed once!
	if (!opts.speedAdjusted) {
		opts.speed = opts.speed / 2; // shuffle has 2 transitions
		opts.speedAdjusted = true;
	}
	opts.random = 0;
	opts.shuffle = opts.shuffle || {left:-w, top:15};
	opts.els = [];
	for (i=0; i < $slides.length; i++)
		opts.els.push($slides[i]);

	for (i=0; i < opts.currSlide; i++)
		opts.els.push(opts.els.shift());

	// custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
	opts.fxFn = function(curr, next, opts, cb, fwd) {
		var $el = fwd ? $(curr) : $(next);
		$(next).css(opts.cssBefore);
		var count = opts.slideCount;
		$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
			var hops = $.fn.cycle.hopsFromLast(opts, fwd);
			for (var k=0; k < hops; k++)
				fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop());
			if (fwd) {
				for (var i=0, len=opts.els.length; i < len; i++)
					$(opts.els[i]).css('z-index', len-i+count);
			}
			else {
				var z = $(curr).css('z-index');
				$el.css('z-index', parseInt(z)+1+count);
			}
			$el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
				$(fwd ? this : curr).hide();
				if (cb) cb();
			});
		});
	};
	opts.cssBefore = { display: 'block', opacity: 1, top: 0, left: 0 };
};

// turnUp/Down/Left/Right
$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,true,false);
		opts.cssBefore.top = next.cycleH;
		opts.animIn.height = next.cycleH;
	});
	opts.cssFirst  = { top: 0 };
	opts.cssBefore = { left: 0, height: 0 };
	opts.animIn	   = { top: 0 };
	opts.animOut   = { height: 0 };
};
$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,true,false);
		opts.animIn.height = next.cycleH;
		opts.animOut.top   = curr.cycleH;
	});
	opts.cssFirst  = { top: 0 };
	opts.cssBefore = { left: 0, top: 0, height: 0 };
	opts.animOut   = { height: 0 };
};
$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,false,true);
		opts.cssBefore.left = next.cycleW;
		opts.animIn.width = next.cycleW;
	});
	opts.cssBefore = { top: 0, width: 0  };
	opts.animIn	   = { left: 0 };
	opts.animOut   = { width: 0 };
};
$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,false,true);
		opts.animIn.width = next.cycleW;
		opts.animOut.left = curr.cycleW;
	});
	opts.cssBefore = { top: 0, left: 0, width: 0 };
	opts.animIn	   = { left: 0 };
	opts.animOut   = { width: 0 };
};

// zoom
$.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,false,false,true);
		opts.cssBefore.top = next.cycleH/2;
		opts.cssBefore.left = next.cycleW/2;
		opts.animIn	   = { top: 0, left: 0, width: next.cycleW, height: next.cycleH };
		opts.animOut   = { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 };
	});
	opts.cssFirst = { top:0, left: 0 };
	opts.cssBefore = { width: 0, height: 0 };
};

// fadeZoom
$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,false,false);
		opts.cssBefore.left = next.cycleW/2;
		opts.cssBefore.top = next.cycleH/2;
		opts.animIn	= { top: 0, left: 0, width: next.cycleW, height: next.cycleH };
	});
	opts.cssBefore = { width: 0, height: 0 };
	opts.animOut  = { opacity: 0 };
};

// blindX
$.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
	var w = $cont.css('overflow','hidden').width();
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts);
		opts.animIn.width = next.cycleW;
		opts.animOut.left   = curr.cycleW;
	});
	opts.cssBefore = { left: w, top: 0 };
	opts.animIn = { left: 0 };
	opts.animOut  = { left: w };
};
// blindY
$.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
	var h = $cont.css('overflow','hidden').height();
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts);
		opts.animIn.height = next.cycleH;
		opts.animOut.top   = curr.cycleH;
	});
	opts.cssBefore = { top: h, left: 0 };
	opts.animIn = { top: 0 };
	opts.animOut  = { top: h };
};
// blindZ
$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
	var h = $cont.css('overflow','hidden').height();
	var w = $cont.width();
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts);
		opts.animIn.height = next.cycleH;
		opts.animOut.top   = curr.cycleH;
	});
	opts.cssBefore = { top: h, left: w };
	opts.animIn = { top: 0, left: 0 };
	opts.animOut  = { top: h, left: w };
};

// growX - grow horizontally from centered 0 width
$.fn.cycle.transitions.growX = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,false,true);
		opts.cssBefore.left = this.cycleW/2;
		opts.animIn = { left: 0, width: this.cycleW };
		opts.animOut = { left: 0 };
	});
	opts.cssBefore = { width: 0, top: 0 };
};
// growY - grow vertically from centered 0 height
$.fn.cycle.transitions.growY = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,true,false);
		opts.cssBefore.top = this.cycleH/2;
		opts.animIn = { top: 0, height: this.cycleH };
		opts.animOut = { top: 0 };
	});
	opts.cssBefore = { height: 0, left: 0 };
};

// curtainX - squeeze in both edges horizontally
$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,false,true,true);
		opts.cssBefore.left = next.cycleW/2;
		opts.animIn = { left: 0, width: this.cycleW };
		opts.animOut = { left: curr.cycleW/2, width: 0 };
	});
	opts.cssBefore = { top: 0, width: 0 };
};
// curtainY - squeeze in both edges vertically
$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,true,false,true);
		opts.cssBefore.top = next.cycleH/2;
		opts.animIn = { top: 0, height: next.cycleH };
		opts.animOut = { top: curr.cycleH/2, height: 0 };
	});
	opts.cssBefore = { left: 0, height: 0 };
};

// cover - curr slide covered by next slide
$.fn.cycle.transitions.cover = function($cont, $slides, opts) {
	var d = opts.direction || 'left';
	var w = $cont.css('overflow','hidden').width();
	var h = $cont.height();
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts);
		if (d == 'right')
			opts.cssBefore.left = -w;
		else if (d == 'up')
			opts.cssBefore.top = h;
		else if (d == 'down')
			opts.cssBefore.top = -h;
		else
			opts.cssBefore.left = w;
	});
	opts.animIn = { left: 0, top: 0};
	opts.animOut = { opacity: 1 };
	opts.cssBefore = { top: 0, left: 0 };
};

// uncover - curr slide moves off next slide
$.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
	var d = opts.direction || 'left';
	var w = $cont.css('overflow','hidden').width();
	var h = $cont.height();
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
		if (d == 'right')
			opts.animOut.left = w;
		else if (d == 'up')
			opts.animOut.top = -h;
		else if (d == 'down')
			opts.animOut.top = h;
		else
			opts.animOut.left = -w;
	});
	opts.animIn = { left: 0, top: 0 };
	opts.animOut = { opacity: 1 };
	opts.cssBefore = { top: 0, left: 0 };
};

// toss - move top slide and fade away
$.fn.cycle.transitions.toss = function($cont, $slides, opts) {
	var w = $cont.css('overflow','visible').width();
	var h = $cont.height();
	opts.before.push(function(curr, next, opts) {
		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
		// provide default toss settings if animOut not provided
		if (!opts.animOut.left && !opts.animOut.top)
			opts.animOut = { left: w*2, top: -h/2, opacity: 0 };
		else
			opts.animOut.opacity = 0;
	});
	opts.cssBefore = { left: 0, top: 0 };
	opts.animIn = { left: 0 };
};

// wipe - clip animation
$.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
	var w = $cont.css('overflow','hidden').width();
	var h = $cont.height();
	opts.cssBefore = opts.cssBefore || {};
	var clip;
	if (opts.clip) {
		if (/l2r/.test(opts.clip))
			clip = 'rect(0px 0px '+h+'px 0px)';
		else if (/r2l/.test(opts.clip))
			clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
		else if (/t2b/.test(opts.clip))
			clip = 'rect(0px '+w+'px 0px 0px)';
		else if (/b2t/.test(opts.clip))
			clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
		else if (/zoom/.test(opts.clip)) {
			var top = parseInt(h/2);
			var left = parseInt(w/2);
			clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
		}
	}

	opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';

	var d = opts.cssBefore.clip.match(/(\d+)/g);
	var t = parseInt(d[0]), r = parseInt(d[1]), b = parseInt(d[2]), l = parseInt(d[3]);

	opts.before.push(function(curr, next, opts) {
		if (curr == next) return;
		var $curr = $(curr), $next = $(next);
		$.fn.cycle.commonReset(curr,next,opts,true,true,false);
		opts.cssAfter.display = 'block';

		var step = 1, count = parseInt((opts.speedIn / 13)) - 1;
		(function f() {
			var tt = t ? t - parseInt(step * (t/count)) : 0;
			var ll = l ? l - parseInt(step * (l/count)) : 0;
			var bb = b < h ? b + parseInt(step * ((h-b)/count || 1)) : h;
			var rr = r < w ? r + parseInt(step * ((w-r)/count || 1)) : w;
			$next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
			(step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
		})();
	});
	opts.cssBefore = { display: 'block', opacity: 1, top: 0, left: 0 };
	opts.animIn	   = { left: 0 };
	opts.animOut   = { left: 0 };
};

})(jQuery);
;
// ColorBox v1.3.18 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
// Copyright (c) 2011 Jack Moore - jack@colorpowered.com
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
(function(a,b,c){function Y(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function Z(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function $(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function _(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function ba(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bb(b,c){a.event.trigger(b),c&&c.call(P)}function bc(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(Q<y.length-1||K.loop)a=setTimeout(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function bd(b){if(!U){P=b,ba(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1));if(!S){S=T=!0,r.show();if(K.returnFocus)try{P.blur(),a(P).one(l,function(){try{this.focus()}catch(a){}})}catch(c){}q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=$(K.initialWidth,"x"),K.h=$(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),bb(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()}W.load(!0)}}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=a.browser.msie&&!a.support.opacity,o=n&&a.browser.version<7,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X="div";W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},W.init();if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}return c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(g)}),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&bd(f[0]),f},W.init=function(){if(!r){if(!a("body")[0]){a(W.init);return}z=a(c),r=Y(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}),q=Y(X,"Overlay",o?"position:absolute":"").hide(),s=Y(X,"Wrapper"),t=Y(X,"Content").append(A=Y(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Y(X,"LoadingOverlay").add(Y(X,"LoadingGraphic")),D=Y(X,"Title"),E=Y(X,"Current"),G=Y(X,"Next"),H=Y(X,"Previous"),F=Y(X,"Slideshow").bind(h,bc),I=Y(X,"Close")),s.append(Y(X).append(Y(X,"TopLeft"),u=Y(X,"TopCenter"),Y(X,"TopRight")),Y(X,!1,"clear:left").append(v=Y(X,"MiddleLeft"),t,w=Y(X,"MiddleRight")),Y(X,!1,"clear:left").append(Y(X,"BottomLeft"),x=Y(X,"BottomCenter"),Y(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Y(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(q,r.append(s,B)),L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}).hide(),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),J=G.add(H).add(E).add(F),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))})}},W.remove=function(){r.add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g)},W.position=function(a,b){function g(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,C[0].style.height=C[1].style.height=t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset();z.unbind("resize."+f),r.css({top:-99999,left:-99999}),K.fixed&&!o?r.css({position:"fixed"}):(c=z.scrollTop(),d=z.scrollLeft(),r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-$(K.right,"x"),0):K.left!==!1?d+=$(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-$(K.bottom,"y"),0):K.top!==!1?c+=$(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){g(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",b&&b(),setTimeout(function(){z.bind("resize."+f,W.position)},1)},step:function(){g(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=$(a.width,"x")-O-M),a.innerWidth&&(K.w=$(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=$(a.height,"y")-N-L),a.innerHeight&&(K.h=$(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w,K.w}function h(){return K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h,K.h}if(!S)return;var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Y(X,"LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function q(){n&&r[0].style.removeAttribute("filter")}var b,c,g=y.length,h,i="frameBorder",k="allowTransparency",l,o,p;if(!S)return;l=function(){clearTimeout(V),C.hide(),bb(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show();if(g>1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||Q<g-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),K.slideshow&&F.show();if(K.preloading){b=[Z(-1),Z(1)];while(c=y[b.pop()])o=a.data(c,e).href||c.href,a.isFunction(o)&&(o=o.call(c)),_(o)&&(p=new Image,p.src=o)}}else J.hide();K.iframe?(h=Y("iframe")[0],i in h&&(h[i]=0),k in h&&(h[k]="true"),h.name=f+ +(new Date),K.fastIframe?l():a(h).one("load",l),h.src=K.href,K.scrolling||(h.scrolling="no"),a(h).addClass(f+"Iframe").appendTo(A).one(m,function(){h.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,q):q()},K.transition==="fade"?r.fadeTo(d,0,function(){W.position(0,c)}):W.position(d,c)},W.load=function(b){var c,d,e=W.prep;T=!0,R=!1,P=y[Q],b||ba(),bb(m),bb(i,K.onLoad),K.h=K.height?$(K.height,"y")-N-L:K.innerHeight&&$(K.innerHeight,"y"),K.w=K.width?$(K.width,"x")-O-M:K.innerWidth&&$(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=$(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=$(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,V=setTimeout(function(){C.show()},100),K.inline?(Y(X).hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):_(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Y(X,"Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(Q<y.length-1||K.loop)&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Y(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(Q<y.length-1||K.loop)&&(Q=Z(1),W.load())},W.prev=function(){!T&&y[1]&&(Q||K.loop)&&(Q=Z(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bb(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),bb(m),A.remove(),setTimeout(function(){U=!1,bb(l,K.onClosed)},1)}))},W.element=function(){return a(P)},W.settings=d,a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),bd(this))}),W.init()})(jQuery,document,this);;
(function ($) {

Drupal.behaviors.initColorbox = {
  attach: function (context, settings) {
    if (!$.isFunction($.colorbox)) {
      return;
    }
    $('a, area, input', context)
      .filter('.colorbox')
      .once('init-colorbox-processed')
      .colorbox(settings.colorbox);
  }
};

{
  $(document).bind('cbox_complete', function () {
    Drupal.attachBehaviors('#cboxLoadedContent');
  });
}

})(jQuery);
;
(function ($) {

Drupal.behaviors.initColorboxDefaultStyle = {
  attach: function (context, settings) {
    $(document).bind('cbox_complete', function () {
      // Only run if there is a title.
      if ($('#cboxTitle:empty', context).length == false) {
        setTimeout(function () { $('#cboxTitle', context).slideUp() }, 1500);
        $('#cboxLoadedContent img', context).bind('mouseover', function () {
          $('#cboxTitle', context).slideDown();
        });
        $('#cboxOverlay', context).bind('mouseover', function () {
          $('#cboxTitle', context).slideUp();
        });
      }
      else {
        $('#cboxTitle', context).hide();
      }
    });
  }
};

})(jQuery);
;
(function ($) {

Drupal.behaviors.initColorboxLoad = {
  attach: function (context, settings) {
    if (!$.isFunction($.colorbox)) {
      return;
    }
    $.urlParams = function (url) {
      var p = {},
          e,
          a = /\+/g,  // Regex for replacing addition symbol with a space
          r = /([^&=]+)=?([^&]*)/g,
          d = function (s) { return decodeURIComponent(s.replace(a, ' ')); },
          q = url.split('?');
      while (e = r.exec(q[1])) {
        e[1] = d(e[1]);
        e[2] = d(e[2]);
        switch (e[2].toLowerCase()) {
          case 'true':
          case 'yes':
            e[2] = true;
            break;
          case 'false':
          case 'no':
            e[2] = false;
            break;
        }
        if (e[1] == 'width') { e[1] = 'innerWidth'; }
        if (e[1] == 'height') { e[1] = 'innerHeight'; }
        p[e[1]] = e[2];
      }
      return p;
    };
    $('a, area, input', context)
      .filter('.colorbox-load')
      .once('init-colorbox-load-processed', function () {
        var params = $.urlParams($(this).attr('href'));
        $(this).colorbox($.extend({}, settings.colorbox, params));
      });
  }
};

})(jQuery);
;
/*
 * twitter-text-js 1.4.10
 *
 * Copyright 2011 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this work except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 */
if(!window.twttr){window.twttr={}}(function(){twttr.txt={};twttr.txt.regexen={};var C={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#39;"};twttr.txt.htmlEscape=function(R){return R&&R.replace(/[&"'><]/g,function(S){return C[S]})};function D(S,R){R=R||"";if(typeof S!=="string"){if(S.global&&R.indexOf("g")<0){R+="g"}if(S.ignoreCase&&R.indexOf("i")<0){R+="i"}if(S.multiline&&R.indexOf("m")<0){R+="m"}S=S.source}return new RegExp(S.replace(/#\{(\w+)\}/g,function(U,T){var V=twttr.txt.regexen[T]||"";if(typeof V!=="string"){V=V.source}return V}),R)}function E(S,R){return S.replace(/#\{(\w+)\}/g,function(U,T){return R[T]||""})}function B(S,U,R){var T=String.fromCharCode(U);if(R!==U){T+="-"+String.fromCharCode(R)}S.push(T);return S}var J=String.fromCharCode;var H=[J(32),J(133),J(160),J(5760),J(6158),J(8232),J(8233),J(8239),J(8287),J(12288)];B(H,9,13);B(H,8192,8202);twttr.txt.regexen.spaces_group=D(H.join(""));twttr.txt.regexen.spaces=D("["+H.join("")+"]");twttr.txt.regexen.punct=/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~/;twttr.txt.regexen.atSigns=/[@＠]/;twttr.txt.regexen.extractMentions=D(/(^|[^a-zA-Z0-9_])(#{atSigns})([a-zA-Z0-9_]{1,20})(?=(.|$))/g);twttr.txt.regexen.extractReply=D(/^(?:#{spaces})*#{atSigns}([a-zA-Z0-9_]{1,20})/);twttr.txt.regexen.listName=/[a-zA-Z][a-zA-Z0-9_\-\u0080-\u00ff]{0,24}/;twttr.txt.regexen.extractMentionsOrLists=D(/(^|[^a-zA-Z0-9_])(#{atSigns})([a-zA-Z0-9_]{1,20})(\/[a-zA-Z][a-zA-Z0-9_\-]{0,24})?(?=(.|$))/g);var N=[];B(N,1024,1279);B(N,1280,1319);B(N,11744,11775);B(N,42560,42655);B(N,4352,4607);B(N,12592,12677);B(N,43360,43391);B(N,44032,55215);B(N,55216,55295);B(N,65441,65500);B(N,12449,12538);B(N,12540,12542);B(N,65382,65439);B(N,65392,65392);B(N,65296,65305);B(N,65313,65338);B(N,65345,65370);B(N,12353,12438);B(N,12441,12446);B(N,13312,19903);B(N,19968,40959);B(N,173824,177983);B(N,177984,178207);B(N,194560,195103);B(N,12293,12293);B(N,12347,12347);twttr.txt.regexen.nonLatinHashtagChars=D(N.join(""));twttr.txt.regexen.latinAccentChars=D("ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþş\\303\\277");twttr.txt.regexen.endScreenNameMatch=D(/^(?:#{atSigns}|[#{latinAccentChars}]|:\/\/)/);twttr.txt.regexen.hashtagBoundary=D(/(?:^|$|#{spaces}|[「」。、.,!！?？:;"'])/);twttr.txt.regexen.hashtagAlpha=D(/[a-z_#{latinAccentChars}#{nonLatinHashtagChars}]/i);twttr.txt.regexen.hashtagAlphaNumeric=D(/[a-z0-9_#{latinAccentChars}#{nonLatinHashtagChars}]/i);twttr.txt.regexen.autoLinkHashtags=D(/(#{hashtagBoundary})(#|＃)(#{hashtagAlphaNumeric}*#{hashtagAlpha}#{hashtagAlphaNumeric}*)/gi);twttr.txt.regexen.autoLinkUsernamesOrLists=/(^|[^a-zA-Z0-9_]|RT:?)([@＠]+)([a-zA-Z0-9_]{1,20})(\/[a-zA-Z][a-zA-Z0-9_\-]{0,24})?/g;twttr.txt.regexen.autoLinkEmoticon=/(8\-\#|8\-E|\+\-\(|\`\@|\`O|\&lt;\|:~\(|\}:o\{|:\-\[|\&gt;o\&lt;|X\-\/|\[:-\]\-I\-|\/\/\/\/Ö\\\\\\\\|\(\|:\|\/\)|∑:\*\)|\( \| \))/g;twttr.txt.regexen.validPrecedingChars=D(/(?:[^-\/"'!=A-Za-z0-9_@＠\.]|^)/);twttr.txt.regexen.invalidDomainChars=E("\u00A0#{punct}#{spaces_group}",twttr.txt.regexen);twttr.txt.regexen.validDomainChars=D(/[^#{invalidDomainChars}]/);twttr.txt.regexen.validSubdomain=D(/(?:(?:#{validDomainChars}(?:[_-]|#{validDomainChars})*)?#{validDomainChars}\.)/);twttr.txt.regexen.validDomainName=D(/(?:(?:#{validDomainChars}(?:-|#{validDomainChars})*)?#{validDomainChars}\.)/);twttr.txt.regexen.validGTLD=D(/(?:(?:aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel)(?=[^a-zA-Z]|$))/);twttr.txt.regexen.validCCTLD=D(/(?:(?:ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)(?=[^a-zA-Z]|$))/);twttr.txt.regexen.validPunycode=D(/(?:xn--[0-9a-z]+)/);twttr.txt.regexen.validDomain=D(/(?:#{validSubdomain}*#{validDomainName}(?:#{validGTLD}|#{validCCTLD}|#{validPunycode}))/);twttr.txt.regexen.validShortDomain=D(/^#{validDomainName}#{validCCTLD}$/);twttr.txt.regexen.validPortNumber=D(/[0-9]+/);twttr.txt.regexen.validGeneralUrlPathChars=D(/[a-z0-9!\*';:=\+\$\/%#\[\]\-_,~|&#{latinAccentChars}]/i);twttr.txt.regexen.wikipediaDisambiguation=D(/(?:\(#{validGeneralUrlPathChars}+\))/i);twttr.txt.regexen.validUrlPathChars=D(/(?:#{wikipediaDisambiguation}|@#{validGeneralUrlPathChars}+\/|[\.,]?#{validGeneralUrlPathChars}?)/i);twttr.txt.regexen.validUrlPathEndingChars=D(/(?:[\+\-a-z0-9=_#\/#{latinAccentChars}]|#{wikipediaDisambiguation})/i);twttr.txt.regexen.validUrlQueryChars=/[a-z0-9!\*'\(\);:&=\+\$\/%#\[\]\-_\.,~|]/i;twttr.txt.regexen.validUrlQueryEndingChars=/[a-z0-9_&=#\/]/i;twttr.txt.regexen.extractUrl=D("((#{validPrecedingChars})((https?:\\/\\/)?(#{validDomain})(?::(#{validPortNumber}))?(\\/(?:#{validUrlPathChars}+#{validUrlPathEndingChars}|#{validUrlPathChars}+#{validUrlPathEndingChars}?|#{validUrlPathEndingChars})?)?(\\?#{validUrlQueryChars}*#{validUrlQueryEndingChars})?))","gi");twttr.txt.regexen.validateUrlUnreserved=/[a-z0-9\-._~]/i;twttr.txt.regexen.validateUrlPctEncoded=/(?:%[0-9a-f]{2})/i;twttr.txt.regexen.validateUrlSubDelims=/[!$&'()*+,;=]/i;twttr.txt.regexen.validateUrlPchar=D("(?:#{validateUrlUnreserved}|#{validateUrlPctEncoded}|#{validateUrlSubDelims}|[:|@])","i");twttr.txt.regexen.validateUrlScheme=/(?:[a-z][a-z0-9+\-.]*)/i;twttr.txt.regexen.validateUrlUserinfo=D("(?:#{validateUrlUnreserved}|#{validateUrlPctEncoded}|#{validateUrlSubDelims}|:)*","i");twttr.txt.regexen.validateUrlDecOctet=/(?:[0-9]|(?:[1-9][0-9])|(?:1[0-9]{2})|(?:2[0-4][0-9])|(?:25[0-5]))/i;twttr.txt.regexen.validateUrlIpv4=D(/(?:#{validateUrlDecOctet}(?:\.#{validateUrlDecOctet}){3})/i);twttr.txt.regexen.validateUrlIpv6=/(?:\[[a-f0-9:\.]+\])/i;twttr.txt.regexen.validateUrlIp=D("(?:#{validateUrlIpv4}|#{validateUrlIpv6})","i");twttr.txt.regexen.validateUrlSubDomainSegment=/(?:[a-z0-9](?:[a-z0-9_\-]*[a-z0-9])?)/i;twttr.txt.regexen.validateUrlDomainSegment=/(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?)/i;twttr.txt.regexen.validateUrlDomainTld=/(?:[a-z](?:[a-z0-9\-]*[a-z0-9])?)/i;twttr.txt.regexen.validateUrlDomain=D(/(?:(?:#{validateUrlSubDomainSegment]}\.)*(?:#{validateUrlDomainSegment]}\.)#{validateUrlDomainTld})/i);twttr.txt.regexen.validateUrlHost=D("(?:#{validateUrlIp}|#{validateUrlDomain})","i");twttr.txt.regexen.validateUrlUnicodeSubDomainSegment=/(?:(?:[a-z0-9]|[^\u0000-\u007f])(?:(?:[a-z0-9_\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i;twttr.txt.regexen.validateUrlUnicodeDomainSegment=/(?:(?:[a-z0-9]|[^\u0000-\u007f])(?:(?:[a-z0-9\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i;twttr.txt.regexen.validateUrlUnicodeDomainTld=/(?:(?:[a-z]|[^\u0000-\u007f])(?:(?:[a-z0-9\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i;twttr.txt.regexen.validateUrlUnicodeDomain=D(/(?:(?:#{validateUrlUnicodeSubDomainSegment}\.)*(?:#{validateUrlUnicodeDomainSegment}\.)#{validateUrlUnicodeDomainTld})/i);twttr.txt.regexen.validateUrlUnicodeHost=D("(?:#{validateUrlIp}|#{validateUrlUnicodeDomain})","i");twttr.txt.regexen.validateUrlPort=/[0-9]{1,5}/;twttr.txt.regexen.validateUrlUnicodeAuthority=D("(?:(#{validateUrlUserinfo})@)?(#{validateUrlUnicodeHost})(?::(#{validateUrlPort}))?","i");twttr.txt.regexen.validateUrlAuthority=D("(?:(#{validateUrlUserinfo})@)?(#{validateUrlHost})(?::(#{validateUrlPort}))?","i");twttr.txt.regexen.validateUrlPath=D(/(\/#{validateUrlPchar}*)*/i);twttr.txt.regexen.validateUrlQuery=D(/(#{validateUrlPchar}|\/|\?)*/i);twttr.txt.regexen.validateUrlFragment=D(/(#{validateUrlPchar}|\/|\?)*/i);twttr.txt.regexen.validateUrlUnencoded=D("^(?:([^:/?#]+):\\/\\/)?([^/?#]*)([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$","i");var A="tweet-url";var G="list-slug";var Q="username";var M="hashtag";var O=' rel="nofollow"';function K(T){var S={};for(var R in T){if(T.hasOwnProperty(R)){S[R]=T[R]}}return S}twttr.txt.autoLink=function(S,R){R=K(R||{});return twttr.txt.autoLinkUsernamesOrLists(twttr.txt.autoLinkUrlsCustom(twttr.txt.autoLinkHashtags(S,R),R),R)};twttr.txt.autoLinkUsernamesOrLists=function(X,V){V=K(V||{});V.urlClass=V.urlClass||A;V.listClass=V.listClass||G;V.usernameClass=V.usernameClass||Q;V.usernameUrlBase=V.usernameUrlBase||"http://twitter.com/";V.listUrlBase=V.listUrlBase||"http://twitter.com/";if(!V.suppressNoFollow){var R=O}var W="",U=twttr.txt.splitTags(X);for(var T=0;T<U.length;T++){var S=U[T];if(T!==0){W+=((T%2===0)?">":"<")}if(T%4!==0){W+=S}else{W+=S.replace(twttr.txt.regexen.autoLinkUsernamesOrLists,function(f,i,a,e,Y,c,j){var Z=j.slice(c+f.length);var h={before:i,at:a,user:twttr.txt.htmlEscape(e),slashListname:twttr.txt.htmlEscape(Y),extraHtml:R,preChunk:"",chunk:twttr.txt.htmlEscape(j),postChunk:""};for(var b in V){if(V.hasOwnProperty(b)){h[b]=V[b]}}if(Y&&!V.suppressLists){var g=h.chunk=E("#{user}#{slashListname}",h);h.list=twttr.txt.htmlEscape(g.toLowerCase());return E('#{before}#{at}<a class="#{urlClass} #{listClass}" href="#{listUrlBase}#{list}"#{extraHtml}>#{preChunk}#{chunk}#{postChunk}</a>',h)}else{if(Z&&Z.match(twttr.txt.regexen.endScreenNameMatch)){return f}else{h.chunk=twttr.txt.htmlEscape(e);h.dataScreenName=!V.suppressDataScreenName?E('data-screen-name="#{chunk}" ',h):"";return E('#{before}#{at}<a class="#{urlClass} #{usernameClass}" #{dataScreenName}href="#{usernameUrlBase}#{chunk}"#{extraHtml}>#{preChunk}#{chunk}#{postChunk}</a>',h)}}})}}return W};twttr.txt.autoLinkHashtags=function(T,S){S=K(S||{});S.urlClass=S.urlClass||A;S.hashtagClass=S.hashtagClass||M;S.hashtagUrlBase=S.hashtagUrlBase||"http://twitter.com/search?q=%23";if(!S.suppressNoFollow){var R=O}return T.replace(twttr.txt.regexen.autoLinkHashtags,function(V,W,X,Z){var Y={before:W,hash:twttr.txt.htmlEscape(X),preText:"",text:twttr.txt.htmlEscape(Z),postText:"",extraHtml:R};for(var U in S){if(S.hasOwnProperty(U)){Y[U]=S[U]}}return E('#{before}<a href="#{hashtagUrlBase}#{text}" title="##{text}" class="#{urlClass} #{hashtagClass}"#{extraHtml}>#{hash}#{preText}#{text}#{postText}</a>',Y)})};twttr.txt.autoLinkUrlsCustom=function(U,S){S=K(S||{});if(!S.suppressNoFollow){S.rel="nofollow"}if(S.urlClass){S["class"]=S.urlClass;delete S.urlClass}var V,T,R;if(S.urlEntities){V={};for(T=0,R=S.urlEntities.length;T<R;T++){V[S.urlEntities[T].url]=S.urlEntities[T]}}delete S.suppressNoFollow;delete S.suppressDataScreenName;delete S.listClass;delete S.usernameClass;delete S.usernameUrlBase;delete S.listUrlBase;return U.replace(twttr.txt.regexen.extractUrl,function(e,h,g,X,i,a,c,j,W){var Z;if(i){var Y="";for(var b in S){Y+=E(' #{k}="#{v}" ',{k:b,v:S[b].toString().replace(/"/,"&quot;").replace(/</,"&lt;").replace(/>/,"&gt;")})}var f={before:g,htmlAttrs:Y,url:twttr.txt.htmlEscape(X)};if(V&&V[X]&&V[X].display_url){f.displayUrl=twttr.txt.htmlEscape(V[X].display_url)}else{f.displayUrl=f.url}return E('#{before}<a href="#{url}"#{htmlAttrs}>#{displayUrl}</a>',f)}else{return h}})};twttr.txt.extractMentions=function(U){var V=[],R=twttr.txt.extractMentionsWithIndices(U);for(var T=0;T<R.length;T++){var S=R[T].screenName;V.push(S)}return V};twttr.txt.extractMentionsWithIndices=function(T){if(!T){return[]}var S=[],R=0;T.replace(twttr.txt.regexen.extractMentions,function(U,Y,X,V,Z){if(!Z.match(twttr.txt.regexen.endScreenNameMatch)){var W=T.indexOf(X+V,R);R=W+V.length+1;S.push({screenName:V,indices:[W,R]})}});return S};twttr.txt.extractMentionsOrListsWithIndices=function(T){if(!T){return[]}var S=[],R=0;T.replace(twttr.txt.regexen.extractMentionsOrLists,function(U,Y,X,V,a,Z){if(!Z.match(twttr.txt.regexen.endScreenNameMatch)){a=a||"";var W=T.indexOf(X+V+a,R);R=W+V.length+a.length+1;S.push({screenName:V,listSlug:a,indices:[W,R]})}});return S};twttr.txt.extractReplies=function(S){if(!S){return null}var R=S.match(twttr.txt.regexen.extractReply);if(!R){return null}return R[1]};twttr.txt.extractUrls=function(U){var T=[],R=twttr.txt.extractUrlsWithIndices(U);for(var S=0;S<R.length;S++){T.push(R[S].url)}return T};twttr.txt.extractUrlsWithIndices=function(T){if(!T){return[]}var S=[],R=0;T.replace(twttr.txt.regexen.extractUrl,function(Z,c,b,U,d,W,V,e,a){if(!d&&!e&&W.match(twttr.txt.regexen.validShortDomain)){return }var X=T.indexOf(U,Y),Y=X+U.length;S.push({url:U,indices:[X,Y]})});return S};twttr.txt.extractHashtags=function(U){var T=[],S=twttr.txt.extractHashtagsWithIndices(U);for(var R=0;R<S.length;R++){T.push(S[R].hashtag)}return T};twttr.txt.extractHashtagsWithIndices=function(T){if(!T){return[]}var S=[],R=0;T.replace(twttr.txt.regexen.autoLinkHashtags,function(U,X,Y,W){var V=T.indexOf(Y+W,R);R=V+W.length+1;S.push({hashtag:W,indices:[V,R]})});return S};twttr.txt.splitTags=function(X){var R=X.split("<"),W,V=[],U;for(var T=0;T<R.length;T+=1){U=R[T];if(!U){V.push("")}else{W=U.split(">");for(var S=0;S<W.length;S+=1){V.push(W[S])}}}return V};twttr.txt.hitHighlight=function(c,e,U){var a="em";e=e||[];U=U||{};if(e.length===0){return c}var T=U.tag||a,d=["<"+T+">","</"+T+">"],b=twttr.txt.splitTags(c),f,k,h,X="",R=0,Y=b[0],Z=0,S=0,o=false,V=Y,g=[],W,l,p,n,m;for(k=0;k<e.length;k+=1){for(h=0;h<e[k].length;h+=1){g.push(e[k][h])}}for(W=0;W<g.length;W+=1){l=g[W];p=d[W%2];n=false;while(Y!=null&&l>=Z+Y.length){X+=V.slice(S);if(o&&l===Z+V.length){X+=p;n=true}if(b[R+1]){X+="<"+b[R+1]+">"}Z+=V.length;S=0;R+=2;Y=b[R];V=Y;o=false}if(!n&&Y!=null){m=l-Z;X+=V.slice(S,m)+p;S=m;if(W%2===0){o=true}else{o=false}}else{if(!n){n=true;X+=p}}}if(Y!=null){if(S<V.length){X+=V.slice(S)}for(W=R+1;W<b.length;W+=1){X+=(W%2===0?b[W]:"<"+b[W]+">")}}return X};var F=140;var P=[J(65534),J(65279),J(65535),J(8234),J(8235),J(8236),J(8237),J(8238)];twttr.txt.isInvalidTweet=function(S){if(!S){return"empty"}if(S.length>F){return"too_long"}for(var R=0;R<P.length;R++){if(S.indexOf(P[R])>=0){return"invalid_characters"}}return false};twttr.txt.isValidTweetText=function(R){return !twttr.txt.isInvalidTweet(R)};twttr.txt.isValidUsername=function(S){if(!S){return false}var R=twttr.txt.extractMentions(S);return R.length===1&&R[0]===S.slice(1)};var L=D(/^#{autoLinkUsernamesOrLists}$/);twttr.txt.isValidList=function(S){var R=S.match(L);return !!(R&&R[1]==""&&R[4])};twttr.txt.isValidHashtag=function(S){if(!S){return false}var R=twttr.txt.extractHashtags(S);return R.length===1&&R[0]===S.slice(1)};twttr.txt.isValidUrl=function(R,W,Z){if(W==null){W=true}if(Z==null){Z=true}if(!R){return false}var S=R.match(twttr.txt.regexen.validateUrlUnencoded);if(!S||S[0]!==R){return false}var T=S[1],U=S[2],Y=S[3],X=S[4],V=S[5];if(!((!Z||(I(T,twttr.txt.regexen.validateUrlScheme)&&T.match(/^https?$/i)))&&I(Y,twttr.txt.regexen.validateUrlPath)&&I(X,twttr.txt.regexen.validateUrlQuery,true)&&I(V,twttr.txt.regexen.validateUrlFragment,true))){return false}return(W&&I(U,twttr.txt.regexen.validateUrlUnicodeAuthority))||(!W&&I(U,twttr.txt.regexen.validateUrlAuthority))};function I(S,T,R){if(!R){return((typeof S==="string")&&S.match(T)&&RegExp["$&"]===S)}return(!S||(S.match(T)&&RegExp["$&"]===S))}if(typeof module!="undefined"&&module.exports){module.exports=twttr.txt}}());TWTR=window.TWTR||{};if(!Array.prototype.forEach){Array.prototype.filter=function(E,F){var D=F||window;var A=[];for(var C=0,B=this.length;C<B;++C){if(!E.call(D,this[C],C,this)){continue}A.push(this[C])}return A};Array.prototype.indexOf=function(B,C){var C=C||0;for(var A=0;A<this.length;++A){if(this[A]===B){return A}}return -1}}(function(){if(TWTR&&TWTR.Widget){return }function F(J,M,I){for(var L=0,K=J.length;L<K;++L){M.call(I||window,J[L],L,J)}}function B(I,K,J){this.el=I;this.prop=K;this.from=J.from;this.to=J.to;this.time=J.time;this.callback=J.callback;this.animDiff=this.to-this.from}B.canTransition=function(){var I=document.createElement("twitter");I.style.cssText="-webkit-transition: all .5s linear;";return !!I.style.webkitTransitionProperty}();B.prototype._setStyle=function(I){switch(this.prop){case"opacity":this.el.style[this.prop]=I;this.el.style.filter="alpha(opacity="+I*100+")";break;default:this.el.style[this.prop]=I+"px";break}};B.prototype._animate=function(){var I=this;this.now=new Date();this.diff=this.now-this.startTime;if(this.diff>this.time){this._setStyle(this.to);if(this.callback){this.callback.call(this)}clearInterval(this.timer);return }this.percentage=(Math.floor((this.diff/this.time)*100)/100);this.val=(this.animDiff*this.percentage)+this.from;this._setStyle(this.val)};B.prototype.start=function(){var I=this;this.startTime=new Date();this.timer=setInterval(function(){I._animate.call(I)},15)};TWTR.Widget=function(I){this.init(I)};(function(){var W=window.twttr||{};var T=location.protocol.match(/https/);var V=/^.+\/profile_images/;var b="https://s3.amazonaws.com/twitter_production/profile_images";var c=function(n){return T?n.replace(V,b):n};var m={};var k=function(o){var n=m[o];if(!n){n=new RegExp("(?:^|\\s+)"+o+"(?:\\s+|$)");m[o]=n}return n};var J=function(s,w,t,u){var w=w||"*";var t=t||document;var o=[],n=t.getElementsByTagName(w),v=k(s);for(var p=0,q=n.length;p<q;++p){if(v.test(n[p].className)){o[o.length]=n[p];if(u){u.call(n[p],n[p])}}}return o};var l=function(){var n=navigator.userAgent;return{ie:n.match(/MSIE\s([^;]*)/)}}();var M=function(n){if(typeof n=="string"){return document.getElementById(n)}return n};var e=function(n){return n.replace(/^\s+|\s+$/g,"")};var a=function(){var n=self.innerHeight;var o=document.compatMode;if((o||l.ie)){n=(o=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight}return n};var j=function(p,n){var o=p.target||p.srcElement;return n(o)};var Y=function(o){try{if(o&&3==o.nodeType){return o.parentNode}else{return o}}catch(n){}};var Z=function(o){var n=o.relatedTarget;if(!n){if(o.type=="mouseout"){n=o.toElement}else{if(o.type=="mouseover"){n=o.fromElement}}}return Y(n)};var f=function(o,n){n.parentNode.insertBefore(o,n.nextSibling)};var g=function(o){try{o.parentNode.removeChild(o)}catch(n){}};var d=function(n){return n.firstChild};var I=function(p){var o=Z(p);while(o&&o!=this){try{o=o.parentNode}catch(n){o=this}}if(o!=this){return true}return false};var L=function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(o,s){var q=null;var p=document.defaultView.getComputedStyle(o,"");if(p){q=p[s]}var n=o.style[s]||q;return n}}else{if(document.documentElement.currentStyle&&l.ie){return function(n,p){var o=n.currentStyle?n.currentStyle[p]:null;return(n.style[p]||o)}}}}();var i={has:function(n,o){return new RegExp("(^|\\s)"+o+"(\\s|$)").test(M(n).className)},add:function(n,o){if(!this.has(n,o)){M(n).className=e(M(n).className)+" "+o}},remove:function(n,o){if(this.has(n,o)){M(n).className=M(n).className.replace(new RegExp("(^|\\s)"+o+"(\\s|$)","g"),"")}}};var K={add:function(p,o,n){if(p.addEventListener){p.addEventListener(o,n,false)}else{p.attachEvent("on"+o,function(){n.call(p,window.event)})}},remove:function(p,o,n){if(p.removeEventListener){p.removeEventListener(o,n,false)}else{p.detachEvent("on"+o,n)}}};var S=function(){function o(q){return parseInt((q).substring(0,2),16)}function n(q){return parseInt((q).substring(2,4),16)}function p(q){return parseInt((q).substring(4,6),16)}return function(q){return[o(q),n(q),p(q)]}}();var N={bool:function(n){return typeof n==="boolean"},def:function(n){return !(typeof n==="undefined")},number:function(o){return typeof o==="number"&&isFinite(o)},string:function(n){return typeof n==="string"},fn:function(n){return typeof n==="function"},array:function(n){if(n){return N.number(n.length)&&N.fn(n.splice)}return false}};var R=["January","February","March","April","May","June","July","August","September","October","November","December"];var X=function(q){var v=new Date(q);if(l.ie){v=Date.parse(q.replace(/( \+)/," UTC$1"))}var o="";var n=function(){var s=v.getHours();if(s>0&&s<13){o="am";return s}else{if(s<1){o="am";return 12}else{o="pm";return s-12}}}();var p=v.getMinutes();var u=v.getSeconds();function t(){var s=new Date();if(s.getDate()!=v.getDate()||s.getYear()!=v.getYear()||s.getMonth()!=v.getMonth()){return" - "+R[v.getMonth()]+" "+v.getDate()+", "+v.getFullYear()}else{return""}}return n+":"+p+o+t()};var P=function(u){var w=new Date();var s=new Date(u);if(l.ie){s=Date.parse(u.replace(/( \+)/," UTC$1"))}var v=w-s;var o=1000,p=o*60,q=p*60,t=q*24,n=t*7;if(isNaN(v)||v<0){return""}if(v<o*2){return"right now"}if(v<p){return Math.floor(v/o)+" seconds ago"}if(v<p*2){return"about 1 minute ago"}if(v<q){return Math.floor(v/p)+" minutes ago"}if(v<q*2){return"about 1 hour ago"}if(v<t){return Math.floor(v/q)+" hours ago"}if(v>t&&v<t*2){return"yesterday"}if(v<t*365){return Math.floor(v/t)+" days ago"}else{return"over a year ago"}};function h(q){var p={};for(var n in q){if(q.hasOwnProperty(n)){p[n]=q[n]}}return p}W.txt.autoLink=function(o,n){n=options_links=n||{};if(n.hasOwnProperty("extraHtml")){options_links=h(n);delete options_links.extraHtml}return W.txt.autoLinkUsernamesOrLists(W.txt.autoLinkUrlsCustom(W.txt.autoLinkHashtags(o,n),options_links),n)};TWTR.Widget.ify={autoLink:function(n){options={extraHtml:"target=_blank",target:"_blank",urlEntities:[]};if(n.needle.entities){if(n.needle.entities.urls){options.urlEntities=n.needle.entities.urls}if(n.needle.entities.media){options.urlEntities=options.urlEntities.concat(n.needle.entities.media)}}if(W&&W.txt){return W.txt.autoLink(n.needle.text,options).replace(/([@＠]+)(<[^>]*>)/g,"$2$1")}else{return n.needle.text}}};function U(o,p,n){this.job=o;this.decayFn=p;this.interval=n;this.decayRate=1;this.decayMultiplier=1.25;this.maxDecayTime=3*60*1000}U.prototype={start:function(){this.stop().run();return this},stop:function(){if(this.worker){window.clearTimeout(this.worker)}return this},run:function(){var n=this;this.job(function(){n.decayRate=n.decayFn()?Math.max(1,n.decayRate/n.decayMultiplier):n.decayRate*n.decayMultiplier;var o=n.interval*n.decayRate;o=(o>=n.maxDecayTime)?n.maxDecayTime:o;o=Math.floor(o);n.worker=window.setTimeout(function(){n.run.call(n)},o)})},destroy:function(){this.stop();this.decayRate=1;return this}};function O(o,n,p){this.time=o||6000;this.loop=n||false;this.repeated=0;this.callback=p;this.haystack=[]}O.prototype={set:function(n){this.haystack=n},add:function(n){this.haystack.unshift(n)},start:function(){if(this.timer){return this}this._job();var n=this;this.timer=setInterval(function(){n._job.call(n)},this.time);return this},stop:function(){if(this.timer){window.clearInterval(this.timer);this.timer=null}return this},_next:function(){var n=this.haystack.shift();if(n&&this.loop){this.haystack.push(n)}return n||null},_job:function(){var n=this._next();if(n){this.callback(n)}return this}};function Q(o){var n='<div class="twtr-tweet-wrap">         <div class="twtr-avatar">           <div class="twtr-img"><a target="_blank" href="http://twitter.com/intent/user?screen_name='+o.user+'"><img alt="'+o.user+' profile" src="'+c(o.avatar)+'"></a></div>         </div>         <div class="twtr-tweet-text">           <p>             <a target="_blank" href="http://twitter.com/intent/user?screen_name='+o.user+'" class="twtr-user">'+o.user+"</a> "+o.tweet+'             <em>            <a target="_blank" class="twtr-timestamp" time="'+o.timestamp+'" href="http://twitter.com/'+o.user+"/status/"+o.id+'">'+o.created_at+'</a> &middot;            <a target="_blank" class="twtr-reply" href="http://twitter.com/intent/tweet?in_reply_to='+o.id+'">reply</a> &middot;             <a target="_blank" class="twtr-rt" href="http://twitter.com/intent/retweet?tweet_id='+o.id+'">retweet</a> &middot;             <a target="_blank" class="twtr-fav" href="http://twitter.com/intent/favorite?tweet_id='+o.id+'">favorite</a>             </em>           </p>         </div>       </div>';var p=document.createElement("div");p.id="tweet-id-"+ ++Q._tweetCount;p.className="twtr-tweet";p.innerHTML=n;this.element=p}Q._tweetCount=0;W.loadStyleSheet=function(p,o){if(!TWTR.Widget.loadingStyleSheet){TWTR.Widget.loadingStyleSheet=true;var n=document.createElement("link");n.href=p;n.rel="stylesheet";n.type="text/css";document.getElementsByTagName("head")[0].appendChild(n);var q=setInterval(function(){var s=L(o,"position");if(s=="relative"){clearInterval(q);q=null;TWTR.Widget.hasLoadedStyleSheet=true}},50)}};(function(){var n=false;W.css=function(q){var p=document.createElement("style");p.type="text/css";if(l.ie){p.styleSheet.cssText=q}else{var s=document.createDocumentFragment();s.appendChild(document.createTextNode(q));p.appendChild(s)}function o(){document.getElementsByTagName("head")[0].appendChild(p)}if(!l.ie||n){o()}else{window.attachEvent("onload",function(){n=true;o()})}}})();TWTR.Widget.isLoaded=false;TWTR.Widget.loadingStyleSheet=false;TWTR.Widget.hasLoadedStyleSheet=false;TWTR.Widget.WIDGET_NUMBER=0;TWTR.Widget.REFRESH_MIN=6000;TWTR.Widget.ENTITY_RANGE=100;TWTR.Widget.ENTITY_PERCENTAGE=80;TWTR.Widget.matches={mentions:/^@[a-zA-Z0-9_]{1,20}\b/,any_mentions:/\b@[a-zA-Z0-9_]{1,20}\b/};TWTR.Widget.jsonP=function(o,q){var n=document.createElement("script");var p=document.getElementsByTagName("head")[0];n.type="text/javascript";n.src=o;p.insertBefore(n,p.firstChild);q(n);return n};TWTR.Widget.randomNumber=function(n){r=Math.floor(Math.random()*n);return r};TWTR.Widget.SHOW_ENTITIES=TWTR.Widget.randomNumber(TWTR.Widget.ENTITY_RANGE)<=TWTR.Widget.ENTITY_PERCENTAGE;TWTR.Widget.prototype=function(){var t=window.twttr||{};var u=T?"https://":"http://";var s="twitter.com";var o=u+"search."+s+"/search.";var n=u+"api."+s+"/1/statuses/user_timeline.";var q=u+s+"/favorites/";var p=u+"api."+s+"/1/";var v=25000;var w=T?"https://twitter-widgets.s3.amazonaws.com/j/1/default.gif":"http://widgets.twimg.com/j/1/default.gif";return{init:function(y){var x=this;this._widgetNumber=++TWTR.Widget.WIDGET_NUMBER;TWTR.Widget["receiveCallback_"+this._widgetNumber]=function(z){x._prePlay.call(x,z)};this._cb="TWTR.Widget.receiveCallback_"+this._widgetNumber;this.opts=y;this._base=o;this._isRunning=false;this._hasOfficiallyStarted=false;this._hasNewSearchResults=false;this._rendered=false;this._profileImage=false;this._isCreator=!!y.creator;this._setWidgetType(y.type);this.timesRequested=0;this.runOnce=false;this.newResults=false;this.results=[];this.jsonMaxRequestTimeOut=19000;this.showedResults=[];this.sinceId=1;this.source="TWITTERINC_WIDGET";this.id=y.id||"twtr-widget-"+this._widgetNumber;this.tweets=0;this.setDimensions(y.width,y.height);this.interval=y.interval?Math.max(y.interval,TWTR.Widget.REFRESH_MIN):TWTR.Widget.REFRESH_MIN;this.format="json";this.rpp=y.rpp||50;this.subject=y.subject||"";this.title=y.title||"";this.setFooterText(y.footer);this.setSearch(y.search);this._setUrl();this.theme=y.theme?y.theme:this._getDefaultTheme();if(!y.id){document.write('<div class="twtr-widget" id="'+this.id+'"></div>')}this.widgetEl=M(this.id);if(y.id){i.add(this.widgetEl,"twtr-widget")}if(y.version>=2&&!TWTR.Widget.hasLoadedStyleSheet){if(T){t.loadStyleSheet("https://twitter-widgets.s3.amazonaws.com/j/2/widget.css",this.widgetEl)}else{if(y.creator){t.loadStyleSheet("/stylesheets/widgets/widget.css",this.widgetEl)}else{t.loadStyleSheet("http://widgets.twimg.com/j/2/widget.css",this.widgetEl)}}}this.occasionalJob=new U(function(z){x.decay=z;x._getResults.call(x)},function(){return x._decayDecider.call(x)},v);this._ready=N.fn(y.ready)?y.ready:function(){};this._isRelativeTime=true;this._tweetFilter=false;this._avatars=true;this._isFullScreen=false;this._isLive=true;this._isScroll=false;this._loop=true;this._behavior="default";this.setFeatures(this.opts.features);this.intervalJob=new O(this.interval,this._loop,function(z){x._normalizeTweet(z)});return this},setDimensions:function(x,y){this.wh=(x&&y)?[x,y]:[250,300];if(x=="auto"||x=="100%"){this.wh[0]="100%"}else{this.wh[0]=((this.wh[0]<150)?150:this.wh[0])+"px"}this.wh[1]=((this.wh[1]<100)?100:this.wh[1])+"px";return this},setRpp:function(x){var x=parseInt(x);this.rpp=(N.number(x)&&(x>0&&x<=100))?x:30;return this},_setWidgetType:function(x){this._isSearchWidget=false,this._isProfileWidget=false,this._isFavsWidget=false,this._isListWidget=false;switch(x){case"profile":this._isProfileWidget=true;break;case"search":this._isSearchWidget=true,this.search=this.opts.search;break;case"faves":case"favs":this._isFavsWidget=true;break;case"list":case"lists":this._isListWidget=true;break}return this},setFeatures:function(x){if(x){if(N.def(x.filters)){this._tweetFilter=x.filters}if(N.def(x.dateformat)){this._isRelativeTime=!!(x.dateformat!=="absolute")}if(N.def(x.fullscreen)&&N.bool(x.fullscreen)){if(x.fullscreen){this._isFullScreen=true;this.wh[0]="100%";this.wh[1]=(a()-90)+"px";var y=this;K.add(window,"resize",function(AA){y.wh[1]=a();y._fullScreenResize()})}}if(N.def(x.loop)&&N.bool(x.loop)){this._loop=x.loop}if(N.def(x.behavior)&&N.string(x.behavior)){switch(x.behavior){case"all":this._behavior="all";break;case"preloaded":this._behavior="preloaded";break;default:this._behavior="default";break}}if(N.def(x.avatars)&&N.bool(x.avatars)){if(!x.avatars){t.css("#"+this.id+" .twtr-avatar { display: none; } #"+this.id+" .twtr-tweet-text { margin-left: 0; }");this._avatars=false}else{var z=(this._isFullScreen)?"90px":"40px";t.css("#"+this.id+" .twtr-avatar { display: block; } #"+this.id+" .twtr-user { display: inline; } #"+this.id+" .twtr-tweet-text { margin-left: "+z+"; }");this._avatars=true}}else{if(this._isProfileWidget){this.setFeatures({avatars:false});this._avatars=false}else{this.setFeatures({avatars:true});this._avatars=true}}if(N.def(x.live)&&N.bool(x.live)){this._isLive=x.live}if(N.def(x.scrollbar)&&N.bool(x.scrollbar)){this._isScroll=x.scrollbar}}else{if(this._isProfileWidget||this._isFavsWidget){this._behavior="all"}}return this},_fullScreenResize:function(){var x=J("twtr-timeline","div",document.body,function(y){y.style.height=(a()-90)+"px"})},setTweetInterval:function(x){this.interval=x;return this},setBase:function(x){this._base=x;return this},setUser:function(y,x){this.username=y;this.realname=x||" ";if(this._isFavsWidget){this.setBase(q+y+".")}else{if(this._isProfileWidget){this.setBase(n+this.format+"?screen_name="+y)}}this.setSearch(" ");return this},setList:function(y,x){this.listslug=x.replace(/ /g,"-").toLowerCase();this.username=y;this.setBase(p+y+"/lists/"+this.listslug+"/statuses.");this.setSearch(" ");return this},setProfileImage:function(x){this._profileImage=x;this.byClass("twtr-profile-img","img").src=c(x);this.byClass("twtr-profile-img-anchor","a").href="http://twitter.com/intent/user?screen_name="+this.username;return this},setTitle:function(x){this.title=x;this.widgetEl.getElementsByTagName("h3")[0].innerHTML=this.title;return this},setCaption:function(x){this.subject=x;this.widgetEl.getElementsByTagName("h4")[0].innerHTML=this.subject;return this},setFooterText:function(x){this.footerText=(N.def(x)&&N.string(x))?x:"Join the conversation";if(this._rendered){this.byClass("twtr-join-conv","a").innerHTML=this.footerText}return this},setSearch:function(y){this.searchString=y||"";this.search=encodeURIComponent(this.searchString);this._setUrl();if(this._rendered){var x=this.byClass("twtr-join-conv","a");x.href="http://twitter.com/"+this._getWidgetPath()}return this},_getWidgetPath:function(){if(this._isProfileWidget){return this.username}else{if(this._isFavsWidget){return this.username+"/favorites"}else{if(this._isListWidget){return this.username+"/lists/"+this.listslug}else{return"#search?q="+this.search}}}},_setUrl:function(){var y=this;function x(){return"&"+(+new Date)+"=cachebust"}function z(){return(y.sinceId==1)?"":"&since_id="+y.sinceId+"&refresh=true"}if(this._isProfileWidget){this.url=this._includeEntities(this._base+"&callback="+this._cb+"&include_rts=true&count="+this.rpp+z()+"&clientsource="+this.source)}else{if(this._isFavsWidget||this._isListWidget){this.url=this._includeEntities(this._base+this.format+"?callback="+this._cb+z()+"&clientsource="+this.source)}else{this.url=this._includeEntities(this._base+this.format+"?q="+this.search+"&callback="+this._cb+"&rpp="+this.rpp+z()+"&clientsource="+this.source);if(!this.runOnce){this.url+="&result_type=recent"}}}this.url+=x();return this},_includeEntities:function(x){if(TWTR.Widget.SHOW_ENTITIES){return x+"&include_entities=true"}return x},_getRGB:function(x){return S(x.substring(1,7))},setTheme:function(AC,x){var AA=this;var y=" !important";var AB=((window.location.hostname.match(/twitter\.com/))&&(window.location.pathname.match(/goodies/)));if(x||AB){y=""}this.theme={shell:{background:function(){return AC.shell.background||AA._getDefaultTheme().shell.background}(),color:function(){return AC.shell.color||AA._getDefaultTheme().shell.color}()},tweets:{background:function(){return AC.tweets.background||AA._getDefaultTheme().tweets.background}(),color:function(){return AC.tweets.color||AA._getDefaultTheme().tweets.color}(),links:function(){return AC.tweets.links||AA._getDefaultTheme().tweets.links}()}};var z="#"+this.id+" .twtr-doc,                      #"+this.id+" .twtr-hd a,                      #"+this.id+" h3,                      #"+this.id+" h4 {            background-color: "+this.theme.shell.background+y+";            color: "+this.theme.shell.color+y+";          }          #"+this.id+" .twtr-tweet a {            color: "+this.theme.tweets.links+y+";          }          #"+this.id+" .twtr-bd, #"+this.id+" .twtr-timeline i a,           #"+this.id+" .twtr-bd p {            color: "+this.theme.tweets.color+y+";          }          #"+this.id+" .twtr-new-results,           #"+this.id+" .twtr-results-inner,           #"+this.id+" .twtr-timeline {            background: "+this.theme.tweets.background+y+";          }";if(l.ie){z+="#"+this.id+" .twtr-tweet { background: "+this.theme.tweets.background+y+"; }"}t.css(z);return this},byClass:function(AA,x,y){var z=J(AA,x,M(this.id));return(y)?z:z[0]},render:function(){var z=this;if(!TWTR.Widget.hasLoadedStyleSheet){window.setTimeout(function(){z.render.call(z)},50);return this}this.setTheme(this.theme,this._isCreator);if(this._isProfileWidget){i.add(this.widgetEl,"twtr-widget-profile")}if(this._isScroll){i.add(this.widgetEl,"twtr-scroll")}if(!this._isLive&&!this._isScroll){this.wh[1]="auto"}if(this._isSearchWidget&&this._isFullScreen){document.title="Twitter search: "+escape(this.searchString)}this.widgetEl.innerHTML=this._getWidgetHtml();var y=this.byClass("twtr-timeline","div");if(this._isLive&&!this._isFullScreen){var AA=function(AB){if(z._behavior==="all"){return }if(I.call(this,AB)){z.pause.call(z)}};var x=function(AB){if(z._behavior==="all"){return }if(I.call(this,AB)){z.resume.call(z)}};this.removeEvents=function(){K.remove(y,"mouseover",AA);K.remove(y,"mouseout",x)};K.add(y,"mouseover",AA);K.add(y,"mouseout",x)}this._rendered=true;this._ready();return this},removeEvents:function(){},_getDefaultTheme:function(){return{shell:{background:"#8ec1da",color:"#ffffff"},tweets:{background:"#ffffff",color:"#444444",links:"#1985b5"}}},_getWidgetHtml:function(){var z=this;function AB(){if(z._isProfileWidget){return'<a target="_blank" href="http://twitter.com/" class="twtr-profile-img-anchor"><img alt="profile" class="twtr-profile-img" src="'+w+'"></a>                      <h3></h3>                      <h4></h4>'}else{return"<h3>"+z.title+"</h3><h4>"+z.subject+"</h4>"}}function y(){return z._isFullScreen?" twtr-fullscreen":""}var AA=T?"https://twitter-widgets.s3.amazonaws.com/i/widget-logo.png":"http://widgets.twimg.com/i/widget-logo.png";if(this._isFullScreen){AA="https://twitter-widgets.s3.amazonaws.com/i/widget-logo-fullscreen.png"}var x='<div class="twtr-doc'+y()+'" style="width: '+this.wh[0]+';">            <div class="twtr-hd">'+AB()+'             </div>            <div class="twtr-bd">              <div class="twtr-timeline" style="height: '+this.wh[1]+';">                <div class="twtr-tweets">                  <div class="twtr-reference-tweet"></div>                  <!-- tweets show here -->                </div>              </div>            </div>            <div class="twtr-ft">              <div><a target="_blank" href="http://twitter.com"><img alt="" src="'+AA+'"></a>                <span><a target="_blank" class="twtr-join-conv" style="color:'+this.theme.shell.color+'" href="http://twitter.com/'+this._getWidgetPath()+'">'+this.footerText+"</a></span>              </div>            </div>          </div>";return x},_appendTweet:function(x){this._insertNewResultsNumber();f(x,this.byClass("twtr-reference-tweet","div"));return this},_slide:function(y){var z=this;var x=d(y).offsetHeight;if(this.runOnce){new B(y,"height",{from:0,to:x,time:500,callback:function(){z._fade.call(z,y)}}).start()}return this},_fade:function(x){var y=this;if(B.canTransition){x.style.webkitTransition="opacity 0.5s ease-out";x.style.opacity=1;return this}new B(x,"opacity",{from:0,to:1,time:500}).start();return this},_chop:function(){if(this._isScroll){return this}var AC=this.byClass("twtr-tweet","div",true);var AD=this.byClass("twtr-new-results","div",true);if(AC.length){for(var z=AC.length-1;z>=0;z--){var AB=AC[z];var AA=parseInt(AB.offsetTop);if(AA>parseInt(this.wh[1])){g(AB)}else{break}}if(AD.length>0){var x=AD[AD.length-1];var y=parseInt(x.offsetTop);if(y>parseInt(this.wh[1])){g(x)}}}return this},_appendSlideFade:function(y){var x=y||this.tweet.element;this._chop()._appendTweet(x)._slide(x);return this},_createTweet:function(x){x.tweet=TWTR.Widget.ify.autoLink(x);x.timestamp=x.created_at;x.created_at=this._isRelativeTime?P(x.created_at):X(x.created_at);this.tweet=new Q(x);if(this._isLive&&this.runOnce){this.tweet.element.style.opacity=0;this.tweet.element.style.filter="alpha(opacity:0)";this.tweet.element.style.height="0"}return this},_getResults:function(){var x=this;this.timesRequested++;this.jsonRequestRunning=true;this.jsonRequestTimer=window.setTimeout(function(){if(x.jsonRequestRunning){clearTimeout(x.jsonRequestTimer);x.jsonRequestTimer=null}x.jsonRequestRunning=false;g(x.scriptElement);x.newResults=false;x.decay()},this.jsonMaxRequestTimeOut);TWTR.Widget.jsonP(x.url,function(y){x.scriptElement=y})},clear:function(){var y=this.byClass("twtr-tweet","div",true);var x=this.byClass("twtr-new-results","div",true);y=y.concat(x);F(y,function(z){g(z)});return this},_sortByMagic:function(x){var y=this;if(this._tweetFilter){if(this._tweetFilter.negatives){x=x.filter(function(z){if(!y._tweetFilter.negatives.test(z.text)){return z}})}if(this._tweetFilter.positives){x=x.filter(function(z){if(y._tweetFilter.positives.test(z.text)){return z}})}}switch(this._behavior){case"all":this._sortByLatest(x);break;case"preloaded":default:this._sortByDefault(x);break}if(this._isLive&&this._behavior!=="all"){this.intervalJob.set(this.results);this.intervalJob.start()}return this},_sortByLatest:function(x){this.results=x;this.results=this.results.slice(0,this.rpp);this.results.reverse();return this},_sortByDefault:function(y){var z=this;var x=function(AA){return new Date(AA).getTime()};this.results.unshift.apply(this.results,y);F(this.results,function(AA){if(!AA.views){AA.views=0}});this.results.sort(function(AB,AA){if(x(AB.created_at)>x(AA.created_at)){return -1}else{if(x(AB.created_at)<x(AA.created_at)){return 1}else{return 0}}});this.results=this.results.slice(0,this.rpp);this.results=this.results.sort(function(AB,AA){if(AB.views<AA.views){return -1}else{if(AB.views>AA.views){return 1}}return 0});if(!this._isLive){this.results.reverse()}},_prePlay:function(y){if(this.jsonRequestTimer){clearTimeout(this.jsonRequestTimer);this.jsonRequestTimer=null}if(!l.ie){g(this.scriptElement)}if(y.error){this.newResults=false}else{if(y.results&&y.results.length>0){this.response=y;this.newResults=true;this.sinceId=y.max_id_str;this._sortByMagic(y.results);if(this.isRunning()){this._play()}}else{if((this._isProfileWidget||this._isFavsWidget||this._isListWidget)&&N.array(y)&&y.length){this.newResults=true;if(!this._profileImage&&this._isProfileWidget){var x=y[0].user.screen_name;this.setProfileImage(y[0].user.profile_image_url);this.setTitle(y[0].user.name);this.setCaption('<a target="_blank" href="http://twitter.com/intent/user?screen_name='+x+'">'+x+"</a>")}this.sinceId=y[0].id_str;this._sortByMagic(y);if(this.isRunning()){this._play()}}else{this.newResults=false}}}this._setUrl();if(this._isLive){this.decay()}},_play:function(){var x=this;if(this.runOnce){this._hasNewSearchResults=true}if(this._avatars){this._preloadImages(this.results)}if(this._isRelativeTime&&(this._behavior=="all"||this._behavior=="preloaded")){F(this.byClass("twtr-timestamp","a",true),function(y){y.innerHTML=P(y.getAttribute("time"))})}if(!this._isLive||this._behavior=="all"||this._behavior=="preloaded"){F(this.results,function(z){if(z.retweeted_status){z=z.retweeted_status}if(x._isProfileWidget){z.from_user=z.user.screen_name;z.profile_image_url=z.user.profile_image_url}if(x._isFavsWidget||x._isListWidget){z.from_user=z.user.screen_name;z.profile_image_url=z.user.profile_image_url}z.id=z.id_str;x._createTweet({id:z.id,user:z.from_user,tweet:z.text,avatar:z.profile_image_url,created_at:z.created_at,needle:z});var y=x.tweet.element;(x._behavior=="all")?x._appendSlideFade(y):x._appendTweet(y)});if(this._behavior!="preloaded"){return this}}return this},_normalizeTweet:function(y){var x=this;y.views++;if(this._isProfileWidget){y.from_user=x.username;y.profile_image_url=y.user.profile_image_url}if(this._isFavsWidget||this._isListWidget){y.from_user=y.user.screen_name;y.profile_image_url=y.user.profile_image_url}if(this._isFullScreen){y.profile_image_url=y.profile_image_url.replace(/_normal\./,"_bigger.")}y.id=y.id_str;this._createTweet({id:y.id,user:y.from_user,tweet:y.text,avatar:y.profile_image_url,created_at:y.created_at,needle:y})._appendSlideFade()},_insertNewResultsNumber:function(){if(!this._hasNewSearchResults){this._hasNewSearchResults=false;return }if(this.runOnce&&this._isSearchWidget){var AA=this.response.total>this.rpp?this.response.total:this.response.results.length;var x=AA>1?"s":"";var z=(this.response.warning&&this.response.warning.match(/adjusted since_id/))?"more than":"";var y=document.createElement("div");i.add(y,"twtr-new-results");y.innerHTML='<div class="twtr-results-inner"> &nbsp; </div><div class="twtr-results-hr"> &nbsp; </div><span>'+z+" <strong>"+AA+"</strong> new tweet"+x+"</span>";f(y,this.byClass("twtr-reference-tweet","div"));this._hasNewSearchResults=false}},_preloadImages:function(x){if(this._isProfileWidget||this._isFavsWidget||this._isListWidget){F(x,function(z){var y=new Image();y.src=c(z.user.profile_image_url)})}else{F(x,function(y){(new Image()).src=c(y.profile_image_url)})}},_decayDecider:function(){var x=false;if(!this.runOnce){this.runOnce=true;x=true}else{if(this.newResults){x=true}}return x},start:function(){var x=this;if(!this._rendered){setTimeout(function(){x.start.call(x)},50);return this}if(!this._isLive){this._getResults()}else{this.occasionalJob.start()}this._isRunning=true;this._hasOfficiallyStarted=true;return this},stop:function(){this.occasionalJob.stop();if(this.intervalJob){this.intervalJob.stop()}this._isRunning=false;return this},pause:function(){if(this.isRunning()&&this.intervalJob){this.intervalJob.stop();i.add(this.widgetEl,"twtr-paused");this._isRunning=false}if(this._resumeTimer){clearTimeout(this._resumeTimer);this._resumeTimer=null}return this},resume:function(){var x=this;if(!this.isRunning()&&this._hasOfficiallyStarted&&this.intervalJob){this._resumeTimer=window.setTimeout(function(){x.intervalJob.start();x._isRunning=true;i.remove(x.widgetEl,"twtr-paused")},2000)}return this},isRunning:function(){return this._isRunning},destroy:function(){this.stop();this.clear();this.runOnce=false;this._hasOfficiallyStarted=false;this._profileImage=false;this._isLive=true;this._tweetFilter=false;this._isScroll=false;this.newResults=false;this._isRunning=false;this.sinceId=1;this.results=[];this.showedResults=[];this.occasionalJob.destroy();if(this.jsonRequestRunning){clearTimeout(this.jsonRequestTimer)}i.remove(this.widgetEl,"twtr-scroll");this.removeEvents();return this}}}()})();var E=/twitter\.com(\:\d{2,4})?\/intent\/(\w+)/,H={tweet:true,retweet:true,favorite:true},G="scrollbars=yes,resizable=yes,toolbar=no,location=yes",D=screen.height,C=screen.width;function A(O){O=O||window.event;var N=O.target||O.srcElement,J,K,I,M,L;while(N&&N.nodeName.toLowerCase()!=="a"){N=N.parentNode}if(N&&N.nodeName.toLowerCase()==="a"&&N.href){J=N.href.match(E);if(J){K=550;I=(J[2] in H)?420:560;M=Math.round((C/2)-(K/2));L=0;if(D>I){L=Math.round((D/2)-(I/2))}window.open(N.href,"intent",G+",width="+K+",height="+I+",left="+M+",top="+L);O.returnValue=false;O.preventDefault&&O.preventDefault()}}}if(document.addEventListener){document.addEventListener("click",A,false)}else{if(document.attachEvent){document.attachEvent("onclick",A)}}})();
;

