$(document).ready(function(){
	$("a.fancy").fancybox();
})


$(function(){
    $('#photos ul li:first').show(); // display first photo
    changePhoto = function() {
        index = 0;
        return function() {
            active = $("#photos ul li:eq("+index+")");
            index++;
            el = $("#photos ul li:eq("+index+")");
            if(!el.length) {
                index = 0;
            }
            $(active).fadeOut("slow",function() {
                $("#photos ul li:eq("+index+")").fadeIn("slow");
            });
        }
    }
    intId = setInterval(changePhoto() , 4000); // set interval for changing photo to 6 sec
});

$(function(){
		$('.SlideTab').tabSwitch('create',{width: 235, height: 200});
		$('.tabSelect').click(function(e){
			$('.SlideTab').tabSwitch('moveTo',{index: parseInt($(this).attr("rel"))});
			e.preventDefault();
			$('.tabSelect').removeClass("tab");
			$(this).addClass("tab");
			
		});
		$('.Nav').click(function(e){
			$('.SlideTab').tabSwitch('moveStep',{step: parseInt($(this).attr("rel"))});
			e.preventDefault();
		});
});

$(function() {
		$( "#example_2" ).accessNews({
	        headline : "Business as Usual",
	        speed : "slow",
			slideBy : 3
	    });
		
	});
