
// hide first button, show second
// note that the id has to be '#id_str' because that's the way jquery likes it
function swap_buttons(btn_to_hide, btn_to_show) {
    $(btn_to_hide).hide(0);
    show_button(btn_to_show);
}

// Show a button and remove display:block 
// This is necessary because jquery adds 'display: block' when you use a method 
// other than toggle to show an element
function show_button(btn) {
    $(btn).show(0, function () { make_inline(this); });
}

// sets style display to inline
// note that the id has to be '#elementid' because that's the way jquery likes it
function make_inline(id) {
    $(id).css("display","inline");
}

// set r_c, clear all in array_ids_to_clear
function radio_set(r_c, ids_to_clear) {
    $(r_c).attr("checked", true);
    $(ids_to_clear).attr("checked", false);
}

function add_cb_styles() {
    $('input:checkbox').addClass('cb');
}

// apply styles to input elements of type radio
function add_radio_styles() {
    // find input w/type button and add class btn
    $('input:radio').addClass('rbtn');
}

// add button hovers
function add_button_styles() {
    // find input w/type button 
    $('input:button')
        .addClass('btn') // add class btn   
        .mouseover(function () {$(this).addClass('hov');}) // add mouseover's
        .mouseout(function () {$(this).removeClass('hov');}); // add mouseout's
}
