(function($) {	$.fn.teaser = function(options) {				options = jQuery.extend({time:500,delay:5000}, options);				return this.each(function(){			var item = $(this);			var images = item.children('ul.projectImages');			var infos = item.children('ul.projectInfo');			var current;			var nItems = images.children().length;			infos.children().css('left','1002px');			images.children().css('left','1002px');						init();						function init () {				current = 0;				showNext();			};						var currentImage;			var currentInfo;			function showNext() {				if (currentImage) {					currentImage.animate({left: '-1002px'},{						duration: options.time,						complete: function() {startTimer();},						easing: 'easeInOutQuad'});					currentInfo.animate({left: '-1002px'},options.time,function(){});				}								nextImage = images.children('li:eq('+current+')');				nextInfo = infos.children('li:eq('+current+')');				nextImage.css('left','1002px').animate({left: '0px'},{					  duration: options.time,					  complete: function() {						  // open project on click						  item.unbind("click");						  item.click(function(){							  window.location = nextInfo.find('div.more a').attr('href');						  });						  nextInfo.css('left','-1002px').animate({left: '0px'},options.time,function(){});						  currentImage = nextImage;						  currentInfo = nextInfo;						  startTimer();					  	},					  easing: 'easeInOutQuad'});			}						var interval;			function startTimer() {				if (interval) stopTimer();				interval = window.setInterval(autoShowNext,options.delay);			}			function stopTimer() {				window.clearInterval(interval);				interval = null;			}			function autoShowNext() {				stopTimer();				current ++;				if (current >= nItems) {					current = 0;				}				showNext();			}					});	};})(jQuery);
