function htmlComponentChanged(id) { if (id == "fancyGallery") { setTimeout(function() { $("a.fancy_group").fancybox({ 'titlePosition' : 'over' }); }, timeout); } }