$(document).ready(function() {
    if($('#photofeature li').length > 0) {
        var $lis = $('#photofeature li');
        var rand = Math.floor(Math.random() * $lis.length);
        $lis.each(function(i,e){
            if(i == rand) $(this).parents('li');
		if ( i == rand) $(this).addClass('active');
        });
    }
});
