// Gallery script 

/*$(function(){
		   
	// Hide all images after first image	   
    $('#slides .panel:gt(0)').hide();
	$('.panel:first').addClass('first');
	$('.panel:last').addClass('last');
	
	$(".next").click(function () {

		$(".panel:not(:hidden):first")
		.fadeOut("slow")
		.next(".panel")
		.fadeIn();
		
	});
	
	$(".previous").click(function () {
		$(".panel:not(:hidden):first")
		.fadeOut("slow")
		.prev(".panel")
		.fadeIn();
	});	
	
});*/

$(document).ready(function() {
	
	// Hide page elements on load
	$(".active").show();
	$(".notactive").hide();

	
 
    $(".goleft").click( function(e) {
        var $active = $(".active");
        var $next = $active.prev().length ? $active.prev() : $(".focusitem:last");
 
 		$(".active,.header-title").fadeTo("normal", 0);
		$active.removeClass('active');
        $active.addClass('notactive');
        $next.addClass('active');
		$(".active,.header-title").fadeTo("normal", 1);
        $next.removeClass('notactive');
		
		return false;

    });
 
    $(".goright").click( function(e) {
        var $active = $(".active");
        var $next = $active.next().length ? $active.next() : $(".focusitem:first");
 	
		$(".active,.header-title").fadeTo("normal", 0);
        $active.removeClass('active');
        $active.addClass('notactive');
        $next.addClass('active');
		$(".active,.header-title").fadeTo("normal", 1);
        $next.removeClass('notactive');
		
		return false;

    });
 
});
