$(document).ready(function () {
    try {
        $(".article .inner").corner("round 9px").parent().css('padding', '2px').corner("round 10px");
        $(".section .block_inner").corner("round 9px").parent().css('padding', '2px').corner("round 10px");
        $(".section p.date").corner("round 5px").parent().css('padding', '1px').corner("round 6px");

    } catch (err) { }

    try {
        $("a.sub").mouseup(function () {
            $(this).toggleClass("open");
            $(this).next().toggle(400);
        });
        $('a.popup').tooltip({
            showURL: false
        });
        $("a.close").mouseup(function () {
            $(this).parent().toggle(400);
            $('a.popout').removeClass("popout_selected");
        });
    } catch (err) { }
});

function popout(x, target) {
    $(document).ready(function() {
        //alert(x);
        $(x).toggleClass("popout_selected");
        $("." + target).toggle(400);
        $.scrollTo($("." + target), 1800);
    });
}
function popUpPrint(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=400,left = 192,top = 144');");
}

function MakeADonation(button) {
    var cAction = document.forms[0].action;
    var cTarget = document.forms[0].target;

    document.forms[0].action = "https://rsm2.rsmsecure.com/cpterminal/cpweb.php";
    document.forms[0].target = '_blank';
    document.forms[0].submit();

    document.forms[0].action = cAction;
    document.forms[0].target = cTarget;
}

function InitCarouselFlashObjects(arr) {
    
    for (var i = 0; i < arr.length; i++) {
        swfobject.embedSWF($('#val' + arr[i]).val(), arr[i], "715px", "402px", "9.0.0", "/", {}, {wmode: "transparent"}, {});        
    }

}


var NAT = NAT || {}; 

(function () {

	$(function () {
		NAT.Base.init();
	});

	/* ---------------------------------- */

	if (typeof console === "undefined") {
		console = { log: function () { } };
	}

	/* ---------------------------------- */

	NAT.Base = {

		init: function () {
			this.navigation();
		},

		navigation: function () {
			$(".header ul.navigation li").hover(function() {
				$(this).children(".subnav-wrapper").fadeIn();
			}, function() {
			});
			$(".header ul.navigation li").hover(function() {
			}, function() {
				$(this).children(".subnav-wrapper").fadeOut();
			});
		}
	};

} ());


