function zxcSwap(zxcid,zxcimg,zxcspd){
var zxcp=document.getElementById(zxcid);
var zxcimg=zxcp.getElementsByTagName('IMG')[zxcimg];
var zxcevt=window.event||arguments.callee.caller.arguments[0];
zxcBAnimator('opacity#',zxcimg,0,100,zxcspd);
if (zxcevt.type=='mouseover') zxcimg.style.zIndex='2';
else zxcimg['to']=setTimeout(function(zxcimg){return function(){zxcimg.style.zIndex='0';}}(zxcimg),zxcspd);
}
function zxcSwapClass(zxcid,zxcimg,zxcspd){
var zxcp=document.getElementById(zxcid);
var zxcimg=zxcp.getElementsByTagName('IMG')[zxcimg];
var zxcevt=window.event||arguments.callee.caller.arguments[0];
zxcBAnimator('opacity#',zxcimg,0,100,zxcspd);
if (zxcevt.type=='mouseover') zxcimg.style.zIndex='2';
else zxcimg['to']=setTimeout(function(zxcimg){return function(){zxcimg.style.zIndex='0';}}(zxcimg),zxcspd);
}

$(document).ready(function() {
	$('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('slow').addClass('hidden');
				} else {
					$(this).fadeIn('slow').removeClass('hidden');
				}
			});
		}
		
		return false;
	});
});
