(function ($) {
  Drupal.behaviors.greatlakesTheme = {
    attach: function (context) {
	  //initial setup 
	  $(".ads-content-wrapper .section").height($(".ads-title-wrapper").height()-100);
          $(".body-row").hide();
          $(".body-row:first").show().addClass("active");
          $(".title-row:first").addClass("active");
          $(".title-row").click(function(){
		  var id = $(this).attr("class").split(" ");
                  id = id[1].split("-");
                  id = id[1];
                  
		  $(".title-row").removeClass("active");
                  $(this).addClass("active");
                  $(".body-row").hide();
                  $(".body-row").removeClass("active");
                  $(".body-row.ad-" + id).show().addClass("active"); 
                 
          });
	  /** remove service menu link **/
	  $(".menu-766 a:first").attr("href", "#");
	  /** hide empty videos **/
	  if ($("#block-views-related-video-block .field-content").html()) {
	      $("#block-views-related-video-block").show();
	  }
      }
  }
})(jQuery);;

