$(document).ready(function(){
    // Add class="selected" to first portfolio link
    $('#Client-List a:first').addClass('selected');
    // Let's add "display:none;" to make this baby a little more accessible.
    $('#ajaxContent').css({
      'display' : 'none'
    });
    // Sort of hackish until I get the hang of this. This fades in the portfolio area during the page load.
    $('#ajaxContent').fadeIn('fast').load('work/flingmo.html');
    // Call the ajaxContent code for the portfolio area.
	$('.ajax').ajaxContent({
	    loaderType:'img',
        loadingMsg:'assets/img/ui/ajax-loader.gif'
	});
});
// Animated scroll-to links
$(document).ready(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;
            }
        }
    });
});
