var SITE=SITE||{};(function(){SITE.util=SITE.util||{};SITE.util.setNamespace=function(d){var d=d.split(".");var c=window;for(var b=0,a=d.length;b<=a-1;b+=1){if(typeof c[d[b]]=="undefined"){c[d[b]]={}}c=c[d[b]]}return c};SITE.util.isArray=function(a){return a!==null&&a&&typeof a==="object"&&typeof a.length==="number"&&typeof a.splice==="function"&&!(a.propertyIsEnumerable("length"))};SITE.util.copyObject=function(a){try{return $.evalJSON($.toJSON(a))}catch(b){return false}};SITE.util.getBrowserType=function(){if(typeof SITE.browser!=="undefined"){return SITE.browser}var a={isIE:false,ieVersion:0,isMacIE:false,isFirefox:false,isSafari:false,isChrome:false,isOpera:false,isOthers:false},b=navigator.userAgent.toLowerCase();switch(true){case (navigator.appName.toLowerCase()==="microsoft internet explorer"):if(navigator.platform==="MacPPC"){a.isMacIE=true}else{a.isIE=true;a.ieVersion=/msie (\d)/.exec(b);if(a.ieVersion===null||a.ieVersion.length!==2){a.ieVersion=0;break}a.ieVersion=parseInt(a.ieVersion[1],10)}break;case (b.indexOf("firefox")!==-1):a.isFirefox=true;break;case (b.indexOf("chrome")!==-1):a.isChrome=true;break;case (b.indexOf("safari")!==-1):a.isSafari=true;break;case (b.indexOf("opera")!==-1):a.isOpera=true;break;default:a.isOthers=true}return a};SITE.util.getSubWindowOpener=function(){return{defaultOptions:{location:"no",menubar:"no",resizable:"yes",scrollbars:"yes",status:"yes",toolbar:"no",directories:"no",width:800,height:600,screenX:0,screenY:0,left:0,top:0},distance:{top:50,left:50},deltaSize:{width:37,height:30},deltaPosition:{top:-100,left:0},open:function(g,j,o){var b=g.target.nodeName.toLowerCase()==="img"||g.target.tagName.toLowerCase()==="img",m=b?$(g.target).closest("a"):$(g.target),a=m.attr("href"),e=this.defaultOptions,n=[],d=false,f=SITE.util.getBrowserType(),k=typeof window.screenTop==="undefined"?window.screenY:window.screenTop,c=typeof window.screenLeft==="undefined"?window.screenX:window.screenLeft,i=[],l=null,h=null;if(a===null||a===""||typeof a==="undefined"){return false}n=a.match(/w=(\d+)&(?:[^wh].*?=.+?&)*h=(\d+)/);if(n!==null){d=f.isIE||f.isFirefox;e.width=parseInt(n[1],10)+(d?this.deltaSize.width:0);e.height=parseInt(n[2],10)+(d?this.deltaSize.height:0)}switch(true){case (f.isOpera):k=this.distance.top+this.deltaPosition.top;c=this.distance.left+this.deltaPosition.left;break;default:k=(typeof k==="number"?k:0)+this.distance.top;c=(typeof c==="number"?c:0)+this.distance.left;k=f.isIE?k+this.deltaPosition.top:k;c=f.isIE?c+this.deltaPosition.left:c}e.screenY=e.top=k>=0?k:0;e.screenX=e.left=c>=0?c:0;for(optionName in o){if(o.hasOwnProperty(optionName)){e[optionName]=o[optionName]}}if(f.isOpera){e.height=document.body.clientHeight-(e.top<0?0:e.top)}for(optionName in e){if(e.hasOwnProperty(optionName)){i.push(optionName+"="+e[optionName])}}i=i.join(",");l=(j===null||j===false)?a:j;l=l.replace(/[^a-zA-Z0-9]+/g,"");h=window.open(a,l,i);h.focus()}}};SITE.util.log=function(b){var a=SITE.util.getBrowserType(),c=null;if(!a.isFirefox){c="#log"+((new Date()).getTime()+Math.random());b=String(b);$("body").append('<div id="'+c+'" style="background-color:#dfdfdf;">'+b+"</div>")}else{console.log(b)}}})();$(function(){SITE.root=typeof ROOT==="string"&&ROOT.slice(-1)==="/"?ROOT:"/";SITE.browser=SITE.util.getBrowserType();$(window).unload(function(){SITE={};$("*").unbind();$("*").die()});var a=SITE.util.getSubWindowOpener();$(".image_link").live("click",function(b){a.open(b,null,{});return false});$(".window_closer").click(function(b){window.close();return false})});