var is_ie = (navigator.userAgent.toLowerCase().indexOf("msie") != -1);

document.write('<div id="waitModal" style="display: none;"></div>');
document.write('<div style="z-index: 3000; hidden" class="jqmWindow jqmID1" id="dialog"></div>');


$().ready(function() {

	/**
	 *	The default Modal Box where all Ajax request loads
	 */
	$('#dialog').jqm({modal: true});

	/**
	 *	Post Ajax stuff
	 */
	$('.ajaxForm').submit(function () {
		ajaxPostUpdate (this.id, this.action + (this.action.indexOf("?") == -1 ? "?" : "&") + "ajax=true", "dialog", true);
		return false;
	});

	/**
	 *	Get Ajax stuff
	 */
	$(".ajaxLink").click(function() {
		ajaxGetUpdate ("dialog", this.pathname + (this.pathname.indexOf("?") == -1 ? "?" : "&") + "ajax=true", true);
		return false;
	});

	$(".ajaxNotice").click(function() {
		ajaxGetUpdate ("notice", this.pathname + (this.pathname.indexOf("?") == -1 ? "?" : "&") + "ajax=true", false);
		return false;
	});

	$(".ajaxRadio").click(function() {
		ajaxRadioUpdate (this.pathname + (this.pathname.indexOf("?") == -1 ? "?" : "&") + "ajax=true", this.id);
		return false;
	});

});
