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).find(".breadcrumb-title").wrapInner('<a href="'+$(this).attr('class')+'"></a>');
			}
		});
		
		// fix forms
		$(".siteForm").attr("name", d+$(".siteForm").attr("name"));
		
		stripeTable();
		
		//slider
		$("#login_tab").click(function () {
			$("#login_slide").slideToggle("slow");
			//$("#login_slide input:text:visible:enabled:first").focus();
		});
		
		$('label.over').labelOver('over-do-it');
		
		$('input:text, input:password').addClass("text");

	});
}
jQuery.preloadImages = function() {
  for(var i = 0; i<arguments.length; i++) {
    jQuery("<img>").attr("src", domainRef+arguments[i]);
  }
}
function stripeTable() {
	// works backwards because the index of the first row is 0. :) nice
	$("table.stripe tr:even").addClass("odd");
	$("table.stripe tr:odd").addClass("even");
}