function navigation() {
	$("a.home").click(function(){
		$.scrollTo("#home", 800);
		return false;
	});
	
	$("a.about").click(function(){
		$.scrollTo("#about", 800);
		return false;
	});

	$("a.portfolio").click(function(){
		$.scrollTo("#portfolio", 800);
		return false;
	});
	
	$("a.services").click(function(){
		$.scrollTo("#services", 800);
		return false;
	});

	$("a.contact").click(function(){
		$.scrollTo("#contact", 800);
		/* Blip the contact form */
		$("#wpcf7-f1-p10-o1").fadeOut('fast');
		$("#wpcf7-f1-p10-o1").fadeIn('fast');
		$("#wpcf7-f1-p10-o1").fadeOut('fast');
		$("#wpcf7-f1-p10-o1").fadeIn('fast');
		$("#wpcf7-f1-p10-o1").fadeOut('fast');
		$("#wpcf7-f1-p10-o1").fadeIn('fast');
		return false;
	});
}

// Team member switcher
function meet_the_team(){
	$("#members > div").hide();
	$("#members div:first-child").show();
	$("ul#member-nav li:nth-child(2) a").fadeTo(100, 0.6);



	function toggle_members(memeber){
		$("." + memeber).click(function(){
			$("ul#member-nav li a").fadeTo(200, 1);
			$("." + memeber).fadeTo(300, 0.6);
			$(".member-info").fadeOut('fast', function(){
			});
			
			$("#" + memeber).fadeIn('slow');
			return false;
		});
	}

	toggle_members("amila");
	toggle_members("heshan");
	toggle_members("aslam");
	toggle_members("malinga");
	toggle_members("hamza");
		
} // meet_the_team

$(document).ready(function() { 
	
		//Navigation scrolling
		navigation();

		// Team switcher
		meet_the_team();


		// Slideshow
		$('#slideshow').cycle('fade');
		//$('#slideshow').coinslider({width: 339, height: 212, navigation: false});
		

		// Tooltip
    $("#address").tooltip({ effect: 'slide'});

		//Portfolio overlay
		$("#portfolio #portfolio-container #portfolio-content #thumbs img").hover(function(){
			$(this).stop().fadeTo(500, 1);
		}, function(){
			$(this).stop().fadeTo(500, 0.6);
		});
		
		
		$("img[rel]").overlay({ 

		    // some expose tweaks suitable for modal dialogs 
		    expose: { 
		        color: '#666', 
		        loadSpeed: 200, 
		        opacity: 0.7 
		    }
		});



	// Author social infor for blog
	$('#author-description a:first-child').addClass('twitter')
	$('#author-description a:nth-child(2n)').addClass('github')
	$('#author-description a:last-child').addClass('blog')


});
