// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
//document.observe("dom:loaded", function() {
//    // the element in which we will observe all clicks and capture
//    // ones originating from pagination links
//    var container = $(document.body)
//
//    if (container) {
//        var img = new Image
//        img.src = '/images/loading.gif'
//
//        function createSpinner() {
//            new Element('img', {
//                src: img.src,
//                'class': 'loading'
//            })
//        }
//        container.observe('click', function(e) {
//            var el = e.element()
//            if (el.match('.pagination a')) {
//                el.up('.pagination').insert(createSpinner())
//                new Ajax.Request(el.href, {
//                    method: 'get'
//                })
//                e.stop()
//            }
//        })
//    }
//});


//$(document).ready(function(){
//    $.ajaxSetup({
//        beforeSend:show_ajax_loading,
//        complete:hide_ajax_loading
//    });
//
//})

function show_ajax_loading(){
    $("#flash_message").hide()
    $("#page_ajax_loader").show();
}

function hide_ajax_loading(){
    $("#page_ajax_loader").hide();
//    $("#flash_message").focus();
}