EZ EZViwe

[특별임상강좌(가칭)노년치의학회(11-2)]대주제:노년치의학의 발견/고령자의 교합

관리자 기자  2006.07.17 00:00:00

기사프린트

$(function() { $('#news_body_area img').each(function(i) { var tmpImage = new Image(); tmpImage.src = $(this).attr('src'); if (parseInt(tmpImage.width) > 720) { $(this).css('width', '720px'); } }); }); var MYNEWS_PHOTO_LIMIT_WIDTH = parseInt("720"); $("img[xtype='photo']").load(function(obj) { var title = $(this).attr('title'); $(this).attr('alt', title); $(this).removeAttr('title'); var image_align_class = ""; var clazz = $(this).attr('class'); if (clazz != null && clazz.length > 0) { image_align_class = " "+clazz; } $(this).attr('class', 'img'); $(this).removeAttr('xtype'); var w = parseInt($(this).css('width')); if (isNaN(w)) { w = 0; } var h = parseInt($(this).css('height')); if (isNaN(h)) { h = 0; } if (w <= 0) { var timg = new Image(); timg.src = this.src; w = parseInt(timg.width); if (isNaN(w)) { //... } } if (w > MYNEWS_PHOTO_LIMIT_WIDTH) { var pct = parseFloat(MYNEWS_PHOTO_LIMIT_WIDTH) / parseFloat(w); w = MYNEWS_PHOTO_LIMIT_WIDTH; if (pct > 0 && pct < 1 && h > 0) { h = Math.floor(parseFloat(h) * pct); } } $(this).css('width', w+"px"); if (h > 0) { $(this).css('height', h+"px"); } $(this).wrap("

"); if (title != null && title.length > 0) { if (title.indexOf('▲') == -1) { title = '▲' + title; } $(this).after("
"+title+"
"); } });