$(document).ready(
	function() {
		lastClassAdd(); 
		//figureHeight();
		columnEqualizer();
		$("#item").tabs();
		$("#monogram-info-tabs").tabs();
		zebraStripes();
		ie6Check();
	}
);

function columnEqualizer(){
	var leftColHeight;
	var rightColHeight;
	var wrapperHeight;

	wrapperHeight = $('#content-wrapper').outerHeight();
	leftColHeight = $('#left-rail').outerHeight();
	rightColHeight = $('#content').outerHeight();
	
	$('#left-rail').height(wrapperHeight);
	$('#content').height(wrapperHeight - 54);
	/*
	if (rightColHeight > leftColHeight){
		x = window.location.href;
		z = x.search("item=");
		
		if (z != -1){
			$('#left-rail').height(rightColHeight - 108);
				leftColHeight = rightColHeight - 183;
				//console.log("left col: " + leftColHeight);
				//console.log("right col: " + $('#content').height());				
				}else{
			$('#left-rail').height(rightColHeight);
		}
	}else{
		$('#content').height(leftColHeight);
	}
	*/
}

function zebraStripes(){
	$("tr:even").addClass("even");
}


function figureHeight(){
	content = $(".category-preview");
	
	if (content.length == 0){
		content_height = 875;
	}else{
		content_height = content.height() * content.length;
	}
	
	$("#content").height(content_height);
}

function lastClassAdd(){
	$("li:last-child", ".category-preview > ul").addClass("last");		
}

function ie6Check(){

    if (jQuery.browser.msie) {
        if (parseInt(jQuery.browser.version) == "6"){
            $("#site-head").html('<img src="/images/ie6logo.jpg" />');
            $("#site-body").html('<p class="ie6-msg">The Stella &amp; Bean website is not optomized to be viewed in this browser.  You can go <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx">here</a> to upgrade your browser.</p>');
            
            $("#site-body").css({
            'background':'none',
            'border':'none',
            'font-size':'1.2em',
            'text-align':'center',
            'padding=top':'20px',
            'padding-bottom':'20px'
            });
        }
    }
}



