 $(function(){
    
	/*Twitter*/
	$("#twitter").getTwitter({
		userName: "afsweb",
		numTweets: 2,
		slideIn: false,
		showHeading: false,
		showProfileLink: false,
		showTimestamp: true
	});
	
	
	
	/*Animation*/
	$('#portfolio li img').each(function() {
        $(this).hover(function() {
			$(this).stop().animate({top:'-8px' }, 400);
        },
        function() {
			$(this).stop().animate({top:'0px' }, 400);
        });
    });
		
		

	$("#portraits .a").hover(
		function() {
		$(this).stop().animate({"opacity": "0"}, 400);
		
		},
		
		function() {
		$(this).stop().animate({"opacity": "1"}, 400);
		
	});

	$("a.alt_logo").hover(
		function() {
		$(this).stop().animate({"width": "190px"}, 400);
		
		},
		
		function() {
		$(this).stop().animate({"width": "117px"}, 400);
		
	});

		
	
	$('#feed_right .recent_work').each(function() {
        $(this).hover(function() {
            $('#feed_right .recent_work .caption').stop().animate({bottom:'0px' }, 400);
        },
        function() {
			$('#feed_right .recent_work .caption').stop().animate({bottom:'-35px' }, 400);
        });
	});
	
	
	$(".dim_siblings").children().hover(function() { $(this).siblings().stop().fadeTo(400,0.3); }, function() { $(this).siblings().stop().fadeTo(400,1);});
	
	$('.top').click(function(){ $('html, body').animate({scrollTop:0}, 'slow'); return false; });
	
	
	/*Filter*/
	$('ul#filter a').click(function() {
		$(this).css('outline','none');
		$('ul#filter .current').removeClass('current');
		$(this).parent().addClass('current');
		
		var filterVal = $(this).text().toLowerCase().replace(' ','-');
				
		if(filterVal == 'all') {
			$('ul#portfolio li.hidden').fadeIn('slow').removeClass('hidden');
		} else {
			
			$('ul#portfolio li').each(function() {
				if(!$(this).hasClass(filterVal)) {
					$(this).fadeOut('normal').addClass('hidden');
				} else {
					$(this).fadeIn('slow').removeClass('hidden');
				}
			});
		}
		
		return false;
	});
	



	
});




