$(document).ready(function(){
	
	$('a.scrollto-about').click(function(){
		$('body').stop().scrollTo('div#aboutMeLabel', 800);
		return false;
	});
	$('a.scrollto-portfolio').click(function(){
		$('body').stop().scrollTo('div#portfolioLabel', 800);
		return false;
	});
	$('a.scrollto-contact').click(function(){
		$('body').stop().scrollTo('div#contactLabel', 800);
		return false;
	});
	
});

$(function() {
	// OPACITY OF BUTTON SET TO 50%
	$(".latest_img").css("opacity","1.0");
	 
	// ON MOUSE OVER
	$(".latest_img").hover(function () {
	 
	// SET OPACITY TO 100%
	$(this).stop().animate({
	opacity: 0.5
	}, "slow");
	},
	 
	// ON MOUSE OUT
	function () {
	 
	// SET OPACITY BACK TO 50%
	$(this).stop().animate({
	opacity: 1.0
	}, "slow");
	});
	});


/* plugin */
jQuery.fn.dwFadingLinks = function(settings) {
	settings = jQuery.extend({
		color: '#ffffff',
		duration: 500
	}, settings);
	return this.each(function() {
		var original = $(this).css('color');
		$(this).mouseover(function() { $(this).animate({ color: settings.color },settings.duration); });
		$(this).mouseout(function() { $(this).animate({ color: original },settings.duration); });
	});
};

/* usage */
$(document).ready(function() {
	$('.fade').dwFadingLinks({
		color: '#41c2f1',
		duration: 700
	});
});
