$(document).ready(function() {
 
    //move the image in pixel
    var move = 0;
     
    //zoom percentage, 1.2 =120%
    var zoom = 1;
 
    //On mouse over those thumbnail
    $('.portfolio-list-item').hover(function() {
         
        //Set the width and height according to the zoom percentage
        //width = $('.portfolio-list-item').width() * zoom;
       // height = $('.portfolio-list-item').height() * zoom;
         
        //Move and zoom the image
        //$(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});
         
        //Display the caption
        $(this).find('div.caption').stop(false,true).fadeOut(200);
    },
    function() {
        //Reset the image
        //$(this).find('img').stop(false,true).animate({'width':$('.item').width(), 'height':$('.item').height(), 'top':'0', 'left':'0'}, {duration:100});    
 
        //Hide the caption
        $(this).find('div.caption').stop(false,true).fadeIn(200);
    });
    
    $('a[href*=#]').click(function() {
    
    	// duration in ms
    	var duration=2000;
    	
    	// easing values: swing | linear
    	var easing='swing';
    	
    	// get / set parameters
    	var newHash=this.hash;
    	var target=$(this.hash+', a[name='+this.hash.slice(1)+']').offset().top;
    	var oldLocation=window.location.href.replace(window.location.hash, '');
    	var newLocation=this;
    	
    	// make sure it's the same location      
    	if(oldLocation+newHash==newLocation)
    	{
    		// set selector
    		if($.browser.safari) var animationSelector='body:not(:animated)';
    		else var animationSelector='html:not(:animated)';
    		
    		// animate to target and set the hash to the window.location after the animation
    		$(animationSelector).animate({ scrollTop: target }, duration, easing, function() {
    		
    		// add new hash to the browser location
    		window.location.href=newLocation;
    	});
    	
    	// cancel default click action
    	return false;
    	}
    });
    
    
 
});



