$(document).ready(function(){

	$("a[rel^='prettyPhoto']").prettyPhoto({ social_tools: '&nbsp;', keyboard_shortcuts: false });

	$('#banner').innerfade({
		speed: 'slow',
		timeout: 4000,
		type: 'random',
		containerheight: '317px'
	});

	var tabs = $('ul.tabs');
	
	tabs.each(function(i) {
		var tab = $(this).find('> li > a');
		tab.click(function(e) {

			var contentLocation = $(this).attr('href') + "Tab";

			if(contentLocation.charAt(0)=="#") {

				e.preventDefault();

				tab.removeClass('active');
				$(this).addClass('active');

				$(contentLocation).show().addClass('active').siblings().hide().removeClass('active');

			} 
		});
	}); 

});
