/*
 * Js loader, looks for html components with the right class
 * and then runs the js object associated with it.
 */

(function(){
       
      var loader = function(opts, c){

         var that = {};
         opts = opts || {};
		 var componentClass = opts.componentClass || 'component'; // The CSS class name used to id a component. 
		 
		 $('.'+componentClass).each(function(){
		 	window[namespace][$(this).data("handler")]();
		 });

         return that;
      };
      
      gsui.loader = loader;
       
})();
