
var modeConfig = {
	"def" : {
		"suffix" : ".gif",
		"s" : {
			imgPath : "/images/common/number/shinkyu-",
			scale : { width : 12, height : 22 }
		},
		
		"j" : {
			imgPath : "/images/common/number/judo-",
			scale : { width : 12, height : 22 }
		}
	},
	
	"detail" : {
		"suffix" : "-l.gif",
		"s" : {
			imgPath : "/images/common/number/shinkyu-",
			scale : { width : 20, height : 30 }
		},
		
		"j" : {
			imgPath : "/images/common/number/judo-",
			scale : { width : 20, height : 30 }
		}
	}
}
	
$(function(){
	
	var $target = $("span.numContainer");
	var parentMode = "def";
	if($("body").hasClass("interviewDetail")) parentMode = "detail";
	
	$target.each(function(){
		
		var key = $(this).attr("class");
		key = $.trim(key.replace("numContainer", ""));
		
		var mode = key.substr(0, 1);
		var modeInfo = modeConfig[parentMode][mode];
		var numSrc = key.slice(1);
		$(this).empty();
		for(var i = 0; i < numSrc.length; i++){
			var numStr = numSrc.substring(i, i+1);
			var $img = $("<img>");
			$img.attr("src", modeInfo.imgPath + numStr + modeConfig[parentMode].suffix);
			$img.attr("width", modeInfo.scale.width);
			$img.attr("height", modeInfo.scale.height);
			
			$(this).append($img);
		}
		
	});
	

})
