$(function(){
    $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                return false;
            }
        }
    });
    
    $('.leftnavlink').each(function(i) {
		$(this).hover(function() {
			$(this).stop().animate({paddingLeft: "15px"}, 150);
		},
		function() {
			$(this).animate({paddingLeft: "5px"}, 150)
		});
    });
    
    $(".clrbox").colorbox();
});

function scrollToEl(el) {
	$('html,body').animate({scrollTop: $(el).offset().top}, { queue:false, duration: 1000 }, 'easeInOutSine');
}