window.addEvent('domready', function() {
	if ($('idolgives-faq-accordion')) {
		var accordion = new Accordion('dt', 'dd', {
			opacity: false,
			alwaysHide: true,
			show: 0,
			onActive: function(toggler, element){
				toggler.className = "active";
			},
			onBackground: function(toggler, element){
				toggler.className = "";
			}
		}, $('idolgives-faq-accordion'));
	}
});

function adjustDonateTextMargin() {
	$('idolgives-donate-tup').getElement('p').style.marginTop = (124-$('idolgives-donate-tup').getElement('p').offsetHeight)/2 + 'px';
}

function displayUS() {
	$('idolgives-us-tab').className = "firstselected";
	$('idolgives-intl-tab').className = "";
	$('idolgives-us-tab-content').style.display = "block";
	$('idolgives-intl-tab-content').style.display = "none";
	$('idolgives-where-top-corners').className = "corners";
	$('idolgives-where-top-corners').className += " right-corner-only";
	$('idolgives-where-bottom-corners').style.display = "none";
	$('idolgives-where-bottom-corners').style.display = "block";
}
function displayIntl() {
	$('idolgives-us-tab').className = "first";
	$('idolgives-intl-tab').className = "selected";
	$('idolgives-us-tab-content').style.display = "none";
	$('idolgives-intl-tab-content').style.display = "block";
	$('idolgives-where-top-corners').className = "";
	$('idolgives-where-top-corners').className = "corners";
	$('idolgives-where-bottom-corners').style.display = "none";
	$('idolgives-where-bottom-corners').style.display = "block";
}
function popUp(URL,oWidth,oHeight) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=" + oWidth + ",height=" + oHeight + "');");
}
