$(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");
        
        /*
        
        $(".latest").mouseover(function() {
            $("a.our_latest").hide();
            $("a.information_resources").hide();
            $("a.living_with_the_hiv").hide();
            $("a.our_latest").css("display", "block");
            $(".homepage_column h3").removeClass("selected");
            $(this).children("h3").addClass("selected");
        });
        $(".information").mouseover(function() {
            $("a.our_latest").hide();
            $("a.information_resources").hide();
            $("a.living_with_the_hiv").hide();
            $("a.information_resources").show();
            $(".homepage_column h3").removeClass("selected");
            $(this).children("h3").addClass("selected");
        });
        $(".living").mouseover(function() {
            $("a.our_latest").hide();
            $("a.information_resources").hide();
            $("a.living_with_the_hiv").hide();
            $("a.living_with_the_hiv").css("display", "block");
            $(".homepage_column h3").removeClass("selected");
            $(this).children("h3").addClass("selected");
        });
        
        */
        
    } catch (err) { }
});
$(document).ready(function() {
    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;


    //    <form class="style1" action="https://rsm2.rsmsecure.com/cpterminal/cpweb.php" method="post" target="_blank" name="CTTcpweb">
    //        <input type="hidden" name="campaign" value="874.5171" />
    //        <input type="image" src="http://www.ctt.org/images/cm_images/donate_online_now_plain.gif" name="submit" value="One Off Donation" /> 
    //    </form>
}