function expandDomain(el) {
	var domain = document.domain.split('.')[1];
	$(el).html($(el).html().replace(/{domain}/gi,domain).replace(/deepcovelabs/gi,domain));
};
$(document).ready(function () {
	// reset table widths
	$('table').css('width','auto');
	$('th,td').removeAttr('width').removeAttr('valign').css('width','');
	// add table striping and ruler
	$('table tr:even').addClass('alt');
	$('table tr').mouseover(function() {
	  $(this).addClass('over');
	});
	$('table tr').mouseout(function() {
	  $(this).removeClass('over');
	});
	// replace {domain} with the value of current domain inside <p> and <pre>
	$('p,pre,code,span').each(function(i){expandDomain($(this))});
	// add named anchors in front of every h1, h2 and h3
	$('.post>h1:not(.noanchor),.post>h2:not(.noanchor),.post>h3:not(.noanchor)').each(function(i){
	  var lower = jQuery.trim($(this).text().toLowerCase());
	  var wodashes = lower.replace(/[^a-z0-9]+/g,'');
	  var withdashes = lower.replace(/[^a-z0-9 /-]+/g,'').replace(/ /gi,'-');
	  $(this).before('<a name="' + wodashes + '"/>');
	  if (wodashes == withdashes) {} else {
 	    $(this).before('<a name="' + withdashes + '"/>');
	  };
	});
	// if there's a hash, let's visit it; this helps with timing issues for hashes that we dynamically generate in the step above
	if (window.location.hash == '') {} else {
	  window.location.hash = window.location.hash;
	};
	// remove breadcrumbs from the home page
	if ($('body').hasClass('home')) {
	  // $('div.breadcrumbs').empty().prepend('&nbsp;');
	  $('div.breadcrumbs').remove();
	  $('h1.page-title').remove();
	};
});
