function simple_tooltip(target_items, name){  
 $16(target_items).each(function(i){ 
        var imgSrc =$16(this).attr("src");
       	var imgName = imgSrc.split("icn");
        $16("body").append("<div class='"+name+"' id='"+name+i+"'><img src='/08IMAGES/BASE/COMMON/pop"+imgName[1]+"' alt='' width='60' height='23' class='pngfix2' /></div>");
        var my_tooltip = $16("#"+name+i);
        if($16(this).attr("title") != "" && $16(this).attr("title") != "undefined" ){   
        $16(this).removeAttr("title").mouseover(function(){  
        my_tooltip.css({opacity:1, display:"none"}).fadeIn(0);  
        }).mousemove(function(kmouse){  
                var border_top = $16(window).scrollTop();   
                var border_right = $16(window).width();  
                var left_pos;  
                var top_pos;  
                var offsetX = -50; 
                var offsetY = 5;  
                if(border_right - (offsetX *2) >= my_tooltip.width() + kmouse.pageX){  
                    left_pos = kmouse.pageX+offsetX;  
                    } else{  
                    left_pos = border_right-my_tooltip.width()-offsetX;  
                    }  
                      
                if(border_top + (offsetY *2)>= kmouse.pageY - my_tooltip.height()){  
                    top_pos = border_top +offsetY;  
                    } else{  
                    top_pos = kmouse.pageY-my_tooltip.height()-offsetY;  
                    }     
                  
                  
                my_tooltip.css({left:left_pos, top:top_pos});  
        }).mouseout(function(){  
                my_tooltip.css({left:"-9999px"});                   
        });  
          
        }  
  
    });  
}
$16(document).ready(function() {
simple_tooltip("#header_drive .social img","tooltip");
});

//rollover
$16(function(){
	var $setElm = $16('#side .rankSct dd a,#contents .rankSct dd a');
	var cutFigure = '11';
	var afterTxt = ' …';

	$setElm.each(function(){
		var textLength = $16(this).text().length;
		var textTrim = $16(this).text().substr(0,(cutFigure))

		if(cutFigure < textLength) {
			$16(this).html(textTrim + afterTxt).css({visibility:'visible'});
		} else if(cutFigure >= textLength) {
			$16(this).css({visibility:'visible'});
		}
	});
	$16('#header_drive .navi li').append('<span class="arw"></span>');
	$16('#header_drive .navi li:not(".active")').hover(function(event){
		$16(this).find('.arw').css({'top': '0px', 'opacity': '0'});
		$16(this).find('.arw').stop().animate({'top': '+=9px', 'opacity': '1'}, 300);
		event.preventDefault();
	},function(event){
		$16(this).find('.arw').stop().animate({'top': '-=9px', 'opacity': '0'}, 300);
		event.preventDefault();
	});
	$16('#footer_drive .navi dl:not(".active")').hover(function(event){
		$16(this).find('img').stop().animate({'opacity': '1'}, 300);
		event.preventDefault();
	},function(event){
		$16(this).find('img').stop().animate({'opacity': '0.3'}, 300);
		event.preventDefault();
	});
	$16("img.rollover, img.rolloverPNG").each(function(){
		$16("<img>").attr("src", $16(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_ov$2"));
	});
/*
	if($16.browser.msie && $16.browser.version<7){
		$16("img.rolloverPNG").each(function(){
			$16(this)
			.data("src", $16(this).attr("src"))
			.attr("src", "/common/images/blank.gif")
			.css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+$16(this).data("src")+"', sizingMethod='scale')");

		}).mouseover(function(){
			$16(this).css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+$16(this).data("src").replace(/^(.+)(\.[a-z]+)$/, "$1_ov$2")+"', sizingMethod='scale')");
		}).mouseout(function(){
			$16(this).css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+$16(this).data("src")+"', sizingMethod='scale')");
		});
		$16("img.rollover").mouseover(function(){
			$16(this).attr("src", $16(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_ov$2"));
		}).mouseout(function(){
			$16(this).attr("src", $16(this).attr("src").replace(/^(.+)_ov(\.[a-z]+)$/, "$1$2"));
		});
	}else{
*/
		$16("img.rollover, img.rolloverPNG").mouseover(function(){
			$16(this).attr("src", $16(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_ov$2"));
		}).mouseout(function(){
			$16(this).attr("src", $16(this).attr("src").replace(/^(.+)_ov(\.[a-z]+)$/, "$1$2"));
		});
/*	}*/
});
//inlineIcon
/*
$16.fn.extend({inlineBgFix: function() {
	if ($16.browser.msie && $16.browser.version < 8.0) {
		$16(this)
		.addClass('inline-bg-fix')
		.prepend('<span class="bg-l">&nbsp;</span>')
		.append('<span class="bg-r">&nbsp;</span>');
	}
}
});
$16(function() {$16('a.link_mr').inlineBgFix();});
*/
//pageTop
$16(function(){$16(".targetTop a,.targetLink a").click(function(){$16('html,body').animate({ scrollTop: $16($16(this).attr("href")).offset().top }, 'slow','swing');return false;})});