function slideSwitch() {
    var $active = $('#smallSlider img.active');

    if ( $active.length == 0 ) $active = $('#smallSlider img:last');

    var $next =  $active.next().length ? $active.next()
        : $('#smallSlider img:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

function filterImg(){
	 $('ul#filter a').click(function() {   
        $('ul#filter .currentCat').removeClass('currentCat');  
        $(this).parent().addClass('currentCat');  
   
         var filterVal = $(this).text().toLowerCase();  
		 
   
         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;  
     });  
}

