$(function () {
    var frame = $('.image-features'),
        images = $('.images img', frame),
        items = $('.items li a', frame);

    function switchToSlide(index) {
        if (Modernizr.csstransitions) {
            images.removeClass('active').eq(index).addClass('active')
        } else {
            images.fadeOut('fast').eq(index).fadeIn('fast');
        }
        
        items.removeClass('active').eq(index).addClass('active');
    }
  
    items.click(function () {
        switchToSlide($(this).parent().index());
        
        return false;
    });

});
