$(document).ready(function(){

	$("#slideshow").cycle({
		timeout: 3000,
		speed: 1200,
		autostop: 1
	});
	
/*
	$('#gallery-holder').serialScroll({
		items:'li',
		prev:'#goleft',
		next:'#goright',
		duration:800,
		jump: true //click on the images to scroll to them
	});
*/
	
	var original = $("a").css("color"); 
	var highlightColor = "#278a92";
  	$("a").hover(
	function () {
		$(this).stop().animate( { borderColor: highlightColor, color: highlightColor}, 300 );
	},
	function () {
		$(this).stop().animate( { borderColor: original, color: original}, 300 );
	});

	function filterPath(string) {
		return string
		.replace(/^\//,'')
		.replace(/(index|default).[a-zA-Z]{3,4}$/,'')
		.replace(/\/$/,'');
	} 
	$("#nav a").filter(function() {
		return filterPath(this.pathname) == filterPath(location.pathname);
	}).addClass('current');
	
	$("a.noclick").click(function(){
		return false;
	});

});