
$().ready(function() {
	
	var msie = $.browser.msie;

	var options = {
		autoStart: true,		 // Whether to start the show automatically
		showTime: 3500,		 	 // Number of milliseconds to show a slide (if autoStart is false)
		transitionTime: 800,	 // Number of milliseconds of transition duration
		autoHeight: false,		 // Whether to automatically adjust the height to fit the current slide
		animateAutoHeight: true, // Whether to animate the automatic height adjustment
		slideType: 'fade',
		fadeInOut: true,		 // Keep this as true
		doHoverPause: false,	 // Whether to pause the show when user hovers over a slide
		slideChange: function(index) {
			// index = parseInt(index, 10) + 1;
		}
	};
	
    var $slides = $('ul.about-header-slides li.slide'),
		$slideshow = $slides.simpleCrossFade(options);
		
	if (!options.autoStart) $slideshow.simpleCrossFade('stop');
	
	// if ($.browser.msie && $.browser.version < 7) $('img.png').fixPNG();
	
	var $eventsList = $('ul#events');

	if ($eventsList.length > 0) {
		$eventsList.jcarousel({
			scroll: 1,
			wrap: 'circular',
			buttonPrevHTML: null,
			buttonNextEvent: 'mousedown',
			itemVisibleInCallback: function(c) {
				if (!msie && c.buttonNext.is(':active')) {
					setTimeout(function() {
						if (c.buttonNext.is(':active')) c.buttonNext.trigger('mousedown');
					}, 200);
				}
			}
		});
	}
	
});



