/* 
jquery.nc.taleoForward.js
 */
(function ($) {
   var fields = {};
   var methods = {
      init : function (options) {
         return this.each(function () {
            var $this = $(this);
            $this.find('.btn-cancel').bind('click', function(){
               methods.close.call($this);
               return false;
            });
         });
      },
      show : function(){
         var $this = $(this);
         $this.trigger('show');
      },
      close : function(){
         var $this = $(this);
         $this.trigger('close');
      }
   };

   $.fn.taleoForward = function (method) {
      if (methods[method]) {
         return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
      } else if (typeof method === 'object' || !method) {
         return methods.init.apply(this, arguments);
      } else {
         $.error('Method ' +  method + ' does not exist on lightBox');
      }
   };
})(jQuery);
