﻿//*************************************************************************************
// File     :   studio_ajax_fixes.js
// Requires :   This version of the ajax fixes requires jQuery (1.2.6+)
// Author   :   Rusty Swayne (rss), modified by Kyle Weems (ksw)
// Origin   :   mindfly.com
//*************************************************************************************

// PageRequestManager to gain access to update panels during async postbacks
// this is to fix gravatars on post back.

var prm;
var _panels;
$(document).ready(function() { initAjaxFixes(); });
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

// initAjaxFixes()
function initAjaxFixes() {
    prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_pageLoaded(pageLoaded);
} // end

// pageLoaded()
function pageLoaded(sender, args)
{
    if (_panels != undefined && _panels.length > 0)
    {
        for (i=0; i < _panels.length; i++)
            _panels[i].dispose();
    }
    var panels = args.get_panelsUpdated();
    if(panels.length > 0)
    {
        // put functions here
        setupDisclaimerToggle();   
    }
} // end



