/* This page contains functions used by all pages */


function popitup(url, name) {
	newwindow=window.open(url, name,'height=300,width=300');
	if (window.focus) {newwindow.focus()}
	return false;
}



$(document).ready( function(){

/* This is going to have to be changed on the next jquery upgrade, it's going to use http://docs.jquery.com/Utilities/jQuery.support */

	// Dialog
	$('#dialog').dialog({
		autoOpen: false,
		width: 500,
		height: 400,
		bgiframe: true,
		modal: true,
		buttons: {
			"I understand and agree": function() {
				$(this).dialog("close");
			}
			}

	});

	// Dialog Link
	$("#showTerms").click(function(){
		$('#dialog').dialog('open');
		return false;
	});

	$(".openNew").each(function(){
		$(this).click(function(){
			window.open($(this).attr("href"),'','');
			return false;
		});
	});

	if($("#navColumnOne").attr("id") == undefined || !$("#navColumnTwo").attr("id") == undefined){

		if($("#navColumnOne").attr("id") == undefined  && $("#navColumnTwo").attr("id") == undefined){
			$(".footer_bg").attr("colspan", 1);

		}
		else{

			$(".footer_bg").attr("colspan", 2);


		}




	}

});
