$(function() {
	
	// initialize scrollable
	$(".scrollable").scrollable();

});

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

$("#download_now0").tooltip({ effect: 'slide'});
$("#download_now1").tooltip({ effect: 'slide'});
$("#download_now2").tooltip({ effect: 'slide'});
$("#download_now3").tooltip({ effect: 'slide'});
$("#download_now4").tooltip({ effect: 'slide'});
$("#download_now5").tooltip({ effect: 'slide'});
$("#download_now6").tooltip({ effect: 'slide'});
$("#download_now7").tooltip({ effect: 'slide'});
$("#download_now8").tooltip({ effect: 'slide'});
});


$(function() {

	// if the function argument is given to overlay,
	// it is assumed to be the onBeforeLoad event listener
	$("a[rel]").overlay({

		mask: 'black',
		effect: 'apple',

		onBeforeLoad: function() {

			// grab wrapper element inside content
			var wrap = this.getOverlay().find(".contentWrap");

			// load the page specified in the trigger
			wrap.css({position:'fixed', right: '10px', top: '10px'});
			wrap.load(this.getTrigger().attr("href"));
		}

	});
});


$(function() {

	// expose the form when it's clicked or cursor is focused
	var form = $(".expose").bind("click keydown", function() {

		$(this).expose({

			// when exposing is done, change form's background color
			onLoad: function() {
				form.css({backgroundColor: 'none'});
			},

			// when "unexposed", return to original background color
			onClose: function() {
				form.css({backgroundColor: null});
			}

		});
	});
});

$(function() {

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

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

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

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


$(function() { 
	$("#accordion").tabs("#accordion div.pane", {tabs: 'h2', effect: 'slide', initialIndex: null});
});


