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(a){if($(this).parent()[0].tagName.toLowerCase()=="p"){$(this).parent().css("text-indent","0em")}});$("#newspapercontent img").css("cursor","pointer");$("#newspapercontent img").click(function(){$("#wrap").show();var f=$(this).attr("src");var h=0;var e=0;var d=new Image();d.setAttribute("src",f);h=d.width;e=d.height;if(h>1024){h=1024;e=e*(1024/h)}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")}})});