$(document).ready(function(){

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

	$('#banner').nivoSlider({
        effect:"random",
        slices:15,
        boxCols:8,
        boxRows:4,
        animSpeed:500,
        pauseTime:3000,
        startSlide:0,
        directionNav:true,
        directionNavHide:true,
        controlNav:true,
        controlNavThumbs:false,
        controlNavThumbsFromRel:true,
        keyboardNav:true,
        pauseOnHover:true,
        manualAdvance:false
    });
	
	
	

	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');

			} 
		});
	}); 

});
