/*
 *	REQUIRES JQUERY 1.4+
 */

var ielt9 = $.browser.msie && $.browser.version.substr(0,1)<9;

jQuery.fn.onImagesLoaded = function(_cb) { 
  return this.each(function() {
 
    var $imgs = (this.tagName.toLowerCase()==='img')?$(this):$('img',this),
        _cont = this,
            i = 0,
    _done=function() {
      if( typeof _cb === 'function' ) _cb(_cont);
    };
 
    if( $imgs.length ) {
      $imgs.each(function() {
        var _img = this,
        _checki=function(e) {
          if((_img.complete) || (_img.readyState=='complete'&&e.type=='readystatechange') )
          {
            if( ++i===$imgs.length ) _done();
          }
          else if( _img.readyState === undefined ) // dont for IE
          {
            $(_img).attr('src',$(_img).attr('src')); // re-fire load event
          }
        }; // _checki \\
 
        $(_img).bind('load readystatechange', function(e){_checki(e);});
        _checki({type:'readystatechange'}); // bind to 'load' event...
      });
    } else _done();
  });
};

/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Ã‚Â© 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */
$(document).ready(function() {
  setTimeout(makeShiny, 1000);
  var logotime = setInterval( makeShiny, 6500);
  /*
  $('#logo').mouseenter(function(e) {
    $(this).stop().animate({ backgroundPosition: '50% 0%' }, { queue : false, duration : 2000, easing : 'easeOutCirc' });
  });
  $('#logo').mouseleave(function(e) {
    $(this).stop().animate({ backgroundPosition: '50% 100%' }, { queue : false, duration : 1 });
  });*/
});

function makeShiny(){
  $('#logo').animate({ backgroundPosition: '50% 0%' }, { queue : false, duration : 3000, easing : 'easeOutCirc', complete: function(){
    $('#logo').animate({ backgroundPosition: '50% 100%' }, { queue : false, duration : 1 });
  }});
}
$(document).ready(function() {
  $('li.parent').click(function() {
    $(this).toggleClass('open');
    $(this).children('ul').toggleClass('open');
  });
  $('li.parent a').click(function(e) {e.stopPropagation();});
  $('#bidnav a.active').each(function(i) {
    var $this = $(this);
    if($this.hasClass('parent'))
      $this.addClass('open').children('ul').toggleClass('open');
    else
      $this.parents('.parent').addClass('open').children('ul').toggleClass('open');
  });
});

