jQuery(function($){   
    var id = '';
    $('.chama-commission-gallery').each(function(i, obj) {
        var id = $(this).data('id');
        //console.log(id);
        chama_initialize_gallery('.chama-gallery-' + id);
    }); 
   
});

function chama_initialize_gallery(selector){
    jQuery(selector).featherlightGallery({
        previousIcon: '<i class="chama-gallery-nav fa fa-arrow-circle-left"></i>',
		nextIcon: '<i class="chama-gallery-nav fa fa-arrow-circle-right"></i>',
		galleryFadeIn: 100,          /* fadeIn speed when slide is loaded */
		galleryFadeOut: 300          /* fadeOut speed before slide is loaded */
    });

}