// What is $(document).ready ? See: http://flowplayer.org/tools/documentation/basics.html#document_ready
$(function() {

$(".slidetabs").tabs(".images > div", {

	// enable "cross-fading" effect
	effect: 'default',
	fadeOutSpeed: "slow",

	// start from the beginning after the last tab
	rotate: true

// use the slideshow plugin. It accepts its own configuration
})

$(".thumbnails img").click(function() {
// see if same thumb is being clicked
	if ($(this).hasClass("active")) { return; }
	
		
	// activate item
	$(".thumbnails img").removeClass("active");
	$(this).addClass("active");

// when page loads simulate a "click" on the first image
}).filter(":first").click();


});
