$(document).ready(function() {	

	$('a[rel="external"]').click(function(){
	    this.target = '_blank';
	});
	
	$('#blog').css('cursor', 'pointer');
	
	$('#navigation li a').bind('click', function() {
		if($(this).attr('href') == '#') {
			return false;
		}
	});

	$('#workcontainer > ul > li').hover(function(){
		$(".cover", this).stop().animate({left:'-246px'},{queue:false,duration:300});
		$(this).css('border','2px solid #fed26a');
	}, function() {
		$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});
		$(this).css('border','2px solid #fff');
	});
	
	$('#allwork').css('width', Math.round($('#allwork > li').length * 296 /2) + 'px').css('height', 462 + 'px');
	
	pagination('allwork', 'work', 'work-pages', 296, 3, 500, 0.2);				
	
	$('#work > .previous').click(function() {
		goPrev('allwork', 'work', 'work-pages', 296, 3, 500, 0.2);		
	}); 			
	
	$('#work > .next').click(function() {
		goNext('allwork', 'work', 'work-pages', 296, 3, 500, 0.2);
	});			
	
	$("#work-pages > .page").eq(0).addClass('current');		
	
});	
