// make parent clickable
$(document).ready(function(){
	$('.click').click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});

});

// Get year
$(document).ready(function(){
	$("#year").text( (new Date).getFullYear() );
});

//	Anchor Slider by Cedric Dugas Http://www.position-absolute.com
$(document).ready(function() {
	$("a#totop").anchorAnimate()
});

jQuery.fn.anchorAnimate = function(settings) {

 	settings = jQuery.extend({
		speed : 1100
	}, settings);	
	
	return this.each(function(){
		var caller = this
		$(caller).click(function (event) {	
			event.preventDefault()
			var locationHref = window.location.href
			var elementClick = $(caller).attr("href")
			
			var destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
				window.location.hash = elementClick
			});
		  	return false;
		})
	})
}

// Portfolio Slider
$(document).ready(function () {
        	$('#main article ul#port-design li').each(function () {
                $(this).find('dl').animate({ opacity: 'hide', bottom: '-40px' });
                //$(this).find('a.hidden').animate({ opacity: 'hide', right: '253px' });
            });
        
            $('#main article ul#port-design li').hover(function () {
                $(this).find('dl').animate({ opacity: 'show', bottom: '0px' }, 'slow');
               // $(this).find('a.preview').animate({ opacity: 'hide', left: '253px' }, 'fast');
               // $(this).find('a.hidden').animate({ opacity: 'show', right: '10px' }, 'fast');
            }, 
                function () {
                    $(this).find('dl').animate({ opacity: 'hide', bottom: '-40px' }, 'slow');
                   // $(this).find('a.preview').animate({ opacity: 'show', left: '5px' }, 'slow');
                	// $(this).find('a.hidden').animate({ opacity: 'hide', right: '253px' }, 'slow');
            });

        });
        
        
        
        
        
        
        
        
        
        
        
        
