(function($){

    var methods = {
        
        waitAnimation:function(){
            
            //tambahkan sheet of paper
            $(this).before('<div class="div-wait-animation" id="div-wait-animation"><img id="wait-animation" class="wait-animation" src="http://localhost/baliincentive/images/wait/wait.gif" title="Wait...." /></div>');            
            
        },
        hideAnimation:function(){
            
            $("#div-wait-animation").hide();
            
        },
        showAnimation:function(){
            
            $("#div-wait-animation").show();
            
        }
        
    };

    $.fn.waitanimation = function(method){
        
        // Method calling logic
        if(methods[method]){
            
            return methods[method].apply(this,Array.prototype.slice.call(arguments,1));
            
        }else if(typeof method === 'object' || !method){
            
            return methods.waitAnimation.apply(this,arguments);
            
        }else{
            
            $.error('Method '+method+' does not exist on jQuery.tooltip');
            
        }
        
    };

})(jQuery);