var Header = (function() {
	var index = 0,
		basedir = '',
		images = [

			{ image : 'http://72.10.49.180/docs/Birdies_Brushes_Web_Banner2.jpg', caption : '<p><span style="font-size: medium;"><strong>PROCEEDS </strong></span></p><p><span style="font-size: medium;"><strong>BENEFITING </strong></span></p><p><span style="font-size: medium;"><strong>THE RENO-TAHOE </strong></span></p><p><span style="font-size: medium;"><strong>OPEN FOUNDATION</strong></span></p><p><span style="font-size: medium;"><strong>&amp; THE TERRY LEE WELLS</strong></span></p><p><span style="font-size: medium;"><strong>NEVADA DISCOVERY MUSEUM<br /></strong></span></p><p>&nbsp;</p><p>&nbsp;</p><p><span style="font-size: medium;">PURCHASE YOUR TABLE</span></p><p><span style="font-size: medium;">TODAY!<br /></span></p><p>&nbsp;</p><p><span style="font-size: medium;"><strong><br /></strong></span></p>', link : '', linkText : '', credits : '' },

			{ image : 'http://72.10.49.180/docs/Renegades_Image_for_Web2.jpg', caption : '<p>&nbsp;</p><p><strong><span style="font-size: medium;">BECOME A<br /></span></strong></p><p><strong><span style="font-size: medium;">RENEGADE <br /></span></strong></p><p><strong><span style="font-size: medium;">TODAY.</span></strong></p><p><strong><span style="font-size: medium;">SUPPORT YOUR</span></strong></p><p><strong><span style="font-size: medium;">COMMUNITY.</span></strong></p><p><strong><span style="font-size: medium;"><br /></span></strong></p><p><span style="font-size: medium;">JULY 30 - AUG 5, 2012</span><strong><span style="font-size: medium;"><br /></span></strong></p>', link : '', linkText : '', credits : '' },

			{ image : 'http://72.10.49.180/docs/Chip_in_For_Schools_banner3.jpg', caption : '<p>&nbsp;</p><p><strong><span style="font-size: medium;">HELP AREA</span></strong></p><p><strong><span style="font-size: medium;">STUDENTS BY</span></strong></p><p><strong><span style="font-size: medium;">PURCHASING YOUR</span></strong></p><p><strong><span style="font-size: medium;">2012 RTO TICKET </span></strong></p><p><strong><span style="font-size: medium;">FROM THEM, THEY</span></strong></p><p><strong><span style="font-size: medium;">KEEP 100%!</span></strong></p><p><strong><span style="font-size: medium;"><br /></span></strong></p><p><strong><span style="font-size: medium;">CALL 775.853.6809<br /></span></strong></p><p><strong><span style="font-size: medium;"><span style="font-size: large;">&nbsp;</span><br /></span></strong></p><p><strong><span style="font-size: medium;"><br /></span></strong></p>', link : '', linkText : '', credits : '' },

			{ image : 'http://72.10.49.180/images/home_header_4.jpg', caption : '<p><strong><span style="font-size: medium;">NOW USING</span></strong></p><p><strong><span style="font-size: medium;">A MODIFIED </span></strong></p><p><strong><span style="font-size: medium;">STABLEFORD</span></strong></p><p><strong><span style="font-size: medium;">FORMAT. </span></strong></p><p><strong><span style="font-size: medium;">THE ONLY EVENT</span></strong></p><p><strong><span style="font-size: medium;">ON THE PGA TOUR.</span></strong></p><p><strong><span style="font-size: medium;"><br /></span></strong></p><p><strong>&nbsp;</strong><span style="font-size: medium;">JULY 30 - AUG 05, 2012<br /></span></p>', link : '', linkText : '', credits : '' },

		],
		settings = {
			dimensions : {
				imageWidth : 950,
				imageHeight : 360
			},
			speedclick : true,
			easing : 'easeOutQuad',
			duration : 900,
			autoplay : {
				enabled : true,
				idleStart : 8000,
				duration : 8000,
				idleReset : 30000
			},
			buttons : {
				easing : 'easeInOutExpo',
				duration : 100
			},
			caption : {
				easing : 'easeOutQuad',
				fadeInDuration : 1000,
				delay : 200,
				fadeOutDuration : 300
			},
			credits : {
				easing : 'easeOutQuad',
				fadeInDuration : 1000,
				delay : 200,
				fadeOutDuration : 300
			}
		},
		thisTime = 50000, lastTime = 0,
		autoplayInterval, idleTimeout;
	var $home_slider, $home_callout, $home_credits, $home_pagination_a;
	
	domready();
	init();
	
	function domready() {
		$(document).ready(function() {
			$('#home_previous')
				.mouseenter(function(e) { hover.apply(this, [true, 'left']); })
				.mouseleave(function(e) { hover.apply(this, [false, 'left']); })
				.click(function(e) {settings.autoplay.enabled = false; previous(e);});
			$('#home_next')
				.mouseenter(function(e) { hover.apply(this, [true, 'right']); })
				.mouseleave(function(e) { hover.apply(this, [false, 'right']); })
				.click(function(e) {settings.autoplay.enabled = false; next(e);});
			$home_pagination_a = $('#home_pagination').children('a');
			$home_pagination_a.click(function(e) {settings.autoplay.enabled = false; resetAutoplay(); goto($home_pagination_a.index($(this))); });
			$home_slider = $('#home_slider');
			$home_callout = $('#home_callout');
			$home_credits = $('#header_credits');
			
			startAutoplay();
		});
	}
	function init() {
		for(var i=0; i<images.length; i++)
			(new Image()).src = images[i].image;
	}
	
	function hover(on, side) {
		/*
		 *	This functionality was custom to USBid
		 */
		 /*
		var values = ((on)
			? [-20, 18, 12 , 6]
			: [-16, 20, 8, 4]),
			obj = {};
			obj[side] = values[0];
		$(this).stop()
	       .animate(obj, { queue : false, easing : settings.buttons.easing, duration : settings.buttons.duration })
		   .children('img').stop().animate({ marginTop: values[1], marginBottom: values[1], height: values[2], width: values[3] }, { queue : false, easing : settings.buttons.easing, duration : settings.buttons.duration });
		*/
	}
	
	function autoplay() {
		if(!settings.autoplay.enabled) return;
		if(autoplayInterval == null)
			autoplayInterval = setInterval(autoplay, settings.autoplay.duration);
		clearTimeout(idleTimeout);
		next();
	}
	function startAutoplay() {
		if(settings.autoplay.enabled) {
			clearInterval(autoplayInterval);
			clearTimeout(idleTimeout);
			idleTimeout = setTimeout(autoplay, settings.autoplay.idleStart);
		}
	}
	function pauseAutoplay() {
		clearInterval(autoplayInterval);
		clearTimeout(idleTimeout);
	}
	function resetAutoplay() {
		if(settings.autoplay.enabled) {
			clearInterval(autoplayInterval);
			clearTimeout(idleTimeout);
			idleTimeout = setTimeout(autoplay, settings.autoplay.idleReset);
		}
	}
	function previous(e) {
		if(e != null) resetAutoplay();
		goto((index == 0 ? images.length - 1 : index - 1), 'left');
	}
	function next(e) {
		if(e != null) resetAutoplay();
		goto((index == images.length - 1 ? 0 : index + 1), 'right');
	}
	function goto(i, direction) {
		if(index == i) return;
		
		if(settings.speedclick) {
			lastTime = thisTime;
			thisTime = new Date().getTime();
		}
		
		if(direction == null)
			direction = (i > index) ? 'right' : 'left';
		
		index = i;
		updatePagination();
		
		$home_slider.add($home_callout).stop(1, 1);
		
		switch(direction) {
			case 'left':
				$home_slider.prepend('<img src='+basedir+images[i].image+' width="'+settings.dimensions.imageWidth+'" height="'+settings.dimensions.imageHeight+'" />');
				$home_slider.children('img:first').onImagesLoaded(function() {
					$home_slider.css('left', -settings.dimensions.imageWidth).animate({ left : 0 }, { queue : false, easing : settings.easing, duration : Math.min(settings.duration, thisTime - lastTime), complete : function() {$(this).children('img:gt(0)').remove();}});
				});
				break;
			case 'right':
				$home_slider.append('<img src='+basedir+images[i].image+' width="'+settings.dimensions.imageWidth+'" height="'+settings.dimensions.imageHeight+'" />');
				$home_slider.children('img:last').onImagesLoaded(function() {
					$home_slider.animate({ left : -settings.dimensions.imageWidth }, { queue : false, easing : settings.easing, duration : Math.min(settings.duration, thisTime - lastTime), complete : function() {
						$(this).css('left', 0).children('img:eq(0)').remove();
					}});
				});
				break;
		}
		updateCaption();
		updateCredits();
	}
	function updatePagination() {
		$home_pagination_a.each(function(i) {
			if(i == index) $(this).addClass('active');
			else $(this).removeClass('active')
		});
	}
	function updateCaption() {
		if(ielt9) {
			$home_callout.css('display', 'none').empty().html(images[index].caption).append('<a href="'+images[index].link+'" id="seemore" class="button">'+images[index].linkText+'</a>');
			$home_callout.delay(Math.min(settings.caption.fadeOutDuration + settings.caption.delay, thisTime - lastTime)).queue(function(next) {
				$home_callout.css('display', 'block');
				next();
			});
		} else {
			$home_callout.animate({ opacity : 0 }, { queue : false, easing : settings.caption.easing, duration : Math.min(settings.caption.fadeOutDuration, (thisTime - lastTime) / 2), complete : function() {
				$home_callout.empty().html(images[index].caption).append('<a href="'+images[index].link+'" id="seemore" class="button">'+images[index].linkText+'</a>');
				$home_callout.delay(Math.min(settings.caption.delay, thisTime - lastTime)).animate({ opacity : 1 }, { easing : settings.caption.easing, duration : Math.min(settings.caption.fadeInDuration, (thisTime - lastTime) / 2) });
			}});
		}
	}
	function updateCredits() {
		if(ielt9) {
			$home_credits.css('display', 'none').empty().html(images[index].credits);
			$home_credits.delay(Math.min(settings.credits.fadeOutDuration + settings.credits.delay, thisTime - lastTime)).queue(function(next) {
				$home_credits.css('display', 'block');
				next();
			});
		} else {
			$home_credits.animate({ opacity : 0 }, { queue : false, easing : settings.credits.easing, duration : Math.min(settings.credits.fadeOutDuration, (thisTime - lastTime) / 2), complete : function() {
				$home_credits.empty().html(images[index].credits);
				$home_credits.delay(Math.min(settings.credits.delay, thisTime - lastTime)).animate({ opacity : 1 }, { easing : settings.credits.easing, duration : Math.min(settings.credits.fadeInDuration, (thisTime - lastTime) / 2) });
			}});
		}
	}
	
	return {
		'domready' : domready,
		'pauseAutoplay' : pauseAutoplay,
		'previous' : previous,
		'next' : next,
		'goto' : goto
	};
})();
