if(!ist) { var ist = []; }

/* --------------------------------------------------
	LOAD FUNCTION
-------------------------------------------------- */
(function($){
$(function(){
	ist.putUtilSwf('ContentsWrapper');
	$('a[href^="#"],area[href^="#"]').filter(function (i) {
		return $(this).parents('.tabTitle').length == 0;
	}).scrollFor();
});
$(window).load(function(){
	ist.alignBoxes();
});
})($jq['base']);


/* --------------------------------------------------
	ALIGN BOXES HEIGHT
-------------------------------------------------- */
ist.alignBoxesSetting = function(wrapStr, boxStr){(function($){
	$(wrapStr).each(function(){
		var maxHeight = 0;
		var alignBox = $(this).find(boxStr);
		if($.browser.msie && Number($.browser.version) < 7) { alignBox.height('auto'); }
		else { alignBox.css('min-height', 0); }

		setTimeout(function(){
			for(var i=0; i<alignBox.length; i++){
				maxHeight = Math.max(maxHeight, alignBox.eq(i).height());	
			}
			if($.browser.msie && Number($.browser.version) < 7) { alignBox.height(maxHeight); }
			else { alignBox.css('min-height', maxHeight); }
		},1);
	});
})($jq['base'])};

ist.alignBoxes = function(){(function($){
	ist.alignBoxesSetting('div.wrap', 'div.box');
})($jq['base'])};

/* --------------------------------------------------
	PUT UTILITY SWF
-------------------------------------------------- */
ist.putUtilSwf = function(elemId){(function($){
	if($.browser.msie){
		var imageId = 'utilImage';
		var imageBox = document.createElement('div');
		imageBox.id = imageId+'Box';
		imageBox.style.width = '1em';
		imageBox.style.height = '1em';
		imageBox.style.top = '0px';
		imageBox.style.left = '0px';
		imageBox.style.position = 'absolute';
		document.getElementById(elemId).appendChild(imageBox);
		imageBox.onresize = function(){ist.alignBoxes();};
	}else{
		var swfId = 'utilSwf';
		var swfBox = document.createElement('div');
		swfBox.id = swfId+'Box';
		swfBox.style.width = '1em';
		swfBox.style.height = '1em';
		swfBox.style.top = '0px';
		swfBox.style.left = '0px';
		swfBox.style.position = 'fixed';
		document.getElementById(elemId).appendChild(swfBox);
		var so = new SWFObject('/template/swf/onresize.swf', swfId, '100%', '100%', '8');
		so.addParam("wmode", "transparent");
		so.write(swfBox.id);
	}
})($jq['base'])};

/* --------------------------------------------------
	POINT SCROLL LINK
-------------------------------------------------- */
// Link from
(function($){
$(function(){
	$('a.anchorLink,area.anchorLink').click(function(e){
		var insertText = '?pSc';
		var hrefStr = this.href;
		var hashNum = hrefStr.lastIndexOf('#');
		location.href = hrefStr.substr(0, hashNum) + insertText + hrefStr.substr(hashNum + 1);
		e.preventDefault();
	});
});
})($jq['base']);

// Link from
(function($){
$(function(){
	$(window).load(function(e){
		if(location.search){
			var paramArray = location.search.substr(1).split('&');
			$.each(paramArray, function(index, value){
				if(value.search(/^pSc/) != -1){
					$.scrollFor('#'+value.substr(3));
				}
			})
		}
	});
});
})($jq['base']);
