var isboxhover=false;var isimghover=false;function startaddwrap(){if(document.body){var a=document.createElement("div");a.setAttribute("id","wrap");var c=document.createElement("div");c.setAttribute("id","zoomtu");c.setAttribute("class","modal clearfix");var b=document.body.firstchild;if(b){b.parentnode.insertbefore(a,b);b.parentnode.insertbefore(c,b)}else{document.body.appendChild(a);document.body.appendChild(c)}}else{setTimeout(arguments.callee,100)}}startaddwrap();$(function(){$("#newspapercontent img").each(function(b){if($(this).parent()[0].tagName.toLowerCase()=="p"){$(this).parent().css("text-indent","0em")}else{if($(this).parent().parent()[0].tagName.toLowerCase()=="p"){$(this).parent().parent().css("text-indent","0em")}}var a=$(this)[0];var e=$(this);var c=0;if(typeof a.naturalWidth=="undefined"||a.naturalWidth==0){var d=new Image();d.src=a.src;d.onload=function(){c=d.width;if(c>480){e.hover(function(f){e[0].style.cssText=e[0].style.cssText+"filter:alpha(opacity=90);opacity:0.9;cursor:pointer"},function(f){e[0].style.cssText=e[0].style.cssText+"filter:alpha(opacity=100);opacity:1.0;cursor:pointer"})}}}else{c=a.naturalWidth;if(c>480){e.hover(function(f){e[0].style.cssText=e[0].style.cssText+"filter:alpha(opacity=90);opacity:0.9;cursor:pointer"},function(f){e[0].style.cssText=e[0].style.cssText+"filter:alpha(opacity=100);opacity:1.0;cursor:pointer"})}}});$("#newspapercontent img").on("click",function(){var f=$(this).attr("src");var h=0;var e=0;var d=new Image();d.setAttribute("src",f);imgwidtho=d.width;imgheighto=d.height;if(imgwidtho>480&&!$(this).hasClass("contentimg_list")){$("#wrap").show();if(imgwidtho>3000){h=3000;e=imgheighto*(3000/imgwidtho)}else{h=imgwidtho;e=imgheighto}var g="<img src='"+f+"' width='"+h+"' height='"+e+"' border='0'  />";g=g+'<div class="oneCloseBtn"><a href="javascript:void(0);" rel="nofollow"></a></div>';var a=$("#zoomtu");a.html(g);a.width(h);a.height(e);var c=document.documentElement.clientHeight;var i=$(document).scrollTop()+"px";if((c-(e+36))>0){i=((c-(e+36))/2+$(document).scrollTop())+"px"}if(e>c){a.css("top",i)}else{a.css("top",i)}var b="0px";if(document.documentElement.clientWidth>h){b="-"+(h+36)/2+"px";a.css("margin-left",b)}else{a.css("left","0%")}a.fadeIn("slow")}});$("#zoomtu").on("click",".oneCloseBtn",function(){$("#wrap").hide();$("#zoomtu").slideUp("slow")});$("#newspapercontent img").hover(function(){isimghover=true},function(){isimghover=false});$("#zoomtu").hover(function(){isboxhover=true},function(){isboxhover=false});$(document).click(function(a){if(isboxhover==false&&isimghover==false){$("#wrap").hide();$("#zoomtu").slideUp("slow")}})});function showbigimg(h){var e=0;var c=0;var b=new Image();b.setAttribute("src",h);imgwidtho=b.width;imgheighto=b.height;if(imgwidtho>50){$("#wrap").show();if(imgwidtho>3000){e=3000;c=imgheighto*(3000/imgwidtho)}else{e=imgwidtho;c=imgheighto}var g="<img src='"+h+"' width='"+e+"' height='"+c+"' border='0'  />";g=g+'<div class="oneCloseBtn"><a href="javascript:void(0);" rel="nofollow"></a></div>';var a=$("#zoomtu");a.html(g);a.width(e);a.height(c);var d=document.documentElement.clientHeight;var f=$(document).scrollTop()+"px";if((d-(c+36))>0){f=((d-(c+36))/2+$(document).scrollTop())+"px"}if(c>d){a.css("top",f)}else{a.css("top",f)}a.css("margin-left","-"+(e+36)/2+"px");a.fadeIn("slow")}};