$(document).ready(function(){$(".liteBox").click(function(){$(this).liteBox();return false})});function loadFrame(){$("#liteloading").remove();$("#lite-content").show();$("#liteFrame").contents().find(".liteClose").click(function(){$("#lite-overlay").remove();$("#lite-content").remove()})}$.fn.liteBox=function(){function a(k){var l={};if(!k){return l}var g=k.split(/[;&]/);for(var j=0;j<g.length;j++){var n=g[j].split("=");if(!n||n.length!=2){continue}var h=unescape(n[0]);var m=unescape(n[1]);m=m.replace(/\+/g," ");l[h]=m}return l}var b=$(this).attr("href");var f=b.split("?");var e=b.replace(/^[^\?]+\??/,"");var c=a(e);var d=$(this).attr("title");liteWidth=c.width*1;liteHeight=c.height*1;liteId=c.id;liteCaption=c.caption;liteScroll=c.scroll;if(typeof liteScroll=="undefined"){liteScroll="no"}marginLeft=-liteWidth/2;marginTop=-liteHeight/2;$liteOverlay="<div id='lite-overlay'><div id='liteloading'></div></div>";$liteContent="<div id='lite-content' style='width:"+liteWidth+"px;height:"+(liteHeight+30)+"px;margin-left:"+marginLeft+"px;margin-top:"+marginTop+"px;width:"+(liteWidth)+"px;'><div class='liteTitle'>"+d+"</div><div class='liteClose'>\u5173\u95ed</div><iframe id='liteFrame' src='"+f[0]+"' style='width:"+liteWidth+"px;height:"+liteHeight+"px;' frameborder='0' scrolling='"+liteScroll+"' onload='loadFrame()' ></iframe></div>";$("body").append($liteOverlay);$("#lite-overlay").append($liteContent);$(".liteClose").click(function(){$("#lite-overlay").remove();$("#lite-content").remove()})};
