this.imagePreview = function(){	
	xOffset = 10;
	yOffset = 30;
	$("img.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "" + this.t : "";
		$("body").append("<span id='preview' style='text-align:center;'>"+ c +"<br><br><img src='"+ this.src +"' alt='Image preview' /><br><br></span>");								 
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#preview").remove();
    });	
	$("a.preview").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});
};
function resexpPane() {
	var h = $(window).height();
	$("#sc_expPane").css("height", h - 220 + "px");
}
$(document).ready(function(){
	//imagePreview();
	$("#sc_expPane").mouseover(function(e){
		$("#sc_expPane").addClass("sc_scrl");
	});
	$("#sc_expPane").mouseout(function(e){
		$("#sc_expPane").removeClass("sc_scrl");
	});
	$("#hdim").click(function(e){
		if ($("#ddim").hasClass("sb_to")) {
			$("#ddim").removeClass("sb_to").addClass("sb_tc");
		} else {
			$("#ddim").removeClass("sb_tc").addClass("sb_to");
		}
	});
	$("#haspect").click(function(e){
		if ($("#daspect").hasClass("sb_to")) {
			$("#daspect").removeClass("sb_to").addClass("sb_tc");
		} else {
			$("#daspect").removeClass("sb_tc").addClass("sb_to");
		}
	});
	$("#hcolor").click(function(e){
		if ($("#dcolor").hasClass("sb_to")) {
			$("#dcolor").removeClass("sb_to").addClass("sb_tc");
		} else {
			$("#dcolor").removeClass("sb_tc").addClass("sb_to");
		}
	});
	$("#hphoto").click(function(e){
		if ($("#dphoto").hasClass("sb_to")) {
			$("#dphoto").removeClass("sb_to").addClass("sb_tc");
		} else {
			$("#dphoto").removeClass("sb_tc").addClass("sb_to");
		}
	});
	$("#hface").click(function(e){
		if ($("#dface").hasClass("sb_to")) {
			$("#dface").removeClass("sb_to").addClass("sb_tc");
		} else {
			$("#dface").removeClass("sb_tc").addClass("sb_to");
		}
	});
	resexpPane();
	$(window).resize(resexpPane);
});