/************************************************************************************
* Author: Kris Watson, Lumous Media, LLC (www.lumousmedia.com)
* Date: September 2008
* Description: Enables Show/Hide functionality for the Board of Directors
* Requires: Jquery, LiveQuery
* Copyright: Jquery and LiveQuery are copyright their respective authors. 
*
* Change Log: 
*
* Jan 9th, 2009 -- Added page check to give hide/show functionality to LED ARRAY Page
**************************************************************************************/
$(document).ready(function() {
	
	var ThePage = $(".bod_wrap").attr('id');
	

  //set inital box state
  if (ThePage == "products_led_home") {
  	$(".bod_title").css("background", "url(../assets/images/plus_sign.gif) no-repeat 0% 55%");
  } else {
  	$(".bod_title").css("background", "url(../assets/images/plus_sign.gif) no-repeat 0% 20%");
  }
  //Hide all content
  $(".bod_content").hide();
  
  ////
  //Click Event Handler
  $(".bod_title").livequery('click', function() {    
    //get name
    var currentName = "#" + $(this).attr('name');   
    
    var disp = $(currentName).css("display");
    
    if (disp == "none") {
      //show content
      $(currentName).show();
      //change box
      if (ThePage == "products_led_home") {
      	$(this).css("background", "url(../assets/images/minus_sign.gif) no-repeat 0% 55%");
      } else {
      	$(this).css("background", "url(../assets/images/minus_sign.gif) no-repeat 0% 20%");
      }
    } else {
      //show content
      $(currentName).hide();
      //change box
      if (ThePage == "products_led_home") {
      	$(this).css("background", "url(../assets/images/plus_sign.gif) no-repeat 0% 55%");
      } else {
      	$(this).css("background", "url(../assets/images/plus_sign.gif) no-repeat 0% 20%");
      }
    }
    
  });
  
});
