jQuery(document).ready(function(){
    jQuery(".show-hide-text-p1").hide();
    jQuery(".show-hide-text-p2").hide();
    jQuery(".show-hide-text-p3").hide();
    jQuery(".show-hide-text-p4").hide();
    jQuery(".show-hide-text-p5").hide();
    jQuery(".show-hide-text-p6").hide();
	jQuery(".show-hide-text-p7").hide();
    // JQUERY NORMAL HIDE SHOW EFFECTS
    jQuery(".heading-toggle-open-h1").click(function(event) {
        if (jQuery(".show-hide-text-p1").is(":hidden")){
            jQuery(".show-hide-text-p1").show("slow");
            jQuery(".heading-toggle-open-h1").addClass("down-arrow");
            jQuery(".read-more").hide("slow");
        } else {
            jQuery(".read-more").show("slow");
            jQuery(".show-hide-text-p1").hide("slow");
            jQuery(".heading-toggle-open-h1").removeClass("down-arrow")

        }
    });
    // JQUERY NORMAL HIDE SHOW EFFECTS
    jQuery(".heading-toggle-open-h2").click(function(event) {
        if (jQuery(".show-hide-text-p2").is(":hidden")){
            jQuery(".show-hide-text-p2").show("slow");
            jQuery(".heading-toggle-open-h2").addClass("down-arrow");
            jQuery(".read-more2").hide("slow");
        } else {
            jQuery(".read-more2").show("slow");
            jQuery(".show-hide-text-p2").hide("slow");
            jQuery(".heading-toggle-open-h2").removeClass("down-arrow");
        }

    });
    // JQUERY NORMAL HIDE SHOW EFFECTS
    jQuery(".heading-toggle-open-h3").click(function(event) {
        if (jQuery(".show-hide-text-p3").is(":hidden")){
            jQuery(".show-hide-text-p3").show("slow");
            jQuery(".heading-toggle-open-h3").addClass("down-arrow");
        } else {
            jQuery(".show-hide-text-p3").hide("slow");
            jQuery(".heading-toggle-open-h3").removeClass("down-arrow");
        }

    });
    // JQUERY NORMAL HIDE SHOW EFFECTS
    jQuery(".heading-toggle-open-h4").click(function(event) {
        if (jQuery(".show-hide-text-p4").is(":hidden")){
            jQuery(".show-hide-text-p4").show("show");
            jQuery(".heading-toggle-open-h4").addClass("down-arrow");
        } else {
            jQuery(".show-hide-text-p4").hide("slow");
            jQuery(".heading-toggle-open-h4").removeClass("down-arrow");
        }

    });
     jQuery(".heading-toggle-open-h5").click(function(event) {
        if (jQuery(".show-hide-text-p5").is(":hidden")){
            jQuery(".show-hide-text-p5").show("show");
            jQuery(".heading-toggle-open-h5").addClass("down-arrow");
        } else {
            jQuery(".show-hide-text-p5").hide("slow");
            jQuery(".heading-toggle-open-h5").removeClass("down-arrow");
        }

    });
     jQuery(".heading-toggle-open-h6").click(function(event) {
        if (jQuery(".show-hide-text-p6").is(":hidden")){
            jQuery(".show-hide-text-p6").show("show");
            jQuery(".heading-toggle-open-h6").addClass("down-arrow");
        } else {
            jQuery(".show-hide-text-p6").hide("slow");
            jQuery(".heading-toggle-open-h6").removeClass("down-arrow");
        }

    });
	jQuery(".heading-toggle-open-h7").click(function(event) {
        if (jQuery(".show-hide-text-p7").is(":hidden")){
            jQuery(".show-hide-text-p7").show("show");
            jQuery(".heading-toggle-open-h7").addClass("down-arrow");
        } else {
            jQuery(".show-hide-text-p7").hide("slow");
            jQuery(".heading-toggle-open-h7").removeClass("down-arrow");
        }

    });
});

//// JQUERY SLIDE FIX
/*
// this is a fix for the jQuery slide effects
function slideToggle(el, bShow){
  var $el = $(el), height = $el.data("originalHeight"), visible = $el.is(":visible");

  // if the bShow isn't present, get the current visibility and reverse it
  if( arguments.length == 1 ) bShow = !visible;

  // if the current visiblilty is the same as the requested state, cancel
  if( bShow == visible ) return false;

  // get the original height
  if( !height ){
    // get original height
    height = $el.show().height();
    // update the height
    $el.data("originalHeight", height);
    // if the element was hidden, hide it again
    if( !visible ) $el.hide().css({height: 0});
  }

  // expand the knowledge (instead of slideDown/Up, use custom animation which applies fix)
  if( bShow ){
    $el.show().animate({height: height}, {duration: 250});
  } else {
    $el.animate({height: 0}, {duration: 250, complete:function (){
        $el.hide();
      }
    });
  }
}*/

