/* start Tipsy */
$(function() {
	$('p.social a, p.copyright a').tipsy({fade:true, gravity:'s'});
});
/* end Tipsy */	

/* start Tabs */
$(document).ready(function() {

	/* Tabs Activiation
	================================================== */
	var tabs = $('ul.tabs'),
	    tabsContent = $('ul.tabs-content');
	
	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') + "Tab";
			
			//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
				$(contentLocation).show().siblings().hide();
				
			} 
		});
	}); 
	
});
/* end Tabs */

/* start Countdown */
$(document).ready( function(){
	// Handle the countdown timer
	var theYear = parseInt( 2012 ); // year
	var theDay = parseInt( 30 );	// day
	var theMonth = parseInt( 7 );	// month	
	var theEnd = new Date(theYear, theMonth - 1, theDay); 
	$('#defaultCountdown').countdown({until: theEnd, format: 'dHMS', regional: 'en-EN' });
});
/* end Countdown */
