Initial OpenECOMP Portal commit
[portal.git] / ecomp-portal-BE / war / static / fusion / sample / js / eye.js
diff --git a/ecomp-portal-BE/war/static/fusion/sample/js/eye.js b/ecomp-portal-BE/war/static/fusion/sample/js/eye.js
new file mode 100644 (file)
index 0000000..8a281dc
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ *
+ * Zoomimage
+ * Author: Stefan Petre www.eyecon.ro
+ * 
+ */
+(function($){
+       var EYE = window.EYE = function() {
+               var _registered = {
+                       init: []
+               };
+               return {
+                       init: function() {
+                               $.each(_registered.init, function(nr, fn){
+                                       fn.call();
+                               });
+                       },
+                       extend: function(prop) {
+                               for (var i in prop) {
+                                       if (prop[i] != undefined) {
+                                               this[i] = prop[i];
+                                       }
+                               }
+                       },
+                       register: function(fn, type) {
+                               if (!_registered[type]) {
+                                       _registered[type] = [];
+                               }
+                               _registered[type].push(fn);
+                       }
+               };
+       }();
+       $(EYE.init);
+})(jQuery);