(function ($) {
  $(document).ready(function() {
    // If needed, we can set specific forms to which this behavior applies.
    var forms = $("#edit-submit");

    // Insert 'saving' div now to cache it for better performance and to show the loading image.
    $('<div id="saving"><p class="saving">Saving&hellip;</p></div>').insertAfter(forms);

    forms.click(function() {
      $(this).siblings("input:submit").hide();
      $(this).hide();
      $("#saving").show();

      var notice = function() {
        $('<p id="saving-notice">Not saving? Wait a few seconds, reload this page, and try again. Every now and then the internet hiccups too :-)</p>').appendTo("#saving").fadeIn();
      };

      // Append notice if form saving isn't work, perhaps a timeout issue.
      setTimeout(notice, 90000);
    });

    // Give .active class to main site menu parents when hovering over children.
    var menu = $("#menu ul");
    menu.each(function(i) {
      $(this).hover(function() {
        $(this).parent().parent().find("a").slice(0,1).addClass("hover-state");
      },function() {
        $(this).parent().parent().find("a").slice(0,1).removeClass("hover-state");
      });
    });
  });
})(jQuery)
;
// html5shiv @rem remysharp.com/html5-enabling-script
// iepp v1.6.2 @jon_neal iecss.com/print-protector
// Dual licensed under the MIT or GPL Version 2 licenses
/*@cc_on(function(a,b){function r(a){var b=-1;while(++b<f)a.createElement(e[b])}if(!(!window.attachEvent||!b.createStyleSheet||!function(){var a=document.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}())){a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=l.firstChild,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){if(a+""===undefined)return"";var d=-1,e=a.length,f,g=[];while(++d<e){f=a[d];if(f.disabled)continue;b=f.media||b,p.test(b)&&g.push(c.getCSS(f.imports,b),f.cssText),b="all"}return g.join("")},c.parseCSS=function(a){var b=[],c;while((c=j.exec(a))!=null)b.push(((i.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(g,"$1.iepp_$2")+c[4]);return b.join("\n")},c.writeHTML=function(){var a=-1;q=q||b.body;while(++a<f){var c=b.getElementsByTagName(e[a]),d=c.length,g=-1;while(++g<d)c[g].className.indexOf("iepp_")<0&&(c[g].className+=" iepp_"+e[a])}k.appendChild(q),l.appendChild(n),n.className=q.className,n.id=q.id,n.innerHTML=q.innerHTML.replace(h,"<$1font")},c._beforePrint=function(){o.styleSheet.cssText=c.parseCSS(c.getCSS(b.styleSheets,"all")),c.writeHTML()},c.restoreHTML=function(){n.innerHTML="",l.removeChild(n),l.appendChild(q)},c._afterPrint=function(){c.restoreHTML(),o.styleSheet.cssText=""},r(b),r(k);if(c.disablePP)return;m.insertBefore(o,m.firstChild),o.media="print",o.className="iepp-printshim",a.attachEvent("onbeforeprint",c._beforePrint),a.attachEvent("onafterprint",c._afterPrint)}})(this,document);@*/
;
(function ($) {
  $(document).ready(function() {
    if (top !== self) {
      /* Add CSS to the page for off-site iframe styling */
      var css = 'body {background-color: #fff;}' +
                '#footer, #logo {display: none;}' +
                '#main-wrapper {margin-top: 0;}' +
                '#content .section {border: none; border-radius: 0; box-shadow: none;}' +
                '.page-user-register #header {display: none;}';
      $('head').append('<style>' + css + '</style>');
    }
  });
})(jQuery)
;
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
// Source: https://gist.github.com/379601
// SEE - http://track.flocknote.com/node/205
(function ($) {
Drupal.behaviors.placeholderFix = {
  attach: function(context, settings) {

    // Right now, only use this for node forms.
    $('.node-form [placeholder]').focus(function() {
      var input = $(this);
      if (input.val() == input.attr('placeholder')) {
        input.val('');
        input.removeClass('placeholder');
      }
    }).blur(function() {
      var input = $(this);
      if (input.val() == '' || input.val() == input.attr('placeholder')) {
        input.addClass('placeholder');
        input.val(input.attr('placeholder'));
      }
    }).blur().parents('form').submit(function() {
      $(this).find('[placeholder]').each(function() {
        var input = $(this);
        if (input.val() == input.attr('placeholder')) {
          input.val('');
        }
      })
    });

  }
};
})(jQuery);;
(function ($) {
Drupal.behaviors.flockNoteTheme = {
  attach: function(context, settings) {

    //
    // Note actions (Tabs on Note nodes).
    //

    // Get the primary tabs <ul>.
    var note_primary_tabs = $('#note-actions').find('.primary');

    // If the primary tabs for notes were found, hide the primary tabs after
    // five seconds, then attach hover functions to content area.
    if (note_primary_tabs.length) {
      note_primary_tabs.delay(5000).fadeOut(800); // Hide tabs after 5 sec.

      // When mouse is over the main content area, show Note actions.
      $('#content').hover(function() {
          // Show Note actions.
          note_primary_tabs.fadeIn(100);
        },
        function() {
          // Hide Note actions.
          note_primary_tabs.fadeOut(200);
        }
      );
    }

    //
    // Note header images (on Note pages).
    //

    // Get the header image height, and set the title margin to that + 10px.
    var header_height = $('.note-header-image img').height() + 10;
    if (header_height) {
      $('#page-title').css('margin-top', header_height + 'px');
    }

  }
};
})(jQuery);;

