define(function(){
   return function(){

       // mailBox.html
       //////////     MAIL  COLLAPSE     //////////
       $(".mail-collapse").off('click');
       $(".mail-collapse").on('click',function(){
           $("#main").toggleClass( "in" );
       });

       //////////     MAIL FAVOURITE      //////////
       $("a.mail-favourite").off('click');
       $("a.mail-favourite").on('click',function(){
           $(this).toggleClass( "active" );
           var star=$(this).find(".fa");
       });

       //map.html
       //////////     MAP GOOGLE      //////////
       $(".mapTools").off('click');
       $(".mapTools").on('click',function(){
           $("#mapSetting").toggleClass( "active" );
       });
       $(".map-control-min").off('click');
       $(".map-control-min").on('click',function(){
           $("#mapControl").toggleClass( "active" );
           $(this).find("i").toggleClass( "fa-chevron-down" );
           $(this).find("i").toggleClass( "fa-chevron-up" );
       });


       //dashboard.html
       //////////     CAPLET CLOCK    //////////
       $('div#clock').capletClock();

       //calendar.html
       $(".slide-trash").off('click.openbizcustom');
       $(".slide-trash").on('click',function(){
           $("#slide-trash").toggleClass( "active" );
       });

       //chartOther.html
       $('.knob_save').off('click');
       $('.knob_save').on('click', function() {
           alert("Save  "+$("#add_item").val()+" Item");
       });

       //////////     COLOR PALET     //////////
       $('#colorpalette1').colorPalette().off('selectColor');
       $('#colorpalette1').colorPalette().on('selectColor', function(e) {
           $('#selected-color1').val(e.color);
           $('#selected-color1').parent().find(".ico").css("color", e.color );
       });
       //////////     COLOR PALET  IN  ADD EVENT CALENDAR    //////////
       var cc_color= new Array();
       $.each(cepletColor, function(key,val) {
           cc_color.push(val) //put color for ceplet color
       });
       $('#colorpalette_events').colorPalette({ colors:[cc_color] }).off('selectColor');
       $('#colorpalette_events').colorPalette({ colors:[cc_color] }).on('selectColor', function(e) {
           var data=$(this).data();
           $(data.returnColor).val(e.color);
           $(this).parents(".input-group").find(".ico").css("color", e.color );
       });


       //////////     DATE TIME RANG      //////////
       $.('#daterange').daterangepicker();
       $('#reportrange').daterangepicker({
               startDate: moment().subtract('days', 29),
               endDate: moment(),
               minDate: '01/01/2012',
               maxDate: '12/31/2014',
               dateLimit: { days: 60 },
               /*parentEl:"#main",*/
               timePicker: false,
               timePickerIncrement: 1,
               timePicker12Hour: true,
               ranges: {
                   'Today': [moment(), moment()],
                   'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
                   'Last 7 Days': [moment().subtract('days', 6), moment()],
                   'This Month': [moment().startOf('month'), moment().endOf('month')],
                   'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
               },
               opens: 'left',
               buttonClasses: ['btn-sm'],
               applyClass: 'btn-inverse',
               cancelClass: 'btn-inverse',
               format: 'MM/DD/YYYY',
               separator: ' to ',
               locale: {
                   fromLabel: 'From',
                   toLabel: 'To',
                   customRangeLabel: 'Custom Range',
                   daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'],
                   monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
                   firstDay: 1
               }
           },
           function(start, end) {
               console.log("Callback has been called!");
               $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
           }
       );
       $('#reportrange span').html(moment().subtract('days', 29).format('MMMM D, YYYY') + ' - ' + moment().format('MMMM D, YYYY'));

   }
});
@@ -139,32 +139,46 @@
 pse%22).off('click
+.openbizcustom
 ');%0A       $(%22.m
@@ -193,32 +193,46 @@
 apse%22).on('click
+.openbizcustom
 ',function()%7B%0A  
@@ -368,32 +368,46 @@
 ite%22).off('click
+.openbizcustom
 ');%0A       $(%22a.
@@ -424,32 +424,46 @@
 rite%22).on('click
+.openbizcustom
 ',function()%7B%0A  
@@ -648,32 +648,46 @@
 ols%22).off('click
+.openbizcustom
 ');%0A       $(%22.m
@@ -697,32 +697,46 @@
 ools%22).on('click
+.openbizcustom
 ',function()%7B%0A  
@@ -828,32 +828,46 @@
 min%22).off('click
+.openbizcustom
 ');%0A       $(%22.m
@@ -884,32 +884,46 @@
 -min%22).on('click
+.openbizcustom
 ',function()%7B%0A  
@@ -1331,16 +1331,30 @@
 n('click
+.openbizcustom
 ',functi
@@ -1483,16 +1483,30 @@
 f('click
+.openbizcustom
 ');%0A    
@@ -1533,16 +1533,30 @@
 n('click
+.openbizcustom
 ', funct
@@ -1731,32 +1731,46 @@
 off('selectColor
+.openbizcustom
 ');%0A       $('#c
@@ -1806,32 +1806,46 @@
 .on('selectColor
+.openbizcustom
 ', function(e) %7B
@@ -2290,16 +2290,30 @@
 ectColor
+.openbizcustom
 ');%0A    
@@ -2392,16 +2392,30 @@
 ectColor
+.openbizcustom
 ', funct

update ui