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

	var options = {
		autoStart: true,		 // Whether to start the show automatically
		showTime: 8000,		 	 // 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;
			$('#slide-control .current-slide-index').html(index);
		}
	};
	
    var $slides = $('#cat-slides li.slide'),
		$slideshow = $slides.simpleCrossFade(options),
		$slideControl = $('#slide-control');
		
	$slideControl.find('.total-slide-count').html($slides.length);
	
	$slideControl.find('.prev').click(function() {
		$slideshow.simpleCrossFade('previous');
		return false;
	});
	
	$slideControl.find('.next').click(function() {
		$slideshow.simpleCrossFade('next');
		return false;
	});
		
	if (!options.autoStart) $slideshow.simpleCrossFade('stop');
	
	// if ($.browser.msie && $.browser.version < 7) $('img.png').fixPNG();
	
});



