// remap jQuery to $
(function($){
// Meaningless 'if' statements allow code-folding in editors
if (true) {
  // Recreate $.post with 'error' callback
  $.post = function( url, data, callback, type ) {
		if ( jQuery.isFunction( data ) || (data != null && (jQuery.isFunction( data.success ) || jQuery.isFunction( data.error ))) ) {
			type = type || callback;
      callback = data;
			data = {};
		}
    settings = {
			type: "POST",
			url: url,
			data: data,
			dataType: type
		};
    if ( jQuery.isFunction( callback ) ) {
      settings.success = callback;
    } else {
      if ( jQuery.isFunction( callback.success ) ) {
        settings.success = callback.success;
      }
      if ( jQuery.isFunction( callback.error ) ) {
        settings.error = callback.error;
      }
    }

		return jQuery.ajax(settings);
	}
  // Recreate $.get with 'error' callback
  $.get = function( url, data, callback, type ) {
		if ( jQuery.isFunction( data ) || (data != null && (jQuery.isFunction( data.success ) || jQuery.isFunction( data.error ))) ) {
			type = type || callback;
      callback = data;
			data = null;
		}
    settings = {
			type: "GET",
			url: url,
			data: data,
			dataType: type
		};
    if ( jQuery.isFunction( callback ) ) {
      settings.success = callback;
    } else {
      if ( jQuery.isFunction( callback.success ) ) {
        settings.success = callback.success;
      }
      if ( jQuery.isFunction( callback.error ) ) {
        settings.error = callback.error;
      }
    }

		return jQuery.ajax(settings);
  };

  // Create missing postJSON function
  $.postJSON = function(url, data, callback) {

    // Force disable jQuery cache setting
    var cache = jQuery.ajaxSettings.cache; jQuery.ajaxSettings.cache = false;

    $.post(url, data, callback, "json");

    // Restore jQuery caching setting
    jQuery.ajaxSettings.cache = cache;
  };
}
// Menu
if (true) {
	// Superfish 1.4.8 minified, with slight modification to hideSuperfishUl
  $.fn.superfish=function(k){var g=$.fn.superfish,j=g.c,f=$(['<span class="',j.arrowClass,'"> &#187;</span>'].join("")),i=function(){var c=$(this),l=d(c);clearTimeout(l.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()},e=function(){var c=$(this),m=d(c),l=g.op;clearTimeout(m.sfTimer);m.sfTimer=setTimeout(function(){l.retainPath=($.inArray(c[0],l.$path)>-1);c.hideSuperfishUl();if(l.$path.length&&c.parents(["li.",l.hoverClass].join("")).length<1){i.call(l.$path)}},l.delay)},d=function(c){var l=c.parents(["ul.",j.menuClass,":first"].join(""))[0];g.op=g.o[l.serial];return l},h=function(c){c.addClass(j.anchorClass).append(f.clone())};return this.each(function(){var c=this.serial=g.o.length;var m=$.extend({},g.defaults,k);m.$path=$("li."+m.pathClass,this).slice(0,m.pathLevels).each(function(){$(this).addClass([m.hoverClass,j.bcClass].join(" ")).filter("li:has(ul)").removeClass(m.pathClass)});g.o[c]=g.op=m;$("li:has(ul)",this)[($.fn.hoverIntent&&!m.disableHI)?"hoverIntent":"hover"](i,e).each(function(){if(m.autoArrows){h($(">a:first-child",this))}}).not("."+j.bcClass).hideSuperfishUl();var l=$("a",this);l.each(function(n){var o=l.eq(n).parents("li");l.eq(n).focus(function(){i.call(o)}).blur(function(){e.call(o)})});m.onInit.call(this)}).each(function(){var c=[j.menuClass];if(g.op.dropShadows&&!($.browser.msie&&$.browser.version<7)){c.push(j.shadowClass)}$(this).addClass(c.join(" "))})};var a=$.fn.superfish;a.o=[];a.op={};a.IE7fix=function(){var c=a.op;if($.browser.msie&&$.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined){this.toggleClass(a.c.shadowClass+"-off")}};a.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};a.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var e=a.op,d=(e.retainPath===true)?e.$path:"";e.retainPath=false;var c=$(["li.",e.hoverClass].join(""),this).add(this).not(d).removeClass(e.hoverClass).find(">ul");if (!c.hasClass('sfIgnore')) {c.hide().css("visibility","hidden");e.onHide.call(c);}return this},showSuperfishUl:function(){var e=a.op,d=a.c.shadowClass+"-off",c=this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible");a.IE7fix.call(c);e.onBeforeShow.call(c);c.animate(e.animation,e.speed,function(){a.IE7fix.call(c);e.onShow.call(c)});return this}});
  // Supersubs
  $.fn.supersubs=function(a){var b=$.extend({},$.fn.supersubs.defaults,a);return this.each(function(){var c=$(this);var d=$.meta?$.extend({},b,c.data()):b;var e=$('<li id="menu-fontsize">&#8212;</li>').css({padding:0,position:"absolute",top:"-999em",width:"auto"}).appendTo(c).width();$("#menu-fontsize").remove();$ULs=c.find("ul");$ULs.each(function(k){var j=$ULs.eq(k);var h=j.children();var f=h.children("a");var l=h.css("white-space","nowrap").css("float");var g=j.add(h).add(f).css({"float":"none",width:"auto"}).end().end()[0].clientWidth/e;g+=d.extraWidth;if(g>d.maxWidth){g=d.maxWidth}else{if(g<d.minWidth){g=d.minWidth}}g+="em";j.css("width",g);h.css({"float":l,width:"100%","white-space":"normal"}).each(function(){var m=$(">ul",this);var i=m.css("left")!==undefined?"left":"right";m.css(i,g)})})})};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0};
}
// Other plugins
if (true) {
  // jquery.cookie
  $.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("");return true}else{var d=null;if(document.cookie&&document.cookie!==""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=$.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};
  // this is a small helper extension i stole from
  // http://www.texotela.co.uk/code/jquery/reverse/
  // it merely reverses the order of a jQuery set.
  // Used to restore order of elements removed by prevAll
  $.fn.reverse = function() { return this.pushStack(this.get().reverse(), arguments); };
  // jQuery :data selector
  (function(a){var b=function(c){return typeof c==="undefined"};a.expr[":"].data=function(e,c,f){if(b(e)||b(f)){return false}var l=f[3];if(!l){return false}var k=l.split("=");var m=k[0].charAt(k[0].length-1);if(m=="^"||m=="$"||m=="!"||m=="*"){k[0]=k[0].substring(0,k[0].length-1);if(!a.stringQuery&&m!="!"){return false}}else{m="="}var d=k[0];var j=d.split(".");var h=a(e).data(j[0]);if(b(h)){return false}if(j[1]){for(i=1,x=j.length;i<x;i++){h=h[j[i]];if(b(h)){return false}}}if(k[1]){var g=(h+"");switch(m){case"=":return g==k[1];break;case"!":return g!=k[1];break;case"^":return a.stringQuery.startsWith(g,k[1]);break;case"$":return a.stringQuery.endsWith(g,k[1]);break;case"*":return a.stringQuery.contains(g,k[1]);break;default:return false;break}}else{return true}}})(jQuery);
  // jquery url parser
  jQuery.url=function(){var e={};var b={};var d={url:window.location,strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var c=function(){str=decodeURI(d.url);var j=d.parser[d.strictMode?"strict":"loose"].exec(str);var l={};var k=14;while(k--){l[d.key[k]]=j[k]||""}l[d.q.name]={};l[d.key[12]].replace(d.q.parser,function(m,i,n){if(i){l[d.q.name][i]=n}});return l};var f=function(i){if(!b.length){a()}if(i=="base"){if(b.port!==null&&b.port!==""){return b.protocol+"://"+b.host+":"+b.port+"/"}else{return b.protocol+"://"+b.host+"/"}}return(b[i]==="")?null:b[i]};var h=function(i){if(!b.length){a()}return(b.queryKey[i]===null)?null:b.queryKey[i]};var a=function(){b=c();g()};var g=function(){var i=b.path;e=[];e=b.path.length==1?{}:(i.charAt(i.length-1)=="/"?i.substring(1,i.length-1):path=i.substring(1)).split("/")};return{setMode:function(i){strictMode=i=="strict"?true:false;return this},setUrl:function(i){d.url=i===undefined?window.location:i;a();return this},segment:function(i){if(!b.length){a()}if(i===undefined){return e.length}return(e[i]===""||e[i]===undefined)?null:e[i]},attr:f,param:h}}();
}
/* jquery slides plugin
 */
if (true) {
/*
 * Slides, A Slideshow Plugin for jQuery
 * Intructions: http://slidesjs.com
 * By: Nathan Searles, http://nathansearles.com
 * Version: 1.1.9
 * Updated: September 5th, 2011
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
(function(a){a.fn.slides=function(b){return b=a.extend({},a.fn.slides.option,b),this.each(function(){function w(g,h,i){if(!p&&o){p=!0,b.animationStart(n+1);switch(g){case"next":l=n,k=n+1,k=e===k?0:k,r=f*2,g=-f*2,n=k;break;case"prev":l=n,k=n-1,k=k===-1?e-1:k,r=0,g=0,n=k;break;case"pagination":k=parseInt(i,10),l=a("."+b.paginationClass+" li."+b.currentClass+" a",c).attr("href").match("[^#/]+$"),k>l?(r=f*2,g=-f*2):(r=0,g=0),n=k}h==="fade"?b.crossfade?d.children(":eq("+k+")",c).css({zIndex:10}).fadeIn(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1)}):d.children(":eq("+l+")",c).fadeOut(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing)}):d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing,function(){a.browser.msie&&a(this).get(0).style.removeAttribute("filter")}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+k+")").css({left:r,display:"block"}),b.autoHeight?d.animate({left:g,height:d.children(":eq("+k+")").outerHeight()},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1}):d.animate({left:g},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1})),b.pagination&&(a("."+b.paginationClass+" li."+b.currentClass,c).removeClass(b.currentClass),a("."+b.paginationClass+" li:eq("+k+")",c).addClass(b.currentClass))}}function x(){clearInterval(c.data("interval"))}function y(){b.pause?(clearTimeout(c.data("pause")),clearInterval(c.data("interval")),u=setTimeout(function(){clearTimeout(c.data("pause")),v=setInterval(function(){w("next",i)},b.play),c.data("interval",v)},b.pause),c.data("pause",u)):x()}a("."+b.container,a(this)).children().wrapAll('<div class="slides_control"/>');var c=a(this),d=a(".slides_control",c),e=d.children().size(),f=d.children().outerWidth(),g=d.children().outerHeight(),h=b.start-1,i=b.effect.indexOf(",")<0?b.effect:b.effect.replace(" ","").split(",")[0],j=b.effect.indexOf(",")<0?i:b.effect.replace(" ","").split(",")[1],k=0,l=0,m=0,n=0,o,p,q,r,s,t,u,v;if(e<2)return a("."+b.container,a(this)).fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()}),a("."+b.next+", ."+b.prev).fadeOut(0),!1;if(e<2)return;h<0&&(h=0),h>e&&(h=e-1),b.start&&(n=h),b.randomize&&d.randomize(),a("."+b.container,c).css({overflow:"hidden",position:"relative"}),d.children().css({position:"absolute",top:0,left:d.children().outerWidth(),zIndex:0,display:"none"}),d.css({position:"relative",width:f*3,height:g,left:-f}),a("."+b.container,c).css({display:"block"}),b.autoHeight&&(d.children().css({height:"auto"}),d.animate({height:d.children(":eq("+h+")").outerHeight()},b.autoHeightSpeed));if(b.preload&&d.find("img:eq("+h+")").length){a("."+b.container,c).css({background:"url("+b.preloadImage+") no-repeat 50% 50%"});var z=d.find("img:eq("+h+")").attr("src")+"?"+(new Date).getTime();a("img",c).parent().attr("class")!="slides_control"?t=d.children(":eq(0)")[0].tagName.toLowerCase():t=d.find("img:eq("+h+")"),d.find("img:eq("+h+")").attr("src",z).load(function(){d.find(t+":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){a(this).css({zIndex:5}),a("."+b.container,c).css({background:""}),o=!0,b.slidesLoaded()})})}else d.children(":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()});b.bigTarget&&(d.children().css({cursor:"pointer"}),d.children().click(function(){return w("next",i),!1})),b.hoverPause&&b.play&&(d.bind("mouseover",function(){x()}),d.bind("mouseleave",function(){y()})),b.generateNextPrev&&(a("."+b.container,c).after('<a href="#" class="'+b.prev+'">Prev</a>'),a("."+b.prev,c).after('<a href="#" class="'+b.next+'">Next</a>')),a("."+b.next,c).click(function(a){a.preventDefault(),b.play&&y(),w("next",i)}),a("."+b.prev,c).click(function(a){a.preventDefault(),b.play&&y(),w("prev",i)}),b.generatePagination?(b.prependPagination?c.prepend("<ul class="+b.paginationClass+"></ul>"):c.append("<ul class="+b.paginationClass+"></ul>"),d.children().each(function(){a("."+b.paginationClass,c).append('<li><a href="#'+m+'">'+(m+1)+"</a></li>"),m++})):a("."+b.paginationClass+" li a",c).each(function(){a(this).attr("href","#"+m),m++}),a("."+b.paginationClass+" li:eq("+h+")",c).addClass(b.currentClass),a("."+b.paginationClass+" li a",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$"),n!=q&&w("pagination",j,q),!1}),a("a.link",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$")-1,n!=q&&w("pagination",j,q),!1}),b.play&&(v=setInterval(function(){w("next",i)},b.play),c.data("interval",v))})},a.fn.slides.option={preload:!1,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:!1,next:"next",prev:"prev",pagination:!0,generatePagination:!0,prependPagination:!1,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:!1,randomize:!1,play:0,pause:0,hoverPause:!1,autoHeight:!1,autoHeightSpeed:350,bigTarget:!1,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}},a.fn.randomize=function(b){function c(){return Math.round(Math.random())-.5}return a(this).each(function(){var d=a(this),e=d.children(),f=e.length;if(f>1){e.hide();var g=[];for(i=0;i<f;i++)g[g.length]=i;g=g.sort(c),a.each(g,function(a,c){var f=e.eq(c),g=f.clone(!0);g.show().appendTo(d),b!==undefined&&b(f,g),f.remove()})}})}})(jQuery);
}
// jQuery 'document ready'
$(function() {

  // Video
  $('video,audio').mediaelementplayer(/* Options */);

  // Primary Navigation
  var priNav = $('<ul class="sf-menu">').appendTo($('#primary-nav')),
      secNav = $('#sidenav > ul > li'); //console.log($('#sidenav > ul'));
  priNav.superfish({
    delay: 400,
    animation: {height:'show'},
    autoArrows: false
  });

  // Sidenav traversing/highlighting
  var segs = $.url.segment(), bcrumb = [];
	for(var i=0;i<segs;i++) {
		tmpstr = $.url.segment(i);
		//$('a[href$='+(tmpstr.replace(/\.php/,''))+'.php]','#LeftMenu').next('ul').addClass('active');
		//var el = $('a[href$='+(tmpstr.replace(/\.html/,''))+'.html]','#sidenav > ul');
		//var el = $("a[href$='"+(tmpstr)+"']",'#sidenav > ul');
		var el = $("a[href$='"+(tmpstr.replace(/\.html/,''))+".html']",'#sidenav > ul');

    if (el.length > 0) {
      bcrumb.push(el);
      el.parent('li').addClass('selected');
    }
	}
	$("a[href$='"+$.url.segment(segs-1)+"']",'#sidenav > ul').addClass('current');

  // Breadcrumb
  if ($('#bcrumb').length > 0 ) {
	  var bcrumbCont = $('#bcrumb').empty().append('<a href="/" title="Home">Home</a>');
	  if (bcrumb.length > 0) {
	    for (i=0;i<bcrumb.length;i++){
	      var lnk = $(bcrumb[i]).clone();
	      $('#bcrumb').append(' // ').append(lnk);
	      if (lnk.attr('title') && lnk.attr('title') != '') {
	        lnk.text(lnk.attr('title'));
	      }
	    }
	  }
	  // Ensure last element in breadcrumb is not a link, but the h1 title/text for this page
	  var h1 = $('#content h1:first'),
	      h1txt = h1.attr('title') || h1.text(),
	      bcLast = $('#bcrumb a:last');
	  if (bcLast.text() == 'Home' || bcLast[0].href.replace(/(\/|\/index.htm|\/index.html)$/,'') != $.url.attr('source').replace(/(\/|\/index.htm|\/index.html)$/,'')) {
	    $('#bcrumb').append(' // <b>'+h1txt+'</b>');
	  } else {
	    bcLast.replaceWith('<b>'+h1txt+'</b>');
	  }
  }

// Enable email addressing with special formatting
$('a[href^=mailto]').each(function(){
        $(this).attr('href',$(this).attr('href').replace(/(.*?) at \[(.*?) dot (.*?)\]/,'$1@$2.$3'));
      });

  // Implement HTML5 form placeholder functionality
  function html5forms(){var a=$("input,select").not(":data(html5-checked)");if(a.length>0){if(!Modernizr.input.placeholder){var b=a.filter("[placeholder]");if(b.length>0){b.focus(function(){var c=$(this);if(c.val()==c.attr("placeholder")){c.val("").removeClass("placeholder")}}).blur(function(){var c=$(this);if(c.val()==""||c.val()==c.attr("placeholder")){c.addClass("placeholder").val(c.attr("placeholder"))}}).blur();b.parents("form").submit(function(){$(this).find("[placeholder]").each(function(){var c=$(this);if(c.val()==c.attr("placeholder")){c.val("")}})})}}}a.data("html5-checked",true)}
  html5forms();

  // Homepage slideshow, etc.
  if ($('#slideshow-homepage').length > 0) {
    // Homepage slideshow - replace unordered list with divs (slides requiers this structure)
    var slideshow = $('<div id="slider"><div class="slides_container"/></div>');
    $('#slider li').each(function(){
      $('div.slides_container',slideshow).append('<div class="slide">'+$(this).html()+'</div>');
    });
    $("#slider").replaceWith(
      slideshow.slides({
        generateNextPrev: true, // Not used directly, but targeted
        generatePagination: true,
        effect: 'fade',
        crossfade: true,
        play: 5000,
        pause: 2500,
        hoverPause: true
      })
    );
    // Use our own prev/next buttons, but trigger click on slider's
    $('#slideshow-homepage a.bNext').click(function(e){
      e.preventDefault();
      $('.next',slideshow).trigger('click');
      $(this).blur();
    });
    $('#slideshow-homepage a.bPrev').click(function(e){
      e.preventDefault();
      $('.prev',slideshow).trigger('click');
      $(this).blur();
    });
    // News ticker slideshow - replace unordered list with divs (slides requiers this structure)
    var ticker = $('<div class="news-ticker-slides"><div class="slides_container"/></div>');
    $('#news-ticker li').each(function(){
      $('div.slides_container',ticker).append('<div class="slide">'+$(this).html()+'</div>');
    });
    $("#news-ticker nav").replaceWith(
      ticker.slides({
        generatePagination: false,
        effect: 'fade',
        crossfade: false,
        play: 3000,
        pause: 10,
        hoverPause: true
      })
    );

    // Jobs ticker slideshow - replace unordered list with divs (slides requiers this structure)
    var jobs = $('<div class="opportunity-ticker-slides"><div class="slides_container"/></div>');
    $('#opportunity-alert li').each(function(){
      $('div.slides_container',jobs).append('<div class="slide jobswidth clear">'+$(this).html()+'</div>');
    });
    $("#opportunity-alert nav").replaceWith(
      jobs.slides({
        generatePagination: false,
        effect: 'fade',
        crossfade: false,
        play: 3000,
        pause: 10,
        hoverPause: true
      })
    );


  }


  // RSS feed
  if ($('#rss_main').length > 0) {
    $('#rss_main').empty().css({
      height:'300px',
      background:'transparent url(/css/img/ajax-loader.gif) no-repeat 50% 50%'
    });
    $.ajax({
      dataType: 'jsonp',
      jsonp: 'jsonp_callback',
      url: 'http://media.utahhospitals.org/feed/?a=legislature',
      success: function (data) {
        console.log(data);
        $('#rss_main').removeAttr('style').html(data.results);
      },
      error: function(){
        $('#rss_main').removeAttr('style').html('<p>Sorry, there was an error retrieving the latest feed updates. Try again later.</p>');
      }
    });
  }

  // IMPORTANT --> jQuery trackPageview: records all outbound links with Google Analytics
  $('a[href^="http"]').not('a[href*="'+document.domain+'"]').click(function () {
    _gaq.push(['_trackPageview', '/outgoing/'+ $(this).attr('href')]);
  });


  // Relocate content from main editor to the side column
  if ($('#sidebar').length > 0 && $('#jumplist').length > 0) {
    	$('#jumplist').appendTo('#sidebar');
  }

  // IMPORTANT --> jQuery trackPageview: records all outbound links with Google Analytics
  $('a[href^="http"]').not('a[href*="'+document.domain+'"]').click(function () {
    _gaq.push(['_trackPageview', '/outgoing/'+ $(this).attr('href')]);
  });


}); // End jQuery 'document ready'
})(this.jQuery);

