

function submitNewsletterForm() {
  if (document.getElementById('mce-FNAME')) {
    var fname = document.getElementById('mce-FNAME');
    if (fname.value == 'INDTAST FORNAVN') {
      fname.value = '';
    }
  }

  if (document.getElementById('mce-LNAME')) {
    var lname = document.getElementById('mce-LNAME');
    if (lname.value == 'INDTAST EFTERNAVN') {
      lname.value = '';
    }
  }

  if (document.getElementById('mce-EMAIL')) {
    var email = document.getElementById('mce-EMAIL');
    if (email.value == 'INDTAST E-MAIL') {
      email.value = '';
    }
  }

  return true;
}

$(document).ready(function () {
  $('ul.sf-menu').superfish({
    delay: 100,                            // one second delay on mouseout 
    animation: { height: 'show' },  // fade-in and slide-down animation 
    speed: 'fast',                          // faster animation speed 
    autoArrows: false,                           // disable generation of arrow mark-up 
    dropShadows: false                            // disable drop shadows
  });
});


var masterScript = {
  init: function () {
    this.topMenuStyling();
    this.changeTopPictureAndLinks();

  },
  topMenuStyling: function () {

    var getAtags = document.getElementById('superfishUL').getElementsByTagName('A');
    for (i = 0; i < getAtags.length; i++) {

      // remove href on top links
      if (getAtags[i].title == "Kurser") {
        getAtags[i].removeAttribute('HREF');
      }
      if (getAtags[i].title == "Info") {
        getAtags[i].removeAttribute('HREF');
      }
      if (getAtags[i].title == "Viden om") {
        getAtags[i].removeAttribute('HREF');
      }
      if (getAtags[i].title == "Coaching") {
        getAtags[i].removeAttribute('HREF');
      }
      if (getAtags[i].title == "Download") {
        getAtags[i].removeAttribute('HREF');
      }
      // remove visual title on links
      getAtags[i].removeAttribute('TITLE');
    }
  },
  changeTopPictureAndLinks: function () {
    if (document.getElementById('container3')) {
      this.container = document.getElementById('container3');
      if (this.container.className == "fullPage") {
        document.getElementById('linksBox').style.display = "none";

        document.getElementById('headerWrap').style.height = "200px";
        document.getElementById('headerWrap').style.backgroundImage = "url('/wp-content/themes/feldstedt/images/construction/gradient.jpg')";
      }

      //move picture from field to bg on top
      if (document.getElementById('topBGPIX')) {
        document.getElementById('headerWrap').style.backgroundImage = "url('" + document.getElementById('topBGPIX').src + "')";
      }

    }
  }
}









