diff --git a/lib/client/viewer.js b/lib/client/viewer.js index cb7878c7..4b7dd666 100644 --- a/lib/client/viewer.js +++ b/lib/client/viewer.js @@ -6,20 +6,24 @@ CloudCommander.Viewer = {}; CloudCommander.Viewer.FancyBox = { load: function(){ + var lInit_f = (function(pParent){ + return function(){ + $(".fancybox").fancybox({ + openEffect : 'none', + closeEffect : 'none' + }); + + pParent.set(); + }; + }); + CloudCommander.cssLoad({ src : 'http://fancyapps.com/fancybox/source/jquery.fancybox.css' }); - + CloudCommander.jsload( 'http://fancyapps.com/fancybox/source/jquery.fancybox.pack.js', - function(){ - $(".fancybox").fancybox({ - openEffect : 'none', - closeEffect : 'none' - }); - - this.set(); - }); + lInit_f(this)); }, set: function(){