$j().ready(function() {
	
	Cufon.replace('h1, h2, h3, h4, h5, h6, .comment-index, .comment-author, .comment-meta, .breadcrumb, .entry-title', {hover:true}); 

$j('.works .portfolio-entry, .works .post-entry').each(function(settings) {
	settings = {'durationIn': 180, 'durationOut': 350, 'easingIn': 'easeOutQuad', 'easingOut': 'easeInCirc'};
	$j(this).hover(function() {
		h = $j('.entry-title', this).outerHeight();
			$j('.entry-title', this).stop().css({top: '-' + h + 'px', visibility: 'visible'}).animate({top:'0'}, settings.durationIn, settings.easingIn);
			$j('.more-link', this).animate({bottom:'-10px'}, settings.durationIn, settings.easingIn);
			if(!($j.browser.msie && $j.browser.version < 9)) // exclude ie8- because of their poor support for png
				$j('.extra', this).delay(100).fadeIn('slow');
	}, function() {
		h = $j('.entry-title', this).outerHeight();
		$j('.entry-title', this).stop().animate({top: '-' + h + 'px'}, settings.durationOut, settings.easingOut);
		$j('.more-link', this).animate({bottom:'-40px'}, settings.durationOut, settings.easingOut);
		if(!($j.browser.msie && $j.browser.version < 9)) // exclude ie8- because of their poor support for png
			$j('.extra', this).fadeOut();
	});
}); 

    // belt animation (max one belt per page)
    belt = $j('.works ul');
    belt_slots = $j('li', belt).length;
    left_slots = belt_slots - 4;
    $j('.works .more').click(function() {
        duration = 'slow';
        easing = 'easeOutQuad';
        if(left_slots > 0) {
            belt.animate({marginLeft: '-=960px'}, duration, easing);
            left_slots -= 4;
        }
        else if(belt_slots > 4){
            belt.animate({marginLeft: '0px'}, duration, easing);
            left_slots = belt_slots - 4;
        }
    }
    );
	
$j("a[rel^='prettyPhoto']").prettyPhoto({
	//slideshow: 3000,
	//autoplay_slideshow: true
	default_width: 940,
	default_height: 800,
	theme: 'light_square'
});
});
