/**
 * Zentropy javascript core
 *
 * - Provides frequently used extensions to base javascript objects
 * - jQuery browser detection tweak
 * - Define functions used in events
 */

// Add String.trim() method
String.prototype.trim = function(){
	return this.replace(/\s+$/, '').replace(/^\s+/, '');
}

// Add Array.indexOf() method
if (!Array.prototype.indexOf) {
  Array.prototype.indexOf = function (obj, fromIndex) {
    if (fromIndex == null) {
      fromIndex = 0;
    } else if (fromIndex < 0) {
      fromIndex = Math.max(0, this.length + fromIndex);
    }
    for (var i = fromIndex, j = this.length; i < j; i++) {
      if (this[i] === obj){
        return i;
      }
    }
    return -1;
  };
}

// jQuery Browser Detect Tweak For IE7
jQuery.browser.version = jQuery.browser.msie && parseInt(jQuery.browser.version) == 6 && window["XMLHttpRequest"] ? "7.0" : jQuery.browser.version;

// Console.log wrapper to avoid errors when firebug is not present
// usage: log('inside coolFunc',this,arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function() {
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if (this.console) {
    console.log(Array.prototype.slice.call(arguments));
  }
};

// init object
var Zentropy = Zentropy || {};

/**
 * Image handling functions
 */
Zentropy.image = { _cache : [] };

// preload images
Zentropy.image.preload = function() {
  for (var i = arguments.length; i--;) {
    var cacheImage = document.createElement('img');
    cacheImage.src = arguments[i];
    Zentropy.image._cache.push(cacheImage);
  }
}
;
/* Modernizr 2.0.6 (Custom Build) | MIT & BSD
 * Contains: fontface | backgroundsize | borderimage | borderradius | boxshadow | flexbox | hsla | multiplebgs | opacity | rgba | textshadow | cssanimations | csscolumns | generatedcontent | cssgradients | cssreflections | csstransforms | csstransforms3d | csstransitions | applicationcache | canvas | canvastext | draganddrop | hashchange | history | audio | video | indexeddb | input | inputtypes | localstorage | postmessage | sessionstorage | websockets | websqldatabase | webworkers | geolocation | inlinesvg | smil | svg | svgclippaths | touch | webgl | iepp | cssclasses | teststyles | testprop | testallprops | hasevent | prefixes | domprefixes | load
 */
