Modified showGraphicsjQuery to be more readable