/*
* Skeleton V1.1
* Copyright 2011, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 8/17/2011
*/


$(document).ready(function() {
	
	Shadowbox.init({
	    skipSetup: true
	});

	window.onload = function() {
	    Shadowbox.setup(".thumbnails a", {
	        autoplayMovies:     true
	    });
	};	
	
	$("#btnShow").click(function () {
		$("#dropdown").slideDown();
	});
	
	
	$(".item").click(function () {
		$(".content", this).toggleClass("more");
	});
	
	$("#twitter").tweet({
		count: 3,
		avatar_size: 48,
		username: "agendashow",
		loading_text: "searching twitter..."
	});
	
	$(function(){
		$('#slides').slides({
			preload: true,
			generatePagination: true,
			play: 5000,
			pause: 2500,
			slideSpeed: 600,
			hoverPause: true
		});
	});

	/* Tabs Activiation
	================================================== */

	var tabs = $('ul.tabs');

	tabs.each(function(i) {

		//Get all tabs
		var tab = $(this).find('> li > a');
		tab.click(function(e) {

			//Get Location of tab's content
			var contentLocation = $(this).attr('href');

			//Let go if not a hashed one
			if(contentLocation.charAt(0)=="#") {

				e.preventDefault();

				//Make Tab Active
				tab.removeClass('active');
				$(this).addClass('active');

				//Show Tab Content & add active class
				$(contentLocation).show().addClass('active').siblings().hide().removeClass('active');

			}
		});
	});
});
