 // wait for the DOM to be loaded
            $(document).ready(function() {

                $("#loading").bind("ajaxSend", function(){
                    $(this).show(); // показываем элемент
                }).bind("ajaxComplete", function(){
                    $(this).animate({ opacity: "hide" }, "slow"); // скрываем элемент
                }).bind("ajaxError", function(){
                    $(this).css('background','red'); // красный фон, если ошибка
                });

                simple_tooltip("span","tooltip");
            });

            
