﻿function ShowOrHideContentJquery(idOfElement, itemId) 
{
    //Create paths
    expand = jQuery("#ICG_ETH_EXPAND_" + itemId);
    collapse = jQuery("#ICG_ETH_COLLAPSE_" + itemId);


    //do the magic
    listing = jQuery("#" + idOfElement);
    if (listing.hasClass('hideContent')) {
        //Currently hidden, show with jquery
        listing.show('slow').removeClass('hideContent');

        //Setup expand collapse
        if (expand != false) {
            expand.addClass('hideContent');
            collapse.removeClass('hideContent');
        }
    }
    else {
        //Show
        listing.hide('slow').addClass('hideContent');

        //Setup expand collapse
        if (expand != null) {
            expand.removeClass('hideContent');
            collapse.addClass('hideContent');
        }
    }
}
