(function($) {
	$(function() { //on DOM ready
		var leftColWidth = $("#left").width();
		if (!($.browser.msie && parseInt($.browser.version) <= 6)) {
			var bodyHeight = $("#body").height();
			// find the height of "threeColumns"
			var colHeight = $("#threeColumns").height();
			// set the height of "scroller"
			$("#scroller").height(bodyHeight - colHeight - 10);
			// set the width of the content wrapper
			$(".glidecontentwrapper").width(leftColWidth - 70);
			$(".glidecontent").width(leftColWidth - 75);
			// find all the glidecontent boxes
			var biggestHeight = 0;
			jQuery.each($(".glidecontent"), function() {
				var thisHeight = $(this).height();
				if (thisHeight > biggestHeight) {
					biggestHeight = thisHeight;
				}
			});
			// get the height of the right column
			var rightHeight = $("#right").height();
			// get the height of "threeColumns"
			var colHeight = $("#threeColumns").height();
			if (biggestHeight + colHeight < rightHeight) {
				biggestHeight = rightHeight - colHeight;
			}
			$("#scroller").height(biggestHeight);
			// $(".glidecontentwrapper").height(biggestHeight + 10);
			$(".glidecontent").height(biggestHeight);
		} else {
			// We're putting IE6 and less in a table and well, IE6 and less suck more than 7 and up, so we need to do things a little different
			$(".glidecontentwrapper").width(leftColWidth - 130);
			$(".glidecontent").width(leftColWidth - 130);
		}
		featuredcontentglider.init({
			gliderid: "scrollcontents", //ID of main glider container
			contentclass: "glidecontent", //Shared CSS class name of each glider content
			togglerid: "p-select", //ID of toggler container
			remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
			selected: 0, //Default selected content index (0=1st)
			persiststate: true, //Remember last content shown within browser session (true/false)?
			speed: 500, //Glide animation duration (in milliseconds)
			direction: "leftright", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
			autorotate: true, //Auto rotate contents (true/false)?
			autorotateconfig: [10000, 0] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
		})
	});
})(jQuery);