/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// NAVIGATION - open nest
function navigation_viewNest(id) {
    var nest = $(id);
    new Effect.toggle(nest, 'blind', { duration: 0.4 });
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PRODUCT SEACH - toggle display of form element
function products_searchForm(show) {

    new Effect.toggle('header_product_search', 'appear', { duration: 0.3 });

}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PRODUCTS - enlarge view
function products_viewElarge(show) {

    new Effect.toggle('body_fog', 'appear', { duration: 0.4 });
    new Effect.toggle('load_layer', 'appear', { duration: 0.4 });

    /*
    if(show == true) {
    $('load_layer').style.display = 'block';
    $('body_fog').style.display	  = 'block';
    } else {
    $('load_layer').style.display = 'none';
    $('body_fog').style.display   = 'none';
    }
    */
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PRODUCTS - restock message
function products_restockMessage(show) {

    new Effect.toggle('restock_layer', 'appear', { duration: 0.3 });

}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PRODUCTS - restock message
function products_addToBag(show) {

    new Effect.toggle('shopping_bag_layer', 'appear', { duration: 0.3 });

}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PRODUCTS - size select
function products_toggleSelect(id) {
    id = (id == null) ? "size_options" : id + "_options";
    if ($(id)) {
        new Effect.toggle(id, 'appear', {
            delay: 0,
            duration: .25,
            afterFinish: function() {

            }
        });
    }
}

function products_toggleSelectValue(input, value, text) {
    $(input + "_input").value = value;
    $(input + "_title").innerHTML = text;
    products_toggleSelect(input);
}