;window.Modernizr=function(a,b,c){function H(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=a[b]in l;return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function D(a,b){return!!~(""+a).indexOf(b)}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="2.0.6",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v=function(a,c,d,e){var f,h,j,k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:i+(d+1),k.appendChild(j);f=["&shy;","<style>",a,"</style>"].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},w=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),x,y={}.hasOwnProperty,z;!C(y,c)&&!C(y.call,c)?z=function(a,b){return y.call(a,b)}:z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)};var G=function(c,d){var f=c.join(""),g=d.length;v(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||j.touch.offsetTop===9,e.csstransforms3d=j.csstransforms3d.offsetLeft===9,e.generatedcontent=j.generatedcontent.offsetHeight>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",o.join("touch-enabled),("),i,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",o.join("transform-3d),("),i,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',m,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!C(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return e.touch},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b].toLowerCase()+"IndexedDB"])return!0;return!!a.indexedDB},r.hashchange=function(){return w("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){return w("dragstart")&&w("drop")},r.websockets=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b]+"WebSocket"])return!0;return"WebSocket"in a},r.rgba=function(){A("background-color:rgba(150,255,150,.5)");return D(k.backgroundColor,"rgba")},r.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return D(k.backgroundColor,"rgba")||D(k.backgroundColor,"hsla")},r.multiplebgs=function(){A("background:url(https://),url(https://),red url(https://)");return/(url\s*\(.*?){3}/.test(k.background)},r.backgroundsize=function(){return F("backgroundSize")},r.borderimage=function(){return F("borderImage")},r.borderradius=function(){return F("borderRadius")},r.boxshadow=function(){return F("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){B("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return F("animationName")},r.csscolumns=function(){return F("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.cssreflections=function(){return F("boxReflect")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d);return a},r.csstransitions=function(){return F("transitionProperty")},r.fontface=function(){return e.fontface},r.generatedcontent=function(){return e.generatedcontent},r.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}}catch(e){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}catch(d){}return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webworkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var I in r)z(r,I)&&(x=I.toLowerCase(),e[x]=r[I](),u.push((e[x]?"":"no-")+x));e.input||H(),A(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b<g)a.createElement(f[b])}a.iepp=a.iepp||{};var d=a.iepp,e=d.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",f=e.split("|"),g=f.length,h=new RegExp("(^|\\s)("+e+")","gi"),i=new RegExp("<(/*)("+e+")","gi"),j=/^\s*[\{\}]\s*$/,k=new RegExp("(^|[^\\n]*?\\s)("+e+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),l=b.createDocumentFragment(),m=b.documentElement,n=m.firstChild,o=b.createElement("body"),p=b.createElement("style"),q=/print|all/,r;d.getCSS=function(a,b){if(a+""===c)return"";var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,q.test(b)&&h.push(d.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},d.parseCSS=function(a){var b=[],c;while((c=k.exec(a))!=null)b.push(((j.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(h,"$1.iepp_$2")+c[4]);return b.join("\n")},d.writeHTML=function(){var a=-1;r=r||b.body;while(++a<g){var c=b.getElementsByTagName(f[a]),d=c.length,e=-1;while(++e<d)c[e].className.indexOf("iepp_")<0&&(c[e].className+=" iepp_"+f[a])}l.appendChild(r),m.appendChild(o),o.className=r.className,o.id=r.id,o.innerHTML=r.innerHTML.replace(i,"<$1font")},d._beforePrint=function(){p.styleSheet.cssText=d.parseCSS(d.getCSS(b.styleSheets,"all")),d.writeHTML()},d.restoreHTML=function(){o.innerHTML="",m.removeChild(o),m.appendChild(r)},d._afterPrint=function(){d.restoreHTML(),p.styleSheet.cssText=""},s(b),s(l);d.disablePP||(n.insertBefore(p,n.firstChild),p.media="print",p.className="iepp-printshim",a.attachEvent("onbeforeprint",d._beforePrint),a.attachEvent("onafterprint",d._afterPrint))}(a,b),e._version=d,e._prefixes=o,e._domPrefixes=p,e.hasEvent=w,e.testProp=function(a){return E([a])},e.testAllProps=F,e.testStyles=v,g.className=g.className.replace(/\bno-js\b/,"")+(f?" js "+u.join(" "):"");return e}(this,this.document),function(a,b,c){function k(a){return!a||a=="loaded"||a=="complete"}function j(){var a=1,b=-1;while(p.length- ++b)if(p[b].s&&!(a=p[b].r))break;a&&g()}function i(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&k(c.readyState)&&(d=1,j(),c.onload=c.onreadystatechange=null)},m(function(){d||(d=1,j())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function h(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css";if(!a.e&&(w||r)){var e=function(a){m(function(){if(!d)try{a.sheet.cssRules.length?(d=1,j()):e(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,m(function(){j()},0)):e(a)}},0)};e(c)}else c.onload=function(){d||(d=1,m(function(){j()},0))},a.e&&c.onload();m(function(){d||(d=1,j())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function g(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?h(a):i(a)},0):(a(),j()):q=0}function f(a,c,d,e,f,h){function i(){!o&&k(l.readyState)&&(r.r=o=1,!q&&j(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:d,s:c,e:h};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=d),l.onload=l.onreadystatechange=i,a=="img"?l.onerror=i:a=="script"&&(l.onerror=function(){r.e=r.r=1,g()}),p.splice(e,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,j())},H.errorTimeout)}function e(a,b,c){var d=b=="c"?z:y;q=0,b=b||"j",C(a)?f(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&g());return this}function d(){var a=H;a.loader={load:e,i:0};return a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return Object(a)===a},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function f(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=F[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=E[h](f);return f}function e(a,b,e,g,h){var i=f(a),j=i.autoCallback;if(!i.bypass){b&&(b=D(b)?b:b[a]||b[g]||b[a.split("/").pop().split("?")[0]]);if(i.instead)return i.instead(a,b,e,g,h);e.load(i.url,i.forceCSS||!i.forceJS&&/css$/.test(i.url)?"c":c,i.noexec),(D(b)||D(j))&&e.load(function(){d(),b&&b(i.origUrl,h,g),j&&j(i.origUrl,h,g)})}}function b(a,b){function c(a){if(C(a))e(a,h,b,0,d);else if(B(a))for(i in a)a.hasOwnProperty(i)&&e(a[i],h,b,i,d)}var d=!!a.test,f=d?a.yep:a.nope,g=a.load||a.both,h=a.callback,i;c(f),c(g),a.complete&&b.load(a.complete)}var g,h,i=this.yepnope.loader;if(C(a))e(a,0,i,0);else if(A(a))for(g=0;g<a.length;g++)h=a[g],C(h)?e(h,0,i,0):A(h)?H(h):B(h)&&b(h,i);else B(a)&&b(a,i)},H.addPrefix=function(a,b){F[a]=b},H.addFilter=function(a){E.push(a)},H.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",G=function(){b.removeEventListener("DOMContentLoaded",G,0),b.readyState="complete"},0)),a.yepnope=d()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};;
/* Pushup
 * Copyright (c) 2008-2011 Nick Stakenburg (www.nickstakenburg.com)
 *
 * License: MIT-style license.
 * Website: http://www.pushuptheweb.com
 *
 */

var Pushup = {
  Version: '2.0.2',

  options: {
    appearDelay: .5,
    fadeDelay: 6,
    images: '/sites/messengerwebdesign.com/files/images/original/',
    message: 'We notice you&rsquo;re using an old browser. Our site looks much better in modern browsers, and some parts may not work at all in yours. Plus, all the other kids will make fun of you. <span style="color:#f00;">Click here to update.</span>',
    reminder: {
      hours: 2,
      message: 'Remind&nbsp;me&nbsp;again&nbsp;in&nbsp;2&nbsp;hours!'
    },
    skip: true
  },

  updateLinks: {
    //IE: 'http://www.microsoft.com/windows/downloads/ie/',
    IE: 'http://windows.microsoft.com/en-US/internet-explorer/downloads/ie', //changed download page so XP users can get IE8
	Firefox: 'http://www.getfirefox.com',
    Safari: 'http://www.apple.com/safari/download/',
    Opera: 'http://www.opera.com/download/'
  }
};

(function() {
var Browser = (function(uA) {
  function getVersion(identifier) {
    var version = new RegExp(identifier + '([\\d.]+)').exec(uA);
    return version ? parseFloat(version[1]) : true;
  }

  return {
    IE: !!(window.attachEvent && uA.indexOf('Opera') === -1) && getVersion('MSIE '),
    Opera:  uA.indexOf('Opera') > -1 && window.opera && opera.version && parseFloat(opera.version()),
    WebKit: uA.indexOf('AppleWebKit/') > -1 && getVersion('AppleWebKit/'),
    Gecko:  uA.indexOf('Gecko') > -1 && uA.indexOf('KHTML') === -1 && getVersion('rv\:'),
    Chrome: uA.indexOf('Chrome') > -1 && getVersion('Chrome/')
  };
})(navigator.userAgent);

var Conditions = (function(B, uA) {
  return {
    IE: B.IE && B.IE < 9,// && !/(Windows XP)/.test(uA), //modified to remove XP test
    Firefox: B.Gecko && uA.indexOf('Firefox') > -1 && B.Gecko < 2,
    Safari: B.WebKit && !B.Chrome && uA.indexOf('Safari') > -1 && B.WebKit < 533.20,
    Opera: B.Opera && B.Opera < 11
  };
})(Browser, navigator.userAgent);

// find current browser and check if it needs an update
for (var browser in Browser)
  if (Browser[browser]) Pushup._browserUsed = browser;
Pushup._updateBrowser = Conditions[Pushup._browserUsed] &&
  Pushup._browserUsed;

// stop if no update is required and we want to skip build
if (!Pushup._updateBrowser && Pushup.options.skip) return;

function Extend(destination, source) {
  for (var property in source)
    destination[property] = source[property];
  return destination;
}

Extend(Pushup, {
  start: function() {
    // get the image directory
    if (/^(https?:\/\/|\/)/.test(this.options.images))
      this.images = this.options.images;
    else {
      var srcMatch = /pushup(?:-[\w\d.]+)?\.js(.*)/,
       scripts = document.getElementsByTagName('script');
      for (var i = 0, l = scripts.length; i < l; i++) {
        var s = scripts[i];
        if (s.src && s.src.match(srcMatch))
          this.images = s.src.replace(srcMatch, '') + this.options.images;
      }
    }
    if (Pushup._updateBrowser) this.show();
  },

  build: function() {
    this.pushup = document.createElement('div');
    Opacity.set(this.pushup, 0);
    this.pushup.id = 'pushup';

    this.messageLink = this.pushup.appendChild(document.createElement('a'));
    this.messageLink.className = 'pushup_messageLink';
    this.messageLink.target = '_blank';

    this.messageLink.appendChild(this.icon = document.createElement('div'));
    this.icon.className = 'pushup_icon';

    this.messageLink.appendChild(this.message = document.createElement('span'));
    this.message.className = 'pushup_message';
    this.message.innerHTML = this.options.message;

    // reminder message if cookies are enabled
    var hours = this.options.reminder.hours;
    if (hours && Pushup.cookiesEnabled) {
      this.pushup.appendChild(this.reminder = document.createElement('a'));
      this.reminder.href = '#';
      this.reminder.className = 'pushup_reminder';
      this.pushup.className = 'withReminder';
      this.reminder.innerHTML = this.options.reminder.message;
    }

    // Older Opera doesn't handle float correctly
    if (Browser.Opera &&
       (!window.opera.version || parseFloat(window.opera.version()) < 9.25)) {
      this.messageLink.style.cssFloat = 'none';
      this.reminder.style.cssFloat = 'none';
    }

    Pushup.setBrowser(Pushup._updateBrowser);
    document.body.appendChild(this.pushup);
    Pushup.addEvents();
  },

  addEvents: function() {
    if (this.reminder) {
      Event.add(this.reminder, 'click', function(event) {
        Event.stop(event);
        Pushup.setReminder(Pushup.options.reminder.hours);
        Pushup.fade();
      });
    }
    Event.add(this.pushup, 'mouseover', Pushup.clearFade);
    Event.add(this.pushup, 'mouseout', function() {
      Pushup.fade({ delay: Pushup.options.fadeDelay })
    });
  },

  setBrowser: function(browser) {
    browser = browser || 'IE';
    setPngBackground(this.icon, this.images + browser.toLowerCase() + '.png');
    this.messageLink.href = this.updateLinks[browser];
  },

  show: function() {
    // default to IE if no browser was detected
    var browser = typeof arguments[0] == 'string' ?
      arguments[0] : Pushup._browserUsed || 'IE',
     options = arguments[browser ? 1 : 0] || {};

    if (options.resetReminder) Pushup.resetReminder();

    // show if not blocked by cookie
    if (!options.ignoreReminder && Pushup.cookiesEnabled &&
      Cookie.get('_pushupBlocked')) return;

    if (!Pushup.pushup) Pushup.build();
    Opacity.set(Pushup.pushup, 0);
    Pushup.pushup.style.display = 'block';
    if (browser) Pushup.setBrowser(browser);
    this.appear({ fadeAfter: true, delay: Pushup.options.appearDelay });
  },

  appear: function(delay) {
    Pushup.clearFade();
    var options = arguments[0] || {};
    return window.setTimeout(function() {
      Appear(Pushup.pushup, { afterFinish: function() {
        if (options.fadeAfter)
          Pushup.fade({ delay: Pushup.options.fadeDelay });
      }});
    }, (options.delay || 0.01) * 1000);
  },

  clearFade: function() {
    if (Pushup._fadeTimer) {
      window.clearTimeout(Pushup._fadeTimer);
      Pushup._fadeTimer = null;
    }
  },

  fade: function() {
    var options = arguments[0] || {};
    Pushup._fadeTimer = window.setTimeout(function() {
      Fade(Pushup.pushup);
    }, (options.delay || 0.01) * 1000);
  },

  setReminder: function(hours) {
    Cookie.set('_pushupBlocked', 'blocked', { duration: 1 / 24 * hours })
  },

  resetReminder: function() { Cookie.remove('_pushupBlocked') }
});

// Opacity adapted from the Prototype JavaScript framework
// http://www.prototypejs.org
var Opacity = {
  set: function(element, value) {
    element.style.opacity = (value == 1 || value === '') ? '' :
      (value < 0.00001) ? 0 : value;
  },

  get:  function(element) {
    var opacity = element.style.opacity;
    return opacity ? parseFloat(opacity) : 1.0;
  }
};

if (Browser.IE) {
  Opacity.get = function(element) {
    var opacity = element.style.opacity;
    if (!opacity && element.currentStyle) opacity = element.currentStyle[opacity];

    if (opacity = (element.style.filter || '').match(/alpha\(opacity=(.*)\)/))
      if (opacity[1]) return parseFloat(opacity[1]) / 100;
    return 1.0;
  };

  Opacity.set = function(element, value) {
    function stripAlpha(filter) {
      return filter.replace(/alpha\([^\)]*\)/gi,'')
    }
    var currentStyle = element.currentStyle;
    if ((currentStyle && !currentStyle.hasLayout) ||
      (!currentStyle && element.style.zoom == 'normal'))
        element.style.zoom = 1;
    var filter = element.style.filter,
     style = element.style;
    if (value == 1 || value === '') (filter = stripAlpha(filter)) ?
      style.filter = filter : style.filter = '';
    else style.filter = stripAlpha(filter) +
      'alpha(opacity=' + (value * 100) + ')';
  };
}

function Appear(element) {
  var current = Opacity.get(element),
   options = arguments[1] || {};
  if (element.style.display != 'block')
    element.style.display = 'block';
  if (current < 1) {
    setTimeout(function() {
      Opacity.set(element, current += 0.05);
      Appear(element, options);
    }, 0.01);
  }
  else {
    if (Browser.IE && element.style.filter)
      element.style.removeAttribute('filter');
    if (options.afterFinish) options.afterFinish.call();
  }
}

function Fade(element) {
  var current = Opacity.get(element),
   options = arguments[1] || {};
  if (current > 0) {
    setTimeout(function() {
      Opacity.set(element, current -= 0.05);
      Fade(element, options);
    }, 0.01);
  }
  else {
    element.style.display = 'none';
    if (options.afterFinish) options.afterFinish.call();
  }
}

function setPngBackground(element, url) {
  var options = Extend({
    align: 'top left',
    repeat: 'no-repeat',
    sizingMethod: 'crop',
    backgroundColor: ''
  }, arguments[2] || {});

  Extend(element.style, Browser.IE && Browser.IE < 7 ? {
    filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' +
      url + '\'\', sizingMethod=\'' + options.sizingMethod + '\')'
  } : {
    background: options.backgroundColor + ' url(' + url + ') ' +
      options.align + ' ' + options.repeat
  });
}

// Based on the work of Peter-Paul Koch - http://www.quirksmode.org
var Cookie = {
  set: function(name, value) {
    var expires = '', options = arguments[2] || {};
    if (options.duration) {
      var date = new Date();
      date.setTime(date.getTime() + options.duration * 1000 * 60 * 60 * 24);
      value += '; expires=' + date.toGMTString();
    }
    document.cookie = name + "=" + value + expires + "; path=/";
  },

  remove: function(name) { this.set(name, '', -1) },

  get: function(name) {
    var cookies = document.cookie.split(';'), nameEQ = name + "=";
    for (var i = 0, l = cookies.length; i < l; i++) {
      var c = cookies[i];
      while (c.charAt(0) == ' ')
        c = c.substring(1,c.length);
      if (c.indexOf(nameEQ) == 0)
        return c.substring(nameEQ.length, c.length);
    }
    return null;
  }
};

// check if cookies are enabled
Pushup.cookiesEnabled = (function(test) {
  if (Cookie.get(test)) return true;
  Cookie.set(test, 'test', { duration: 15 });
  return Cookie.get(test);
})('_pushupCookiesEnabled');

var Event = {
  add: function(obj, type, fn) {
    if (obj.attachEvent) {
      obj['e' + type + fn] = fn;
      obj[type + fn] = function(){ obj['e' + type +fn](window.event) };
      obj.attachEvent('on' + type, obj[type + fn]);
    }
    else obj.addEventListener(type, fn, false);
  },

  stop: function(event) {
    if (Browser.IE) {
      event.cancelBubble = true;
      event.returnValue = false;
    }
    else {
      event.preventDefault();
      event.stopPropagation();
    }
  }
};

Event.add(window, 'load', function() { Pushup.start() });
})();;
/*
 * 	 imAnimTabber, formerly imUpSideDownTabber  
 * 	 Copyright (C) 2008  Intriguing Minds, Inc.
 *   Version 1.0
 * 
 * 	 Change Log: Version 1.0
 * 		1. Ability to Control the speed
 * 		2. Style each tab individually and each selected tab separately (if active_tab_class is empty)
 * 		3. Added mode (manual, auto). 'auto' is default. if 'manual', initial tabs can be created manually
 * 		4. Added attribute option (slide, width, height, fade, marginLeft) - marginLeft is called by the carousel option only. 
 * 			The slide option is the original imUpSideDownTabber option 
 * 		5. Added carousel option. Can only be used in manual mode. Tabs option not needed. Tabs can't be individually styled. 
 * 			Takes format:
 * 			carousel: {"slide_container": "detailContainer", "slide_parent": "portfolio", "num_slides": 4, "active_tab_class": "selected"}
 * 
 * 		5. Added Queue: Default true. If false, new content will close at same time as old content opens
 * 		6. Changed name to imAnimTabber
 * 		7. Content container attributes can vary (each container can have a different height, width, etc).
 * 		8. Added Slide container option to be used for carousel effect; 
 * 
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.

 *   Demo and Documentation can be found at:   
 *   http://www.grasshopperpebbles.com
 *   
 */
////Find all link elements and add an onfocus attribute and value
//function hideFocusBorders(){
//var theahrefs = document.getElementsByTagName("a");
//if (!theahrefs){return;}
//for(var x=0;x!=theahrefs.length;x++){
//theahrefs[x].onfocus = function stopLinkFocus(){this.hideFocus=true;};
//}
//}

;(function($) {
	$.fn.extend({
        imAnimTabber: function(options) { 
        	opts = $.extend({}, $.tabberDisplay.defaults, options);
			return this.each(function() {
				new $.tabberDisplay(this, opts);
			});
        }
    });	

$.tabberDisplay = function(obj, opts) {
	var $this = $(obj);
	var selected, sel_class, cntId, btn, cnt_width = null;
	var attrib = new Array();
	if (opts.mode == 'auto') {
		$this.append($('<div></div>').attr("id", opts.tab_container));
		$.each(opts.tabs, function(i, itm) {
			attrib[itm.content_id] = (itm.attribute) ? itm.attribute : opts.attribute;
			attrib['tcls'+itm.content_id] = (itm.active_tab_class) ? itm.active_tab_class : opts.active_tab_class;
			attrib['attr'+itm.content_id] = $("#"+itm.content_id).css(attrib[itm.content_id]);
			$("#"+opts.tab_container).append($('<a></a>')						
			//a = document.createElement(a);
			//$(a)
				.append(itm.caption)
				.attr("href", "#")
				.addClass(itm.class_name)
				.click(function() {
					toggleShow($(this), itm.content_id);
					return false;
				}));
		});
	} else {
		if (opts.carousel) {
			opts.attribute = 'marginLeft';
			// get the width of the parent. Parent must have overflow:hidden set in stylesheet 
			cnt_width = $('#'+opts.carousel.slide_parent).css('width');
			attrib[opts.carousel.slide_container] = opts.attribute;
			var nl = opts.carousel.num_slides;
			//try using index
			for (var i = 0; i<nl; i++) {
				attrib['a'+i] = opts.attribute;
				attrib['order'+i] = i;
				// tabs can't be indvidually styled
				attrib['tcls'+i] = opts.active_tab_class;
				// For carousel, menu items should be ordered the same as they appear on the screen
				var a = $('#'+opts.tab_container+' a:eq('+i+')');
				$(a).attr("title", i);
				$(a).click(function() {
					toggleShow($(this), $(this).attr('title'));
					return false;
				});
			}
		} else {	
			$.each(opts.tabs, function(i, itm) {
				attrib[itm.content_id] = (itm.attribute) ? itm.attribute : opts.attribute;
				attrib['tcls'+itm.content_id] = (itm.active_tab_class) ? itm.active_tab_class : opts.active_tab_class;
				attrib['attr'+itm.content_id] = $("#"+itm.content_id).css(attrib[itm.content_id]);
				//the tab_container option must be specified if itm.class_name is not
				var a = (itm.class_name) ? $('.'+itm.class_name) : $('#'+opts.tab_container+' a:eq('+i+')');
				//set initial tab for fade and width
				if ((attrib[itm.content_id] == 'width') || (attrib[itm.content_id] == 'fade')) {
					if (itm.selected) {
						toggleShow($(a), itm.content_id);
					}
				}
				$(a).click(function() {
					toggleShow($(this), itm.content_id);
					return false;
				});
			});
		}
	} 
	
	function toggleShow(b, cid) {
		btn = b;
		//opts.active_tab_class = (itm.active_tab_class) ? itm.active_tab_class : opts.active_tab_class;
		cntId = cid;
		if (opts.carousel) {
			showContent();
		} else {
			if (opts.queue) {
				if (selected) {
					hideContent(true);
				} else {
					showContent();
				}
			} else {
				hideContent(false);
				showContent();
			}
		}
	};
	
	function hideContent(callback) {
		if (attrib[selected] == 'fade') {
			if (callback) {
				$("#"+selected).fadeOut(opts.speed, showContent);
			} else {
				$("#"+selected).fadeOut(opts.speed);
			}
		} else if (attrib[selected] == 'slide') {
			if (callback) {
				$("#"+selected).slideUp(opts.speed, showContent);
			} else {
				$("#"+selected).slideUp(opts.speed);
			}
		} else {
			var attr = (attrib[selected] == 'height') ? {height: 0} : {width: 0};
			if (callback) {
				$("#"+selected).animate( attr, opts.speed, "linear", showContent);
			} else {
				$("#"+selected).animate( attr, opts.speed, "linear");
			}
		}
	};
	
	function showContent() {
		if (sel_class) {
			$("."+sel_class).removeClass(sel_class);
		}
		if ((selected) && (!opts.carousel)) {
			$("#"+selected).css('display', 'none');
		}
		if (selected == cntId) {
			selected = '';	
			$("."+sel_class).removeClass(sel_class);
			sel_class = '';
			//attrib = '';
		} else {
			if (attrib['tcls'+cntId] != '') { 
				btn.addClass(attrib['tcls'+cntId]);
			}	
			if (attrib[cntId] == 'fade') {
				$("#"+cntId).fadeIn(opts.speed);
			} else if (attrib[cntId] == "slide") {
				$("#"+cntId).slideDown(opts.speed);
			} else if (attrib['a'+cntId] == "marginLeft") {
				var dir = (parseInt(cnt_width)*cntId)+'px';
				$("#"+opts.carousel.slide_container).animate( {marginLeft : '-'+dir}, 'slow');
			} else {
				var wd = attrib['attr'+cntId];
				$("#"+cntId).css(attrib[cntId], '0px');
				var attr = (attrib[cntId] == 'height') ? {height: wd } : {width: wd };
				//$("#"+cntId).animate( attr, {queue: opts.queue, duration:opts.speed});
				$("#"+cntId).animate( attr, opts.speed);
			}	
			selected = cntId;
			sel_class = attrib['tcls'+cntId];
		}	
	};
	
};

$.tabberDisplay.defaults = {
	//element: 'a';//this value can be blank. It will be automatically set to "a"
	//active_tab_class: 'selected';//this value can be blank. It will be automatically set to "a.selected"
	tab_container: '',
	active_tab_class: '',
	tabs: '',
	attribute: 'slide',
	speed: 'slow',
	queue: true,
	mode: 'auto',
	carousel: ''
};

})(jQuery);	;
/*
*jQuery browser plugin detection 1.0.2
* http://plugins.jquery.com/project/jqplugin
* Checks for plugins / mimetypes supported in the browser extending the jQuery.browser object
* Copyright (c) 2008 Leonardo Rossetti motw.leo@gmail.com
* MIT License: http://www.opensource.org/licenses/mit-license.php
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
*/

(function($){if(typeof $.browser==="undefined"||!$.browser){var browser={};$.extend(browser);}var pluginList={flash:{activex:"ShockwaveFlash.ShockwaveFlash",plugin:/flash/gim},sl:{activex:["AgControl.AgControl"],plugin:/silverlight/gim},pdf:{activex:"PDF.PdfCtrl",plugin:/adobe\s?acrobat/gim},qtime:{activex:"QuickTime.QuickTime",plugin:/quicktime/gim},wmp:{activex:"WMPlayer.OCX",plugin:/(windows\smedia)|(Microsoft)/gim},shk:{activex:"SWCtl.SWCtl",plugin:/shockwave/gim},rp:{activex:"RealPlayer",plugin:/realplayer/gim},java:{activex:navigator.javaEnabled(),plugin:/java/gim}};var isSupported=function(p){if(window.ActiveXObject){try{new ActiveXObject(pluginList[p].activex);$.browser[p]=true;}catch(e){$.browser[p]=false;}}else{$.each(navigator.plugins,function(){if(this.name.match(pluginList[p].plugin)){$.browser[p]=true;return false;}else{$.browser[p]=false;}});}};$.each(pluginList,function(i,n){isSupported(i);});})(jQuery);;
// JavaScript Document
(function ($) {
	$(document).ready(function() {
		
		/*

		jQuery Skip-Nav by Scott Lenger and Paul Zumbrun
		http://beaconfire.com 

		This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

		This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.  

		You should have received a copy of the GNU Lesser General Public License along with this library; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  

		*/

		function skipNavigation(skipNavContainer) {
			var defaultHeight = $('#'+skipNavContainer).height(); // get default container height before this script minimizes the container
			closeSkipNavContainer(skipNavContainer); // minimize the container so that later we can slide it open
			skipNavTimeout = null;
	
			// if a link in the skip-nav container receives focus:
			// 1. apply class="active" to the container (class="active" should be set to 'visible' via CSS)
			// 2. slide open the container  
			// 3. apply class="nav-focused" to the linked element
			$('#'+skipNavContainer+' a').bind('focusin', function(event) {
				if ( !$('#'+skipNavContainer).hasClass('active') ) {
					$('#'+skipNavContainer).addClass('active');
					$('#'+skipNavContainer).animate({"height":defaultHeight},{duration:"medium"}); //
				}
				$(event.target).addClass('nav-focused');
			});
	
			// remove class 'nav-focused' if linked element loses focus
			$('#'+skipNavContainer+' a').bind('focusout', function(event) { // if skip nav link loses focus
				$(event.target).removeClass('nav-focused'); // remove 'nav-focused' class
		
				// if none of the links in the skip-nav container have class="nav-focused" run the function to hide the container
				if ( !skipNavTimeout ) { // if skipNavTimeout is not set
					skipNavTimeout = setTimeout( function() { // set timer
						if ( $('#'+skipNavContainer+' .nav-focused').length == 0 ) { // if 'nav-focused' is not found close container
							closeSkipNavContainer(skipNavContainer);
						}
						skipNavTimeout = null;
					}, 500 );
				}
		
			});

			// reduce container height to 1 px and remove class="active" (CSS should be set to hide container if class is absent)
			function closeSkipNavContainer(skipNavContainer) {
				$('#'+skipNavContainer).animate( {"height": '1px'}, 'medium', 'linear', function() { 
					$(this).removeClass('active');
				});
			}
		}
		
		$('body').addClass('js'); // adds class to body tag when JavaScript is enabled
		skipNavigation('skip-nav'); // send container id

		// end skip-nav //
		
		// prevent link behaviour for placeholder navs

		$('a.nolink').click(function(){
			return false;
		});

		// add a print button to accordion & expand accordions for printing -- no longer needed; found css solution: see print.css
		//$('h1.title').after('<p class="no-print">Select &amp; click a question to view the answer.</p><p class="no-print"><a href="#" class="print button"><span class="print">Print this page</span></a> <em>(Please don&rsquo;t use your browser&rsquo;s print button.)</em></p><hr class="clear" />');
		//$('a.print').click(function(){
		//	$('.ui-accordion-content').show();
		//	$('.ui-state-active').addClass('ui-state-default').removeClass('ui-state-active');
		//	print(document);
		//	$('.ui-accordion-content').hide();
		//});
		
		// remove link action from placeholder links
		$('a.nolink').live('click', function(event){
			event.preventDefault();
		});

/*
Trent Sterling 3-10-09 (Updated 5-18-09)
Modified by Chris Zähller

Add a span over the first 5 words in a paragraphgraph tag!

-Added JQuery support.
-Removed old loader.
*/

		$(function() {
			changeCaps();
		});

		function changeCaps() {
			var paragraphlist = $('div.scaps, .scaps div, .scaps div section, .scaps div article, .scaps div blockquote, .scaps div cite, div.ui-accordion-content > div > div, .scaps > div > div > div, .scaps > div > div, .scaps > div').children('p'); // note changes for Drupal 7 Zentropy theme
			for (var i = 0; i < paragraphlist.length; i++) {
				var paragraph = paragraphlist[i];
				var splitstring = paragraph.innerHTML.split(" ");
				var newstring = "<span class=\"caps\">"
				var tagcount = 0;
				var classname = paragraph.className;
				for (var k = 0; k < splitstring.length; k++) {
					newstring += splitstring[k]
					if (k == 4) {
						newstring += "</span>"
					}
					if (k < 5) {
						if (splitstring[k].search("<") != -1) {
							if (splitstring[k].search("</") != -1) {
								tagcount = tagcount - 1;
							} else
							{
								tagcount = tagcount + 1;
							}
						}
					}
					newstring += " "
				}
				if (tagcount == 0 && classname !== "normal") {
					$(paragraph).html(newstring);
				}
			}
		} // end changeCaps
		//initialize tabbed dropdown
	$(function(){
			$("#about-tab").imAnimTabber({
				tab_container: 'tab_cntnr',
				active_tab_class: 'selected',
				//don't need to set attribute option - 'slide is the default
				//attribute: 'slide',
				tabs: [{"caption": "About Me", "content_id": "about"}],
				speed: 1500
			});
		});
	$('a.activate-about').click(function(){	// add an event listener so we can trigger imAnimTabber on custom elements
			$("div#tab_cntnr a").trigger('click');
			$('html, body').animate({scrollTop: '0px'}, 800);
			return false;
		});// end imAnimTabber
		//intialize pull-quotes
	$('span.pqr').each(function(index) { 
		var $parentParagraph = $(this).parent('p'); 
		$(this).clone() 
		  .addClass('pulled-right')
		  .insertBefore($parentParagraph); 
	  }); 
	$('span.pulled-right').each(function(index) { 
		$(this).wrap('<blockquote><p></p></blockquote>');
		$(this).parent('p').parent('blockquote').addClass('pulled-right');
	});
	$('span.pql').each(function(index) { 
		var $parentParagraph = $(this).parent('p'); 
		$(this).clone() 
		  .addClass('pulled-left')
		  .insertBefore($parentParagraph); 
	  }); 
	$('span.pulled-left').each(function(index) { 
		$(this).wrap('<blockquote><p></p></blockquote>');
		$(this).parent('p').parent.parent('blockquote').addClass('pulled-left');
	  });// end pull-quotes
	//check for Flash plugin
	$('#noflash').hide();  
	if ($.browser.flash == false)  
 		$('#noflash').show ();//end Flash detection  
	});
})(jQuery);;

