﻿jQuery.fn.extend({
  highlight: function( search, insensitive ){
    var regex = new RegExp("(<[^>]*>)|(\\b"+ search.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1") +")", insensitive ? "ig" : "g");
    return this.html(this.html().replace(regex, function(a, b, c){
      return (a.charAt(0) == "<") ? a : "<strong class=\"blackonwhite\">black<span>on</span>white</strong>";
    }));
  }
});
jQuery(document).ready(function($){
  $("#contentWrapper").highlight("blackonwhite", 1 );
  $("#content li").wrapInner("<span></span>");
  $('#fadeBanner').innerfade({ animationtype: 'fade', speed: 'normal', timeout: '6000', type: 'sequence', containerheight: 'auto' }); 
});
