var wppaJsPopupVersion="7.1.01";function wppaPopUp(p,t,e,a,r,i,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(a?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(r?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(i?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,a,r){var i=r+50,o=a+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c=".pdf"==e.substr(e.length-4,e.length),l=window.open("","Print","width="+o+", height="+i+", location=no, resizable=no, menubar=yes ");if(l.document.write("<html>"),l.document.write("<head>"),l.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),l.document.write("<title>"+n+"</title>"),l.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),l.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),l.document.write("</head>"),l.document.write("<body>"),l.document.write('<div style="width:'+a+'px;">'),c?l.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(i-60)+'px;" ></iframe><br />'):l.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),l.document.write('<div style="text-align:center">'+d+"</div>"),!c){var u=a-66;l.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+u+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),u=a-30,l.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+u+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')}l.document.write("</div>"),l.document.write("</body>"),l.document.write("</html>"),wppaProtect()}wppaConsoleLog("wppa-popup.js version "+wppaJsPopupVersion+" loaded.","force");