var domain ='';
var domainRef ='';
function init(d, dr) {
	domain = d;
	domainRef = dr;
	$(document).ready(function(){
		// fix breadcrumbs
		$("#breadcrumbs li:last").removeAttr('class');
		$("#breadcrumbs li").each(function(){
			if ($(this).attr('class')) {
				$(this).wrapInner('<a href="'+$(this).attr('class')+'"></a>');
			}
		});
		stripeTable()
		
		// main menu hover effect
		$("#topmenu a img").hover(
			function(){
				$(this).attr("src", $(this).attr("src").replace(/\.gif/, '-o.gif'));
			},
			function(){
				$(this).attr("src", $(this).attr("src").replace(/\-o\.gif/, '.gif'));
			}
		);
		$.preloadImages(
			'images/layout/menu_home.gif',
			'images/layout/menu_services.gif',
			'images/layout/menu_specials.gif',
			'images/layout/menu_contact.gif',
			'images/layout/menu_links.gif'
		);
	});
}
jQuery.preloadImages = function() {
  for(var i = 0; i<arguments.length; i++) {
    jQuery("<img>").attr("src", domainRef+arguments[i]);
  }
}
function stripeTable() {
	$("table.stripe tr:even").addClass("even");
	$("table.stripe tr:odd").addClass("odd");
}