WP Photo Album Plus - Version 6.6.21.invre.beta.001

Version Description

Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 6.6.21.invre.beta.001
Comparing to
See all releases

Code changes from version 6.6.21 to 6.6.21.invre.beta.001

invre-modifications.txt ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Install version 6.6.21.invre.beta.001 version from: https://downloads.wordpress.org/plugin/wp-photo-album-plus.6.6.21.invre.beta.001.zip
2
+ Do a clean install, do not copy over an existing version, OR: remove the minified js files from .../wp-photo-album-plus/js/
3
+
4
+ Go to the Photo ALbums -> Settings admin page: Table VII-D5: Comment captcha. Set it to Use Google invisible reCaptcha
5
+ Create an album on the Photo Albums -> Album admin page.
6
+ Upload at least 2 photos on the Photo Albums -> Upload photos admin page, using Box A
7
+ Create a page with shortcode: [wppa][/wppa] as content.
8
+ Go to this page, and click the Slideshow link on the album cover.
9
+ Enter a comment...
10
+
11
+ So far i made the following modifications:
12
+
13
+ wppa-boxes-html.php line 3371:
14
+ /* invre modification */
15
+ /* Place the invre placeholder into the commentform */
16
+ if ( wppa_opt( 'comment_captcha' ) == 'invre' ) {
17
+ $result .= '<div class="inv-recaptcha-holder"></div>';
18
+ }
19
+ else
20
+ /* end invre modification */
21
+
22
+ wppa-slideshow.js line 841:
23
+ /* invre modification */
24
+ /* activate the placeholder with actual html */
25
+ if ( renderInvisibleReCaptcha ) {
26
+ renderInvisibleReCaptcha();
27
+ }
28
+ /* end invre modification */
29
+
30
+ The onclick procedure of the Send! button is in wppa-ajax-front.js line 938:
31
+ // Enter a comment to a photo
32
+ function wppaAjaxComment( mocc, id ) {
33
+
34
+ The server side of the ajax call is in wppa-ajax.php line 292:
35
+ wppa_do_comment( $_REQUEST['photo-id'] ); // Process the comment
36
+
37
+ The wppa_do_comment(); function is in wppa-functions line 2260:
38
+ // Process a comment request
39
+ function wppa_do_comment( $id ) {
40
+
41
+ wppa-functions.php line 2308:
42
+ /* invre modification */
43
+ if ( wppa_opt( 'comment_captcha' ) == 'invre' ) {
44
+ $is_valid = apply_filters('google_invre_is_valid_request_filter', true);
45
+ if( ! $is_valid ) {
46
+ $status = 'spam';
47
+ }
48
+ }
49
+ else
50
+ /* end invre modification */
51
+ This always fails.... (the errortext in the alertbox still refers to the old captcha)
52
+
53
+ The link where you can see an example:
54
+ https://beta.opajaap.nl/en/test-page/?wppa-occur=1&wppa-cover=0&wppa-album=205&wppa-photo=48895
js/wppa-ajax-front.js CHANGED
@@ -167,6 +167,9 @@ function wppaDoAjaxRender( mocc, ajaxurl, newurl, add, waitfor, addHilite ) {
167
  // Remove spinner
168
  jQuery( '#wppa-ajax-spin-'+mocc ).stop().fadeOut();
169
 
 
 
 
170
  }
171
  } );
172
  }
@@ -960,6 +963,11 @@ function wppaAjaxComment( mocc, id ) {
960
  data += '&returnurl='+encodeURIComponent(jQuery( "#wppa-returnurl-"+mocc ).val());
961
  }
962
 
 
 
 
 
 
963
  // Do the ajax commit
964
  jQuery.ajax( { url: wppaAjaxUrl,
965
  data: data,//'action=wppa' +
@@ -971,6 +979,10 @@ function wppaAjaxComment( mocc, id ) {
971
 
972
  // Show spinner
973
  jQuery( "#wppa-comment-spin-"+mocc ).css( 'display', 'inline' );
 
 
 
 
974
  },
975
  success: function( result, status, xhr ) {
976
 
167
  // Remove spinner
168
  jQuery( '#wppa-ajax-spin-'+mocc ).stop().fadeOut();
169
 
170
+ // Prevent comment submit from reloading the page
171
+ document.getElementById("comsubmit-"+mocc).addEventListener("click", function(event){event.preventDefault()});
172
+
173
  }
174
  } );
175
  }
963
  data += '&returnurl='+encodeURIComponent(jQuery( "#wppa-returnurl-"+mocc ).val());
964
  }
965
 
966
+ /* invre modification */
967
+ data += '&g-recaptcha-response='+jQuery('#g-recaptcha-response-1').val();
968
+ /* end invre mod */
969
+
970
+
971
  // Do the ajax commit
972
  jQuery.ajax( { url: wppaAjaxUrl,
973
  data: data,//'action=wppa' +
979
 
980
  // Show spinner
981
  jQuery( "#wppa-comment-spin-"+mocc ).css( 'display', 'inline' );
982
+
983
+ // Prevent submit default action (reload)
984
+ // document.getElementById("comsubmit-"+mocc).addEventListener("click", function(event){event.preventDefault()});
985
+
986
  },
987
  success: function( result, status, xhr ) {
988
 
js/wppa-ajax-front.min.js DELETED
@@ -1,80 +0,0 @@
1
- // wppa-ajax-front.js
2
- //
3
- // Contains frontend ajax modules
4
- // Dependancies: wppa.js and default wp jQuery library
5
- //
6
-
7
- var wppaJsAjaxVersion='6.6.21';var wppaRenderAdd=false;var wppaWaitForCounter=0;function wppaDoAjaxRender(mocc,ajaxurl,newurl,add,waitfor,addHilite){if(parseInt(waitfor)>0&&waitfor!=wppaWaitForCounter){setTimeout('wppaDoAjaxRender( '+mocc+', \''+ajaxurl+'\', \''+newurl+'\', \''+add+'\', '+waitfor+' )',100);return;}
8
- wppaRenderAdd=add;if(wppaLang!='')ajaxurl+='&lang='+wppaLang;if(wppaAutoColumnWidth[mocc])ajaxurl+='&resp=1';if(addHilite&&_wppaCurIdx[mocc]&&_wppaId[mocc][_wppaCurIdx[mocc]])ajaxurl+='&wppa-hilite='+_wppaId[mocc][_wppaCurIdx[mocc]];if(wppaCanAjaxRender){jQuery.ajax({url:ajaxurl,async:true,type:'GET',timeout:60000,beforeSend:function(xhr){if(_wppaSSRuns[mocc])_wppaStop(mocc);jQuery('#wppa-ajax-spin-'+mocc).fadeIn();},success:function(result,status,xhr){if(wppaRenderAdd){jQuery(wppaRenderAdd+result).insertBefore('#wppa-container-'+mocc+'-end');}
9
- else{if(wppaRenderModal){var opt={modal:true,resizable:true,width:wppaGetContainerWidth(mocc),show:{effect:"fadeIn",duration:400},closeText:"",};jQuery('#wppa-modal-container-'+mocc).html(result).dialog(opt).dialog("open");jQuery('.ui-dialog').css({boxShadow:'0px 0px 5px 5px #aaaaaa',borderRadius:wppaBoxRadius+'px',padding:'8px',backgroundColor:wppaModalBgColor,boxSizing:'content-box',zIndex:100000,});jQuery('.ui-dialog-titlebar').css({lineHeight:'0px',height:'32px',});jQuery('.ui-button').css({backgroundImage:wppaModalQuitImg,padding:0,position:'absolute',right:'8px',top:'8px',width:'16px',height:'16px',});jQuery('.ui-button').attr('title','Close');jQuery('.ui-button').on('click',function(){_wppaStop(mocc);});}
10
- else{jQuery('#wppa-container-'+mocc).html(result);}}
11
- if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:mocc,type:'html',html:result},"",newurl);wppaConsoleLog('Ajax rendering: History stack pushed','force');}
12
- catch(err){try{history.replaceState({page:wppaHis,occur:mocc,type:'html'},"",newurl);wppaConsoleLog('Ajax rendering: History stack updated','force');}
13
- catch(err){wppaConsoleLog('Ajax rendering: History stack update failed','force');}}
14
- if(wppaFirstOccur==0)wppaFirstOccur=mocc;}
15
- wppaUpdateLightboxes();if(typeof(wppaQRUpdate)!='undefined'){wppaConsoleLog('Ajax render asked qr code for '+newurl,'force');wppaQRUpdate(newurl);}
16
- wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);var scriptPos=result.indexOf('<script');var scriptPosLast=result.lastIndexOf('<script');if(scriptPos==-1){wppaConsoleLog('Ajax render did NOT contain a script tag','force');}
17
- else{wppaConsoleLog('Ajax render did contain a script tag at position '+scriptPos+' last at '+scriptPosLast,'force');}},error:function(xhr,status,error){wppaConsoleLog('wppaDoAjaxRender failed. Error = '+error+', status = '+status,'force');document.location.href=newurl;wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);},complete:function(xhr,status,newurl){wppaWaitForCounter++;wppaReplaceSvg();if(!wppaRenderModal){jQuery('html, body').animate({scrollTop:jQuery("#wppa-container-"+mocc).offset().top-32-wppaStickyHeaderHeight},1000);}
18
- jQuery('#wppa-ajax-spin-'+mocc).stop().fadeOut();}});}
19
- else{document.location.href=newurl;wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}
20
- function wppaAjaxApprovePhoto(photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=approve'+'&photo-id='+photo,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){if(result=='OK'){jQuery('.wppa-approve-'+photo).css('display','none');}
21
- else{alert(result);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxApprovePhoto failed. Error = '+error+', status = '+status,'force');},});}
22
- function wppaAjaxRemovePhoto(mocc,photo,isslide){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=remove'+'&photo-id='+photo,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){rtxt=result.split('||');if(rtxt[0]=='OK'){if(isslide){jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).attr('src','');jQuery('#wppa-pre-'+_wppaCurIdx[mocc]+'-'+mocc).attr('src','');jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).attr('alt','removed');jQuery('#wppa-pre-'+_wppaCurIdx[mocc]+'-'+mocc).attr('alt','removed');wppaNext(mocc);}
23
- else{jQuery('.wppa-approve-'+photo).css('display','none');jQuery('.thumbnail-frame-photo-'+photo).css('display','none');}}
24
- else{if(rtxt[3]){alert(rtxt[3]);jQuery('#wppa-delete-'+photo).css('text-decoration','line-through');}
25
- else{alert(result);}}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxRemovePhoto failed. Error = '+error+', status = '+status,'force');}});}
26
- function wppaAjaxApproveComment(comment){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=approve'+'&comment-id='+comment,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){if(result=='OK'){jQuery('.wppa-approve-'+comment).css('display','none');}
27
- else{alert(result);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxApproveComment failed. Error = '+error+', status = '+status,'force');}});}
28
- function wppaAjaxRemoveComment(comment){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=remove'+'&comment-id='+comment,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){var rtxt=result.split('||');if(rtxt[0]=='OK'){jQuery('.wppa-approve-'+comment).css('display','none');jQuery('.wppa-comment-'+comment).css('display','none');}
29
- else{alert(result);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxRemoveComment failed. Error = '+error+', status = '+status,'force');},});}
30
- function wppaAjaxAddPhotoToZip(mocc,id,reload){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=addtozip'+'&photo-id='+id,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){var rtxt=result.split('||');if(rtxt[0]=='OK'){jQuery('#admin-choice-'+id+'-'+mocc).html(rtxt[1]);}
31
- else{alert(result);}
32
- if(reload){document.location.reload(true);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxAddPhotoToZip failed. Error = '+error+', status = '+status,'force');},});}
33
- function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=delmyzip',async:true,type:'GET',timeout:60000,success:function(result,status,xhr){document.location.reload(true);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxDeleteMyZip failed. Error = '+error+', status = '+status,'force');},});}
34
- function wppaEditPhoto(mocc,xid){var id=String(xid);var name='Edit Photo '+id;var desc='';var width=wppaEditPhotoWidth;var height=512;if(screen.availWidth<width)width=screen.availWidth;var wnd;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=front-edit'+'&photo-id='+id+'&moccur='+mocc,async:true,type:'POST',timeout:60000,beforeSend:function(xhr){if(wppaUploadEdit=='classic'){wnd=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+width+", height="+height,true);wnd.document.write('<! DOCTYPE html>');wnd.document.write('<html>');wnd.document.write('<head>');var myHead='<meta name="viewport" content="width='+width+'" >'+'<link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+'/wppa-admin-styles.css?ver='+wppaVersion+'" type="text/css" media="all" />'+'<link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" />'+'<style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style>'+'<script type="text/javascript" src="'+wppaIncludeUrl+'/js/jquery/jquery.js?ver='+wppaVersion+'"></script>'+'<script type="text/javascript" src="'+wppaWppaUrl+'/js/wppa-utils.js?ver='+wppaVersion+'"></script>'+'<script type="text/javascript" src="'+wppaWppaUrl+'/js/wppa-admin-scripts.js?ver='+wppaVersion+'"></script>'+'<title>'+name+'</title>'+'<script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";</script>';wnd.document.write(myHead);wnd.document.write('</head>');wnd.document.write('<body>');}},success:function(result,status,xhr){if(wppaUploadEdit=='classic'){wnd.document.write(result);}
35
- if(wppaUploadEdit=='new'){var opt={modal:true,resizable:true,width:wppaGetContainerWidth(mocc),show:{effect:"fadeIn",duration:400},closeText:"",};jQuery('#wppa-modal-container-'+mocc).html(result).dialog(opt).dialog("open");jQuery('.ui-dialog').css({boxShadow:'0px 0px 5px 5px #aaaaaa',borderRadius:wppaBoxRadius+'px',padding:'8px',backgroundColor:wppaModalBgColor,boxSizing:'content-box',zIndex:100000,});jQuery('.ui-dialog-titlebar').css({lineHeight:'0px',height:'24px',})
36
- jQuery('.ui-button').css({backgroundImage:wppaModalQuitImg,padding:0,position:'absolute',right:'8px',top:'8px',width:'16px',height:'16px',});jQuery('.ui-button').attr('title','Close');}},error:function(xhr,status,error){if(wppaUploadEdit=='classic'){wnd.document.write(status+' '+error);}
37
- wppaConsoleLog('wppaEditPhoto failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){if(wppaUploadEdit=='classic'){wnd.document.write('<script>wppaPhotoStatusChange( "'+id+'" )</script>');wnd.document.write('</body>');wnd.document.write('</html>');}}});}
38
- function wppaPrevTags(tagsSel,tagsEdit,tagsAlbum,tagsPrev){var sel=jQuery('.'+tagsSel);var selArr=[];var editTag='';var album=jQuery('#'+tagsAlbum).val();var i=0;var j=0;var tags='';while(i<sel.length){if(sel[i].selected){selArr[j]=sel[i].value;j++;}
39
- i++;}
40
- editTag=jQuery('#'+tagsEdit).val();if(editTag!=''){selArr[j]=editTag;}
41
- tags=selArr.join();if(editTag!=''||tagsAlbum!=''){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=sanitizetags'+'&tags='+tags+'&album='+album,async:true,type:'GET',timeout:60000,beforeSend:function(xhr){jQuery('#'+tagsPrev).html('Working...');},success:function(result,status,xhr){jQuery('#'+tagsPrev).html(wppaTrim(result,','));},error:function(xhr,status,error){jQuery('#'+tagsPrev).html('<span style="color:red" >'+error+'</span>');wppaConsoleLog('wppaPrevTags failed. Error = '+error+', status = '+status,'force');},});}}
42
- function wppaAjaxDestroyAlbum(album,nonce){if(confirm('Are you sure you want to delete this album?')){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=destroyalbum'+'&album='+album+'&nonce='+nonce,async:true,type:'GET',timeout:60000,success:function(result,status,xhr){alert(result+'\n'+'Page will be reloaded');document.location.reload(true);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxDestroyAlbum failed. Error = '+error+', status = '+status,'force');},});}
43
- return false;}
44
- function _bumpClickCount(photo){if(!wppaBumpClickCount)return;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=bumpclickcount'+'&wppa-photo='+photo+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:false,type:'GET',timeout:60000,success:function(result,status,xhr){wppaConsoleLog('_bumpClickCount success.');},error:function(xhr,status,error){wppaConsoleLog('_bumpClickCount failed. Error = '+error+', status = '+status,'force');},});}
45
- function _bumpViewCount(photo){if(!wppaBumpViewCount)return;if(wppaPhotoView[photo])return;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=bumpviewcount'+'&wppa-photo='+photo+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,success:function(result,status,xhr){wppaPhotoView[photo]=true;},error:function(xhr,status,error){wppaConsoleLog('_bumpViewCount failed. Error = '+error+', status = '+status,'force');},});}
46
- function wppaVoteThumb(mocc,photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating=1'+'&wppa-rating-id='+photo+'&wppa-occur='+mocc+'&wppa-index=0'+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,success:function(result,status,xhr){jQuery('#wppa-vote-button-'+mocc+'-'+photo).val(wppaVotedForMe);},error:function(xhr,status,error){wppaConsoleLog('wppaVoteThumb failed. Error = '+error+', status = '+status,'force');},});}
47
- function _wppaRateIt(mocc,value){if(value==0)return;if(_wppaSSRuns[mocc])return;var photo=_wppaId[mocc][_wppaCurIdx[mocc]];var oldval=_wppaMyr[mocc][_wppaCurIdx[mocc]];var waittext=_wppaWaitTexts[mocc][_wppaCurIdx[mocc]];if(waittext.length>0){alert(waittext);return;}
48
- if(oldval!=0&&wppaRatingOnce){return;}
49
- if(oldval<0)return;_wppaVoteInProgress=true;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating='+value+'&wppa-rating-id='+photo+'&wppa-occur='+mocc+'&wppa-index='+_wppaCurIdx[mocc]+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,beforeSend:function(xhr){jQuery('#wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'tick.png');jQuery('#wppa-rate-'+mocc+'-'+value).stop().fadeTo(100,1.0);jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'spinner.gif');},success:function(result,status,xhr){var ArrValues=result.split("||");if(ArrValues[0]==0){if(ArrValues[1]==900){alert(ArrValues[2]);_wppaSetRatingDisplay(mocc);}
50
- else{alert('Error Code='+ArrValues[1]+'\n\n'+ArrValues[2]);}}
51
- else{if(ArrValues[7]&&ArrValues[7]=='likes'){var likeText=ArrValues[4].split("|");jQuery('#wppa-like-'+mocc).attr('title',likeText[0]);jQuery('#wppa-liketext-'+mocc).html(likeText[1]);if(ArrValues[3]=='1'){jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'thumbdown.png');}
52
- else{jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'thumbup.png');}
53
- _wppaMyr[ArrValues[0]][ArrValues[2]]=ArrValues[3];_wppaAvg[ArrValues[0]][ArrValues[2]]=ArrValues[4];}
54
- else{_wppaMyr[ArrValues[0]][ArrValues[2]]=ArrValues[3];_wppaAvg[ArrValues[0]][ArrValues[2]]=ArrValues[4];_wppaDisc[ArrValues[0]][ArrValues[2]]=ArrValues[5];_wppaSetRatingDisplay(mocc);if(wppaCommentRequiredAfterVote){if(ArrValues[6]==0){alert(ArrValues[7]);}}}
55
- if(wppaNextOnCallback)_wppaNextOnCallback(mocc);}},error:function(xhr,status,error){wppaConsoleLog('_wppaRateIt failed. Error = '+error+', status = '+status,'force');},});}
56
- function _wppaOvlRateIt(id,value,mocc,reloadAfter){if(value==0)return;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating='+value+'&wppa-rating-id='+id+'&wppa-occur=1'+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:true,type:'GET',timeout:60000,beforeSend:function(xhr){jQuery('.wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'tick.png');jQuery('.wppa-rate-'+mocc+'-'+value).stop().fadeTo(100,1.0);jQuery('#wppa-like-'+id+'-'+mocc).attr('src',wppaImageDirectory+'spinner.gif');jQuery('#wppa-like-0').attr('src',wppaImageDirectory+'spinner.gif');},success:function(result,status,xhr){wppaConsoleLog(result,'force');var ArrValues=result.split("||");if(ArrValues[0]==0){if(ArrValues[1]==900){alert(ArrValues[2]);}
57
- else{alert('Error Code='+ArrValues[1]+'\n\n'+ArrValues[2]);}
58
- jQuery('.wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'cross.png');}
59
- else{if(ArrValues[7]&&ArrValues[7]=='likes'){var likeText=ArrValues[4].split("|");jQuery('#wppa-like-0').attr('title',likeText[0]);jQuery('#wppa-liketext-0').html(likeText[1]);if(ArrValues[3]=='1'){jQuery('#wppa-like-0').attr('src',wppaImageDirectory+'thumbdown.png');}
60
- else{jQuery('#wppa-like-0').attr('src',wppaImageDirectory+'thumbup.png');}
61
- jQuery('#wppa-like-'+id+'-'+mocc).attr('title',likeText[0]);jQuery('#wppa-liketext-'+id+'-'+mocc).html(likeText[1]);if(ArrValues[3]=='1'){jQuery('#wppa-like-'+id+'-'+mocc).attr('src',wppaImageDirectory+'thumbdown.png');}
62
- else{jQuery('#wppa-like-'+id+'-'+mocc).attr('src',wppaImageDirectory+'thumbup.png');}
63
- return;}
64
- _wppaSetRd(mocc,ArrValues[4],'.wppa-avg-');_wppaSetRd(mocc,ArrValues[3],'.wppa-rate-');if(reloadAfter){return;}
65
- if(wppaNextOnCallback)wppaOvlShowNext();}},error:function(xhr,status,error){wppaConsoleLog('_wppaOvlRateIt failed. Error = '+error+', status = '+status,'force');},});}
66
- function wppaAjaxMakeOrigName(mocc,photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=makeorigname'+'&photo-id='+photo+'&from=fsname',async:true,type:'GET',timeout:60000,beforeSend:function(xhr){},success:function(result,status,xhr){var ArrValues=result.split("||");if(ArrValues[1]=='0'){if(wppaIsSafari){if(wppaArtMonkyLink=='file')wppaWindowReference.location=ArrValues[2];if(wppaArtMonkyLink=='zip')document.location=ArrValues[2];}
67
- else{if(wppaArtMonkyLink=='file')window.open(ArrValues[2]);if(wppaArtMonkyLink=='zip')document.location=ArrValues[2];}}
68
- else{if(wppaIsSafari&&wppaArtMonkyLink=='file')wppaWindowReference.close();alert('Error: '+ArrValues[1]+'\n\n'+ArrValues[2]);}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxMakeOrigName failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){}});}
69
- function wppaAjaxDownloadAlbum(mocc,id){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=downloadalbum'+'&album-id='+id,async:true,type:'GET',timeout:60000,beforeSend:function(xhr){jQuery('#dwnspin-'+mocc+'-'+id).css('display','');},success:function(result,status,xhr){var ArrValues=result.split("||");var url=ArrValues[0];var erok=ArrValues[1];var text=ArrValues[2];if(ArrValues.length==3&&text!='')alert('Attention:\n\n'+text);if(erok=='OK'){document.location=url;}
70
- else{alert('The server could not complete the request.\nPlease try again.');}},error:function(xhr,status,error){alert('An error occurred:\n'+error+'\nPlease try again');},complete:function(xhr,status,newurl){jQuery('#dwnspin-'+mocc+'-'+id).css('display','none');}});}
71
- function wppaAjaxComment(mocc,id){if(!_wppaValidateComment(mocc,id))return;var data='action=wppa'+'&wppa-action=do-comment'+'&photo-id='+id+'&comname='+jQuery("#wppa-comname-"+mocc).val()+'&comment='+wppaEncode(jQuery("#wppa-comment-"+mocc).val())+'&wppa-captcha='+jQuery("#wppa-captcha-"+mocc).val()+'&wppa-nonce='+jQuery("#wppa-nonce-"+mocc).val()+'&moccur='+mocc;if(typeof(jQuery("#wppa-comemail-"+mocc).val())!='undefined'){data+='&comemail='+jQuery("#wppa-comemail-"+mocc).val();}
72
- if(typeof(jQuery("#wppa-comment-edit-"+mocc).val())!='undefined'){data+='&comment-edit='+jQuery("#wppa-comment-edit-"+mocc).val();}
73
- if(typeof(jQuery("#wppa-returnurl-"+mocc).val())!='undefined'){data+='&returnurl='+encodeURIComponent(jQuery("#wppa-returnurl-"+mocc).val());}
74
- jQuery.ajax({url:wppaAjaxUrl,data:data,async:true,type:'POST',timeout:60000,beforeSend:function(xhr){jQuery("#wppa-comment-spin-"+mocc).css('display','inline');},success:function(result,status,xhr){result=result.replace(/\\/g,'');jQuery("#wppa-comments-"+mocc).html(result);if(_wppaCurIdx[mocc]){_wppaCommentHtml[mocc][_wppaCurIdx[mocc]]=result;}
75
- wppaOpenComments(mocc);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxComment failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){jQuery("#wppa-comment-spin-"+mocc).css('display','none');}});}
76
- function wppaUpdatePhotoNew(id){var myItems=['name','description','tags','custom_0','custom_1','custom_2','custom_3','custom_4','custom_5','custom_6','custom_7','custom_8','custom_9'];var myData='action=wppa'+'&wppa-action=update-photo-new'+'&photo-id='+id+'&wppa-nonce='+jQuery('#wppa-nonce-'+id).val();var i=0;while(i<myItems.length){if(typeof(jQuery('#'+myItems[i]).val())!='undefined'){myData+='&'+myItems[i]+'='+jQuery('#'+myItems[i]).val();}
77
- i++;}
78
- jQuery.ajax({url:wppaAjaxUrl,data:myData,async:false,type:'POST',timeout:10000,beforeSend:function(xhr){},success:function(result,status,xhr){if(result.length>0){alert(result);}},error:function(xhr,status,error){alert(result);wppaConsoleLog('wppaUpdatePhotoNew failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){}});}
79
- function wppaAjaxSetQrCodeSrc(url,elm){var myData='action=wppa'+'&wppa-action=getqrcode'+'&wppa-qr-nonce='+jQuery('#wppa-qr-nonce').val()+'&url='+encodeURIComponent(url);jQuery.ajax({url:wppaAjaxUrl,data:myData,async:true,type:'POST',timeout:10000,success:function(result,status,xhr){document.getElementById(elm).src=result;wppaConsoleLog('wppaAjaxSetQrCodeSrc put '+result+' into '+elm);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxSetQrCodeSrc failed. Error = '+error+', status = '+status,'force');}});}
80
- wppaConsoleLog('wppa-ajax-front.js version '+wppaJsAjaxVersion+' loaded.','force');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wppa-lightbox.min.js DELETED
@@ -1,138 +0,0 @@
1
- // wppa-lightbox.js
2
- //
3
- // Conatins lightbox modules
4
- // Dependancies: wppa.js and default wp jQuery library
5
- //
6
-
7
- var wppaLightboxVersion='6.6.20';var wppaNormsBtnOpac=0.75;var wppaIsVideo=false;var wppaHasAudio=false;var wppaOvlImgs=[];var wppaKbHandlerInstalled=false;var wppaOvlMode='';var wppaOvlCurIdx=0;var wppaOvlSvgInverse=false;var wppaSavedContainerWidth=0;var wppaSavedContainerHeight;var wppaSavedMarginLeft;var wppaSavedMarginTop;var wppaSavedImageWidth;var wppaSavedImageHeight;jQuery(document).ready(function(e){wppaInitOverlay();});jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth,});wppaOvlResize();});function wppaDoOnOrientationChange(e){if(wppaOvlMode!='normal'&&document.getElementById('wppa-overlay-img')){setTimeout('wppaOvlShow( '+wppaOvlIdx+' )',100);return;}}
8
- function wppaOvlKeyboardHandler(e){var keycode;var escapeKey;if(e==null){keycode=event.keyCode;escapeKey=27;}else{keycode=e.keyCode;escapeKey=27;}
9
- var key=String.fromCharCode(keycode).toLowerCase();switch(keycode){case escapeKey:wppaStopVideo(mocc);if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
10
- wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext();break;}
11
- switch(key){case'p':wppaOvlShowPrev();break;case'n':wppaOvlShowNext();break;case's':wppaOvlStartStop();break;case'd':jQuery('#wppa-ovl-legenda-1').css('visibility','hidden');jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';break;case'f':wppaOvlFull();break;case'l':wppaOvlNorm();break;case'q':case'x':wppaStopVideo(mocc);if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
12
- wppaOvlHide();break;}
13
- return false;}
14
- function wppaOvlFull(init){wppaConsoleLog('wppaOvlFull');wppaNormsBtnOpac=0.75;var oldMode=wppaOvlMode;if(!init){wppaOvlStepMode();}
15
- var elem=document.getElementById('wppa-overlay-ic');if(!elem)return;if(init||oldMode=='normal'){if(elem.requestFullscreen){elem.requestFullscreen();}else if(elem.mozRequestFullScreen){elem.mozRequestFullScreen();}else if(elem.webkitRequestFullscreen){elem.webkitRequestFullscreen();}
16
- setTimeout(function(){wppaOvlShow(wppaOvlIdx)},500);}
17
- if(wppaOvlMode=='normal'){if(document.cancelFullScreen){document.cancelFullScreen();}else if(document.mozCancelFullScreen){document.mozCancelFullScreen();}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen();}}
18
- setTimeout(function(){wppaShowFsButtons(0.75)},300);jQuery('#wppa-ovl-legenda-1').html('');}
19
- function wppaOvlNorm(exit){wppaConsoleLog('wppaOvlNorm');wppaOvlMode='normal';wppaNormsBtnOpac=0.75;if(document.cancelFullScreen){document.cancelFullScreen();}else if(document.mozCancelFullScreen){document.mozCancelFullScreen();}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen();}
20
- if(exit){wppaOvlMode=wppaOvlModeInitial;return;}
21
- setTimeout(function(){wppaShowFsButtons(0.75)},300);setTimeout(function(){wppaOvlShow(wppaOvlIdx)},500);}
22
- function wppaOvlShow(arg){wppaConsoleLog('wppaOvlShow arg='+arg);if(wppaOvlFirst){jQuery('#weaver-final').removeClass('wvr-hide-bang');jQuery('#wppa-overlay-bg').stop().fadeTo(3,wppaOvlOpacity);if(!wppaKbHandlerInstalled){jQuery(document).on('keydown',wppaOvlKeyboardHandler);wppaKbHandlerInstalled=true;}
23
- jQuery('#wppa-overlay-bg').css({width:window.innerWidth,height:window.innerHeight,});if(wppaOvlModeInitial!='normal'){wppaOvlFull(true);}}
24
- if(typeof(arg)=='object'){wppaOvlUrls=[];wppaOvlTitles=[];wppaOvlAlts=[];wppaOvlVideoHtmls=[];wppaOvlAudioHtmls=[];wppaOvlVideoNaturalWidths=[];wppaOvlVideoNaturalHeights=[];wppaOvlImgs=[];wppaOvlIdx=0;var rel;if(arg.rel){rel=arg.rel;}
25
- else if(jQuery(arg).attr('data-rel')){rel=jQuery(arg).attr('data-rel');}
26
- else{rel=false;}
27
- var temp=rel.split('[');if(temp[1]){var setname=temp[1];var anchors=jQuery('a');var anchor;var i,j=0;for(i=0;i<anchors.length;i++){anchor=anchors[i];if(jQuery(anchor).attr('data-rel')){temp=jQuery(anchor).attr('data-rel').split("[");}
28
- else{temp=false;}
29
- if(temp.length>1){if(temp[0]=='wppa'&&temp[1]==setname){wppaOvlUrls[j]=anchor.href;if(jQuery(anchor).attr('data-lbtitle')){wppaOvlTitles[j]=wppaRepairScriptTags(jQuery(anchor).attr('data-lbtitle'));}
30
- else{wppaOvlTitles[j]=wppaRepairScriptTags(anchor.title);}
31
- wppaOvlAlts[j]=jQuery(anchor).attr('data-alt')?jQuery(anchor).attr('data-alt'):'';wppaOvlVideoHtmls[j]=jQuery(anchor).attr('data-videohtml')?decodeURI(jQuery(anchor).attr('data-videohtml')):'';wppaOvlAudioHtmls[j]=jQuery(anchor).attr('data-audiohtml')?decodeURI(jQuery(anchor).attr('data-audiohtml')):'';wppaOvlVideoNaturalWidths[j]=jQuery(anchor).attr('data-videonatwidth')?jQuery(anchor).attr('data-videonatwidth'):'';wppaOvlVideoNaturalHeights[j]=jQuery(anchor).attr('data-videonatheight')?jQuery(anchor).attr('data-videonatheight'):'';if(anchor.href==arg.href){wppaOvlIdx=j;}
32
- j++;}}}}
33
- else{wppaOvlUrls[0]=arg.href;if(jQuery(arg).attr('data-lbtitle')){wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(arg).attr('data-lbtitle'));}
34
- else{wppaOvlTitles[0]=wppaRepairScriptTags(arg.title);}
35
- wppaOvlAlts[0]=jQuery(arg).attr('data-alt')?jQuery(arg).attr('data-alt'):'';wppaOvlVideoHtmls[0]=jQuery(arg).attr('data-videohtml')?decodeURI(jQuery(arg).attr('data-videohtml')):'';wppaOvlAudioHtmls[0]=jQuery(arg).attr('data-audiohtml')?decodeURI(jQuery(arg).attr('data-audiohtml')):'';wppaOvlVideoNaturalWidths[0]=jQuery(arg).attr('data-videonatwidth')?jQuery(arg).attr('data-videonatwidth'):'';wppaOvlVideoNaturalHeights[0]=jQuery(arg).attr('data-videonatheight')?jQuery(arg).attr('data-videonatheight'):'';wppaOvlIdx=0;}}
36
- else{wppaOvlIdx=arg;}
37
- setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100);}
38
- function _wppaOvlShow(idx){wppaConsoleLog('_wppaOvlShow, idx='+idx);wppaOvlCurIdx=idx;if(wppaOvlFirst){jQuery("#wppa-ovl-spin").fadeIn(1500);}
39
- wppaIsVideo=wppaOvlVideoHtmls[idx]!='';wppaHasAudio=wppaOvlAudioHtmls[idx]!='';if(wppaOvlUrls[idx].length>0&&!wppaIsVideo){wppaOvlImgs[idx]=new Image();wppaOvlImgs[idx].src=wppaOvlUrls[idx];wppaConsoleLog('Preloading '+(idx+1)+'/'+wppaOvlUrls.length+' (current)');if(!wppaOvlImgs[idx].complete){wppaConsoleLog('Retrying preload current image');setTimeout('_wppaOvlShow('+idx+')',100);return;}}
40
- var next;var prev;if(wppaOvlIdx==(wppaOvlUrls.length-1)){next=0;}
41
- else{next=wppaOvlIdx+1;}
42
- if(wppaOvlVideoHtmls[next]==''){wppaOvlImgs[next]=new Image();wppaOvlImgs[next].src=wppaOvlUrls[next];wppaConsoleLog('Preloading > '+(next+1));}
43
- if(!wppaOvlRunning){if(wppaOvlIdx==0){prev=wppaOvlUrls.length-1;}
44
- else{prev=wppaOvlIdx-1;}
45
- if(wppaOvlVideoHtmls[prev]==''){wppaOvlImgs[prev]=new Image();wppaOvlImgs[prev].src=wppaOvlUrls[prev];wppaConsoleLog('Preloading < '+(prev+1));}}
46
- wppaPhotoId=wppaUrlToId(wppaOvlUrls[idx]);_bumpViewCount(wppaPhotoId);wppaOvlIsSingle=(wppaOvlUrls.length==1);if(wppaOvlMode!='normal'){var html;if(wppaIsVideo){html='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+'px; height:'+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" >'+'<video id="wppa-overlay-img" controls preload="metadata"'+
47
- (wppaOvlVideoStart?' autoplay':'')+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"'+' ontouchend="wppaTouchEnd( event );"'+' ontouchmove="wppaTouchMove( event );"'+' ontouchcancel="wppaTouchCancel( event );"'+' onpause="wppaOvlVideoPlaying = false;"'+' onplay="wppaOvlVideoPlaying = true;"'+' style="border:none; width:'+jQuery(window).width()+'px; box-shadow:none; position:absolute;"'+' alt="'+wppaOvlAlts[idx]+'"'+' >'+
48
- wppaOvlVideoHtmls[idx]+'</video>'+'<div style="height: 20px; width: 100%; position:absolute; top:0; left:0;" onmouseover="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'visible\');" onmouseout="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'hidden\');wppaShowLegenda=\'hidden\';" >';if(wppaOvlShowLegenda){html+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+(wppaOvlTheme=='black'?'#272727':'#a7a7a7')+'; color:'+(wppaOvlTheme=='black'?'#a7a7a7':'#272727')+'; visibility:'+wppaShowLegenda+';" >'+'Mode='+wppaOvlMode+'. '+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+'</div>';}
49
- html+='</div>';'</div>';}
50
- else{html='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+'px; height:'+jQuery(window).height()+'px; left:0px; top:0px; text-align:center;" >'+'<img id="wppa-overlay-img"'+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"'+' ontouchend="wppaTouchEnd( event );"'+' ontouchmove="wppaTouchMove( event );"'+' ontouchcancel="wppaTouchCancel( event );"'+' src="'+wppaOvlUrls[idx]+'"'+' style="border:none; width:'+jQuery(window).width()+'px; visibility:hidden; box-shadow:none; position:absolute;"'+' alt="'+wppaOvlAlts[idx]+'"'+' />';if(wppaHasAudio){html+='<audio'+' id="wppa-overlay-audio"'+' class="wppa-overlay-audio"'+' data-from="wppa"'+' preload="metadata"'+
51
- ((wppaOvlAudioStart)?' autoplay':'')+' onpause="wppaOvlAudioPlaying = false;"'+' onplay="wppaOvlAudioPlaying = true;"'+' style="'+'width:100%;'+'position:absolute;'+'left:0px;'+'bottom:0px;'+'padding:0;'+'"'+' controls'+' >'+
52
- wppaOvlAudioHtmls[idx]+'</audio>';}
53
- html+='<div style="height: 20px; width: 100%; position:absolute; top:0; left:0;" onmouseover="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'visible\');" onmouseout="jQuery(\'#wppa-ovl-legenda-2\').css(\'visibility\',\'hidden\');wppaShowLegenda=\'hidden\';" >';if(wppaOvlShowLegenda){html+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+(wppaOvlTheme=='black'?'#272727':'#a7a7a7')+'; color:'+(wppaOvlTheme=='black'?'#a7a7a7':'#272727')+'; visibility:'+wppaShowLegenda+';" >'+'Mode='+wppaOvlMode+'. '+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+'</div>';}
54
- html+='</div>';'</div>';}
55
- var dark=wppaIsMobile?'0.1':'0.1';html+='<div'+' id="wppa-exit-btn"'+' style="height:48px;z-index:100098;position:fixed;top:0;right:0;opacity:'+wppaNormsBtnOpac+';"'+' onclick="wppaOvlHide()"'+' onmouseover="jQuery(this).stop().fadeTo(300,1);"'+' ontouchstart="jQuery(this).stop().fadeTo(300,1);"'+' onmouseout="jQuery(this).stop().fadeTo(300,'+dark+');wppaNormsBtnOpac='+dark+';"'+' ontouchend="jQuery(this).stop().fadeTo(300,'+dark+');wppaNormsBtnOpac='+dark+';"'+' >'+
56
- wppaSvgHtml('Exit','48px',true,true,'0','0','0','0')+'</div>';html+='<div'+' id="wppa-norms-btn"'+' style="height:48px;z-index:100098;position:fixed;top:0;right:48px;opacity:'+wppaNormsBtnOpac+';"'+' onclick="wppaOvlNorm()"'+' onmouseover="jQuery(this).stop().fadeTo(300,1);"'+' ontouchstart="jQuery(this).stop().fadeTo(300,1);"'+' onmouseout="jQuery(this).stop().fadeTo(300,'+dark+');wppaNormsBtnOpac='+dark+';"'+' ontouchend="jQuery(this).stop().fadeTo(300,'+dark+');wppaNormsBtnOpac='+dark+';"'+' >'+
57
- wppaSvgHtml('Exit-Full-Screen','48px',true,true,'0','0','0','0')+'</div>';if((!wppaIsVideo&&!wppaHasAudio)||wppaOvlFsPhotoId!=wppaPhotoId||wppaPhotoId==0){wppaStopVideo(0);wppaStopAudio();jQuery('#wppa-overlay-ic').html(html);}
58
- jQuery('#wppa-overlay-img').bind('contextmenu',function(e){return false;});wppaOvlIsVideo=wppaIsVideo;setTimeout('wppaOvlFormatFull()',10);if(wppaIsVideo||wppaHasAudio){setTimeout('wppaOvlUpdateFsId()',2000);}
59
- else{wppaOvlFsPhotoId=0;}
60
- wppaOvlFirst=false;return false;}
61
- else{wppaOvlFsPhotoId=0;wppaPhotoId=0;wppaStopVideo(0);var txtcol=wppaOvlTheme=='black'?'#a7a7a7':'#272727';if(wppaOvlFontColor){txtcol=wppaOvlFontColor;}
62
- var showNav=wppaOvlUrls.length>1;jQuery('#wppa-overlay-ic').css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop,});var html='';html+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >';if(wppaIsVideo){html+='<video'+' id="wppa-overlay-img"'+' onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);"'+' onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);"'+' preload="metadata"'+
63
- (wppaOvlVideoStart?' autoplay':'')+' onpause="wppaOvlVideoPlaying = false;"'+' onplay="wppaOvlVideoPlaying = true;"'+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"'+' ontouchend="wppaTouchEnd( event );"'+' ontouchmove="wppaTouchMove( event );"'+' ontouchcancel="wppaTouchCancel( event );" '+' controls'+' style="'+'border-width:'+wppaOvlBorderWidth+'px '+wppaOvlBorderWidth+'px 0;'+'border-style:solid;'+'border-color:'+wppaOvlTheme+';'+'width:'+wppaSavedImageWidth+'px;'+'height:'+wppaSavedImageHeight+'px;'+'box-shadow:none;'+'box-sizing:content-box;'+'position:relative;'+'border-top-left-radius:'+wppaOvlRadius+'px;'+'border-top-right-radius:'+wppaOvlRadius+'px;'+'margin:0;'+'padding:0;'+'"'+' alt="'+wppaOvlAlts[idx]+'"'+' >'+
64
- wppaOvlVideoHtmls[idx]+'</video>';wppaOvlIsVideo=true;}
65
- else{html+='<img'+' id="wppa-overlay-img"'+' onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);"'+' onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);"'+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"'+' ontouchend="wppaTouchEnd( event );"'+' ontouchmove="wppaTouchMove( event );"'+' ontouchcancel="wppaTouchCancel( event );"'+' src="'+wppaOvlUrls[idx]+'"'+' style="'+'border-width:'+wppaOvlBorderWidth+'px '+wppaOvlBorderWidth+'px 0;'+'border-style:solid;'+'border-color:'+wppaOvlTheme+';'+'width:'+wppaSavedImageWidth+'px;'+'height:'+wppaSavedImageHeight+'px;'+'box-shadow:none;'+'box-sizing:content-box;'+'position:relative;'+'border-top-left-radius:'+wppaOvlRadius+'px;'+'border-top-right-radius:'+wppaOvlRadius+'px;'+'margin:0;'+'padding:0;'+'"'+' alt="'+wppaOvlAlts[idx]+'"'+' />';if(wppaHasAudio){html+='<audio'+' id="wppa-overlay-audio"'+' class="wppa-overlay-audio"'+' data-from="wppa"'+' preload="metadata"'+' onpause="wppaOvlAudioPlaying = false;"'+' onplay="wppaOvlAudioPlaying = true;"'+' style="'+'width:100%;'+'position:absolute;'+'box-shadow:none;'+'left:0;'+'bottom:0;'+'padding:0 '+wppaOvlBorderWidth+'px;'+'margin:0;'+'background-color:transparent;'+'box-sizing:border-box;'+'"'+' controls'+' >'+
66
- wppaOvlAudioHtmls[idx]+'</audio>';}
67
- wppaOvlIsVideo=false;}
68
- if(wppaOvlShowStartStop&&!wppaOvlIsSingle&&!wppaIsVideo){html+='<div'+' id="wppa-ovl-start-stop-btn"'+' class="wppa-ovl-nav-btn"'+' style="'+'z-index:100101;'+'position:absolute;'+'top:50%;'+'margin-top:-24px;'+'left:50%;'+'margin-left:-24px;'+
69
- (wppaOvlIdx==-1?'visibility:hidden;':'')+'box-shadow:none;'+
70
- (wppaOvlFirst?'opacity:1;':'opacity:0;')+'"'+' onclick="wppaOvlStartStop()"'+' onmouseover="jQuery(this).stop().fadeTo(200,1);"'+' onmouseout="jQuery(this).stop().fadeTo(200,0);"'+' ontouchstart="jQuery(this).stop().fadeTo(200,1);"'+' onload="jQuery(this).stop().fadeTo(5000,0);"'+' >'+
71
- wppaSvgHtml((wppaOvlRunning?'Pause-Button':'Play-Button'),'48px',true,true,'0','20','50','50')+'</div>';}
72
- if(!wppaOvlIsSingle){html+='<div'+' id="wppa-ovl-prev-btn"'+' class="wppa-ovl-nav-btn"'+' style="'+'position:absolute;'+'z-index:100101;'+'width:48px;'+'top:50%;'+'margin-top:-24px;'+'left:1px;'+'box-shadow:none;'+
73
- (wppaOvlFirst?'opacity:1;':'opacity:0;')+'"'+' onclick="wppaOvlShowPrev()"'+' onmouseover="jQuery(this).stop().fadeTo(200,1);"'+' onmouseout="jQuery(this).stop().fadeTo(200,0);"'+' ontouchstart="jQuery(this).stop().fadeTo(200,1);"'+' onload="jQuery(this).stop().fadeTo(5000,0);"'+' >'+
74
- wppaSvgHtml('Prev-Button','48px',true,true)+'</div>';html+='<div'+' id="wppa-ovl-next-btn"'+' class="wppa-ovl-nav-btn"'+' style="'+'position:absolute;'+'z-index:100101;'+'width:48px;'+'top:50%;'+'margin-top:-24px;'+'right:1px;'+'box-shadow:none;'+
75
- (wppaOvlFirst?'opacity:1;':'opacity:0;')+'"'+' onclick="wppaOvlShowNext()"'+' onmouseover="jQuery(this).stop().fadeTo(200,1);"'+' onmouseout="jQuery(this).stop().fadeTo(200,0);"'+' ontouchstart="jQuery(this).stop().fadeTo(200,1);"'+' onload="jQuery(this).stop().fadeTo(5000,0);"'+' >'+
76
- wppaSvgHtml('Next-Button','48px',true,true)+'</div>';}
77
- html+='</div>';var showCounter=!wppaOvlIsSingle&&wppaOvlShowCounter;html+='<div id="wppa-overlay-txt-container"'+' style="'+'position:relative;'+'padding:10px;'+'background-color:'+wppaOvlTheme+';'+'color:'+txtcol+';'+'text-align:center;'+'font-family:'+wppaOvlFontFamily+';'+'font-size:'+wppaOvlFontSize+'px;'+'font-weight:'+wppaOvlFontWeight+';'+'line-height:'+wppaOvlLineHeight+'px;'+'box-shadow:none;'+'border-bottom-left-radius:'+wppaOvlRadius+'px;'+'border-bottom-right-radius:'+wppaOvlRadius+'px;'+'"'+' >'+'<div'+' id="wppa-overlay-txt"'+' style="'+'text-align:center;'+'min-height:36px;'+'width:100%;'+
78
- (wppaOvlTxtHeight=='auto'?'max-height:200px;':'max-height:'+wppaOvlTxtHeight+'px;')+'overflow:auto;'+'box-shadow:none;'+'"'+' >'+
79
- (showCounter?(wppaOvlIdx+1)+'/'+wppaOvlUrls.length+'<br />':'')+
80
- wppaOvlTitles[idx]+'</div>';'</div>';jQuery('#wppa-overlay-ic').html(html);jQuery('#wppa-overlay-img').bind('contextmenu',function(e){return false;});wppaOvlResize();return false;}}
81
- function wppaOvlSize(speed){wppaConsoleLog('wppaOvlSize');var img=document.getElementById('wppa-overlay-img');var txt=document.getElementById('wppa-overlay-txt');if(!img||!txt||jQuery('#wppa-overlay-bg').css('display')=='none'){wppaConsoleLog('Lb quitted');return;}
82
- if(wppaOvlMode!='normal'){wppaOvlFormatFull();return;}
83
- var iw=jQuery(window).width();var ih=jQuery(window).height();var cw,nw,nh;if(wppaOvlIsVideo){cw=img.clientWidth;nw=wppaOvlVideoNaturalWidths[wppaOvlCurIdx];nh=wppaOvlVideoNaturalHeights[wppaOvlCurIdx];}
84
- else{cw=img.clientWidth;nw=img.naturalWidth;nh=img.naturalHeight;}
85
- var fakt1;var fakt2;var fakt;if(typeof(nw)=='undefined'){nw=img.clientWidth;nh=img.clientHeight;}
86
- fakt1=(iw-3*wppaOvlBorderWidth)/nw;fakt2=ih/nh;if(fakt1<fakt2)fakt=fakt1;else fakt=fakt2;if(fakt<1.0){nw=parseInt(nw*fakt);nh=parseInt(nh*fakt);}
87
- var mh;var tch=jQuery('#wppa-overlay-txt').height();if(wppaOvlTxtHeight=='auto'){if(tch==0)tch=20+2*wppaOvlBorderWidth;mh=ih-tch-20-2*wppaOvlBorderWidth;}
88
- else{mh=ih-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;}
89
- var mw=parseInt(mh*nw/nh);var pt=wppaOvlPadTop;var lft=parseInt((iw-mw)/2);var wid=mw;if(nh<mh){pt=wppaOvlPadTop+(mh-nh)/2;lft=parseInt((iw-nw)/2);wid=nw;}
90
- var done=(wppaSavedImageWidth-wid<3&&wid-wppaSavedImageWidth<3);if(wid<=10){wid=240;nh=180;nw=240;done=false;}
91
- wid=parseInt(wid);wppaSavedImageWidth=parseInt(wid);wppaSavedImageHeight=parseInt(wid*nh/nw);wppaSavedMarginLeft=-parseInt((wid/2+wppaOvlBorderWidth));wppaSavedContainerWidth=parseInt(wid+2*wppaOvlBorderWidth);wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery('#wppa-overlay-txt-container').height()+20);wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2);jQuery('#wppa-overlay-img').animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight,},speed);jQuery('#wppa-overlay-ic').animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop,},speed);if(!done){setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},speed+100);wppaConsoleLog('Not done '+wppaOvlIdx+' saved='+wppaSavedImageWidth+', wid='+wid+', cw='+cw+', nw='+nw+', img complete='+document.getElementById('wppa-overlay-img').complete);}
92
- else{jQuery('#wppa-ovl-spin').stop().fadeOut();wppaConsoleLog('Done '+wppaOvlIdx);wppaOvlFirst=false;}
93
- return true;}
94
- function wppaOvlFormatFull(){wppaConsoleLog('wppaOvlFormatFull '+wppaOvlMode);var img;var natWidth;var natHeight;if(wppaOvlIsVideo){img=document.getElementById('wppa-overlay-img');natWidth=wppaOvlVideoNaturalWidths[wppaOvlIdx];natHeight=wppaOvlVideoNaturalHeights[wppaOvlIdx];}
95
- else{img=document.getElementById('wppa-overlay-img');if(!img||!img.complete){setTimeout('wppaOvlFormatFull()',100);return;}
96
- natWidth=img.naturalWidth;natHeight=img.naturalHeight;}
97
- var screenRatio=jQuery(window).width()/jQuery(window).height();var imageRatio=natWidth/natHeight;var margLeft=0;var margTop=0;var imgHeight=0;var imgWidth=0;var scrollTop=0;var scrollLeft=0;var Overflow='hidden';switch(wppaOvlMode){case'padded':if(screenRatio>imageRatio){margLeft=(jQuery(window).width()-jQuery(window).height()*imageRatio)/2;margTop=0;imgHeight=jQuery(window).height();imgWidth=jQuery(window).height()*imageRatio;}
98
- else{margLeft=0;margTop=(jQuery(window).height()-jQuery(window).width()/imageRatio)/2;imgHeight=jQuery(window).width()/imageRatio;imgWidth=jQuery(window).width();}
99
- break;case'stretched':margLeft=0;margTop=0;imgHeight=jQuery(window).height();imgWidth=jQuery(window).width();break;case'clipped':if(screenRatio>imageRatio){margLeft=0;margTop=(jQuery(window).height()-jQuery(window).width()/imageRatio)/2;imgHeight=jQuery(window).width()/imageRatio;imgWidth=jQuery(window).width();}
100
- else{margLeft=(jQuery(window).width()-jQuery(window).height()*imageRatio)/2;margTop=0;imgHeight=jQuery(window).height();imgWidth=jQuery(window).height()*imageRatio;}
101
- break;case'realsize':margLeft=(jQuery(window).width()-natWidth)/2;if(margLeft<0){scrollLeft=parseInt(-margLeft);margLeft=0;}
102
- margTop=(jQuery(window).height()-natHeight)/2;if(margTop<0){scrollTop=parseInt(-margTop);margTop=0;}
103
- imgHeight=natHeight;imgWidth=natWidth;Overflow='auto';break;}
104
- margLeft=parseInt(margLeft);margTop=parseInt(margTop);imgHeight=parseInt(imgHeight);imgWidth=parseInt(imgWidth);jQuery(img).css({height:imgHeight,width:imgWidth,marginLeft:margLeft,marginTop:margTop,left:0,top:0,maxWidth:10000});jQuery(img).css({visibility:'visible'});jQuery('#wppa-ovl-full-bg').css({overflow:Overflow});jQuery('#wppa-ovl-full-bg').scrollTop(scrollTop);jQuery('#wppa-ovl-full-bg').scrollLeft(scrollLeft);jQuery('#wppa-ovl-spin').stop().fadeOut();return true;}
105
- function wppaOvlUpdateFsId(){wppaConsoleLog('wppaOvlUpdateFsId');wppaOvlFsPhotoId=wppaPhotoId;}
106
- function wppaOvlStartAudio(){wppaConsoleLog('wppaOvlStartAudio');var elm=document.getElementById('wppa-overlay-audio');if(elm){if(typeof(elm.play)=='function'){elm.play();wppaConsoleLog('Audio play '+'wppa-overlay-audio');}}}
107
- function wppaOvlStepMode(){wppaConsoleLog('wppaOvlStepMode from '+wppaOvlMode);var modes=new Array('normal','padded','stretched','clipped','realsize','padded');var i=0;while(i<modes.length){if(wppaOvlMode==modes[i]){wppaOvlMode=modes[i+1];wppaOvlShow(wppaOvlIdx);return;}
108
- i++;}}
109
- function wppaOvlStartStop(){wppaConsoleLog('wppaOvlStartStop called. Running='+wppaOvlRunning);if(wppaOvlRunning){wppaOvlRunning=false;jQuery('#wppa-ovl-start-stop-btn').html(wppaSvgHtml((wppaOvlRunning?'Pause-Button':'Play-Button'),'48px',true,true,'0','20','50','50'));if(wppaOvlIdx!=-1){if(wppaOvlIdx!=0){jQuery('#wppa-ovl-prev-btn').css('visibility','visible');}
110
- if(wppaOvlIdx!=(wppaOvlUrls.length-1)){jQuery('#wppa-ovl-next-btn').css('visibility','visible');}}}
111
- else{jQuery('#wppa-ovl-start-stop-btn').html(wppaSvgHtml((wppaOvlRunning?'Pause-Button':'Pause-Button'),'48px',true,true,'0','20','50','50'));wppaOvlRunning=true;wppaOvlRun();}}
112
- function wppaOvlRun(){wppaConsoleLog('wppaOvlRun, running='+wppaOvlRunning);if(!wppaOvlRunning)return;if(wppaOvlVideoPlaying||wppaOvlAudioPlaying){setTimeout('wppaOvlRun()',500);return;}
113
- if(!wppaIsVideo){var elm=document.getElementById('wppa-overlay-img');if(elm){if(!elm.complete){wppaConsoleLog('Wait during run');setTimeout('wppaOvlRun()',500);return;}}}
114
- var next;if(wppaOvlIdx>=(wppaOvlUrls.length-1))next=0;else next=wppaOvlIdx+1;wppaOvlFsPhotoId=0;wppaPhotoId=0;wppaOvlShow(next);setTimeout('wppaOvlRun()',wppaOvlSlideSpeed);}
115
- function wppaOvlShowPrev(){wppaConsoleLog('wppaOvlShowPrev');wppaOvlFsPhotoId=0;wppaPhotoId=0;if(wppaOvlIsSingle)return false;if(wppaOvlIdx<1){wppaOvlIdx=wppaOvlUrls.length;}
116
- wppaOvlShow(wppaOvlIdx-1);return false;}
117
- function wppaOvlShowNext(){wppaConsoleLog('wppaOvlShowNext');wppaOvlFsPhotoId=0;wppaPhotoId=0;if(wppaOvlIsSingle)return false;if(wppaOvlIdx>=(wppaOvlUrls.length-1)){wppaOvlIdx=-1;}
118
- wppaOvlShow(wppaOvlIdx+1);return false;}
119
- function wppaOvlHide(){wppaConsoleLog('wppaOvlHide');wppaStopAudio();if(wppaOvlMode!='normal'){wppaOvlNorm(true);}
120
- jQuery('#wppa-overlay-ic').html('');jQuery('#wppa-overlay-bg').fadeOut(300);jQuery(document).off('keydown',wppaOvlKeyboardHandler);wppaKbHandlerInstalled=false;wppaOvlFirst=true;wppaOvlRunning=false;wppaOvlMode=wppaOvlModeInitial;wppaNormsBtnOpac=0.75;jQuery('#wppa-ovl-spin').stop().fadeOut();}
121
- function wppaOvlOnclick(event){wppaConsoleLog('wppaOvlOnClick');switch(wppaOvlOnclickType){case'none':break;case'close':if(wppaOvlMode=='normal'){wppaOvlHide();}
122
- break;case'browse':var x=event.screenX-window.screenX;var y=event.clientY;if(y>48){if(x<jQuery(window).width()/2)wppaOvlShowPrev();else wppaOvlShowNext();}
123
- break;default:alert('Unimplemented action: '+wppaOvlOnclickType);break;}
124
- return true;}
125
- function wppaInitOverlay(){wppaConsoleLog('wppaInitOverlay');if(wppaOvlMode==''){wppaOvlMode=wppaOvlModeInitial;}
126
- var anchors=jQuery('a');var anchor;var i;var temp=[];wppaOvlFsPhotoId=0;wppaPhotoId=0;wppaOvlCurIdx=0;if(wppaSavedContainerWidth==0){wppaSavedContainerWidth=240+2*wppaOvlBorderWidth;wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+(wppaOvlTxtHeight=='auto'?50:wppaOvlTxtHeight);wppaSavedMarginLeft=-(120+wppaOvlBorderWidth);wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+(wppaOvlTxtHeight=='auto'?25:wppaOvlTxtHeight/2));wppaSavedImageWidth=240;wppaSavedImageHeight=180+wppaOvlBorderWidth;}
127
- for(i=0;i<anchors.length;i++){anchor=anchors[i];if(jQuery(anchor).attr('data-rel')){temp=jQuery(anchor).attr('data-rel').split("[");}
128
- else if(anchor.rel){temp=anchor.rel.split("[");}
129
- else{temp[0]='';}
130
- if(temp[0]=='wppa'){wppaWppaOverlayActivated=true;if(wppaIsMobile){jQuery(anchor).on('touchstart',function(event){wppaStartTime();});jQuery(anchor).on('touchend',function(event){if(wppaInTime()){wppaOvlShow(this);}
131
- event.preventDefault();});}
132
- else{jQuery(anchor).on('click',function(event){wppaOvlShow(this);event.preventDefault();});}
133
- if(wppaIsMobile){window.addEventListener('orientationchange',wppaDoOnOrientationChange);}}}}
134
- function wppaOvlResize(){wppaConsoleLog('wppaOvlResize');setTimeout('wppaOvlSize( '+wppaOvlAnimSpeed+' )',100);if(wppaOvlAudioStart&&!wppaOvlAudioPlaying){setTimeout('wppaOvlStartAudio()',1000);}}
135
- function wppaShowFsButtons(opac){if(typeof(opac)!='undefined'){wppaNormsBtnOpac=opac;}
136
- jQuery('#wppa-exit-btn').stop().fadeTo(3,wppaNormsBtnOpac);if(wppaOvlMode=='normal'){jQuery('#wppa-fulls-btn').stop().fadeTo(3,wppaNormsBtnOpac);}
137
- else{jQuery('#wppa-norms-btn').stop().fadeTo(3,wppaNormsBtnOpac);}}
138
- wppaConsoleLog('wppa-lightbox.js version '+wppaLightboxVersion+' loaded.','force');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wppa-popup.min.js DELETED
@@ -1,15 +0,0 @@
1
- // wppa-popup.js
2
- //
3
- // Contains popup modules
4
- // Dependancies: wppa.js and default wp jQuery library
5
- //
6
-
7
- var wppaJsPopupVersion='6.1.9';function wppaPopUp(mocc,elm,id,name,desc,rating,ncom,videohtml,maxsizex,maxsizey){var topDivBig,topDivSmall,leftDivBig,leftDivSmall;var heightImgBig,heightImgSmall,widthImgBig,widthImgSmall,widthImgBigSpace;var puImg;var imghtml;if(document.getElementById('x-'+id+'-'+mocc)){var namediv=name?'<div id="wppa-name-'+mocc+'" style="display:none; padding:1px;" class="wppa_pu_info">'+name+'</div>':'';var descdiv=desc?'<div id="wppa-desc-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+desc+'</div>':'';var ratediv=rating?'<div id="wppa-rat-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+rating+'</div>':'';var ncomdiv=ncom?'<div id="wppa-ncom-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+ncom+'</div>':'';var popuptext=namediv+descdiv+ratediv+ncomdiv;var target='';if(wppaThumbTargetBlank){target='target="_blank"';}
8
- switch(wppaPopupLinkType){case'none':imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+imghtml+popuptext+'</div>');break;case'fullpopup':imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[id]+'" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+imghtml+popuptext+'</div>');break;default:if(elm.onclick){imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+imghtml+popuptext+'</div>');document.getElementById('wppa-img-'+mocc).onclick=elm.onclick;}
9
- else{imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById('x-'+id+'-'+mocc).href+'" '+target+' style="line-height:1px;" >'+imghtml+'</a>'+popuptext+'</div>');}}}
10
- puImg=document.getElementById('wppa-img-'+mocc);widthImgBig=parseInt(maxsizex);heightImgBig=parseInt(maxsizey);if(puImg)jQuery(".wppa_pu_info").css('width',((widthImgBig>heightImgBig?widthImgBig:heightImgBig)-8)+'px');leftDivSmall=parseInt(elm.offsetLeft)-7-5-1;topDivSmall=parseInt(elm.offsetTop)-7-1;widthImgSmall=parseInt(elm.clientWidth);heightImgSmall=parseInt(elm.clientHeight);widthImgBigSpace=widthImgBig>heightImgBig?widthImgBig:heightImgBig;leftDivBig=leftDivSmall-parseInt((widthImgBigSpace-widthImgSmall)/2);topDivBig=topDivSmall-parseInt((heightImgBig-heightImgSmall)/2);var lrMarg=parseInt((widthImgBigSpace-widthImgBig)/2);jQuery('#wppa-img-'+mocc).css({"maxWidth":widthImgBig+"px"});jQuery('#wppa-popup-'+mocc).css({"marginLeft":leftDivSmall+"px","marginTop":topDivSmall+"px"});jQuery('#wppa-img-'+mocc).css({"marginLeft":0,"marginRight":0,"width":widthImgSmall+"px","height":heightImgSmall+"px"});jQuery('#wppa-popup-'+mocc).stop().animate({"marginLeft":leftDivBig+"px","marginTop":topDivBig+"px"},400);jQuery('#wppa-img-'+mocc).stop().animate({"marginLeft":lrMarg+"px","marginRight":lrMarg+"px","width":widthImgBig+"px","height":heightImgBig+"px"},400);setTimeout('wppaPopReady( '+mocc+' )',400);}
11
- function wppaPopReady(mocc){jQuery("#wppa-name-"+mocc).show();jQuery("#wppa-desc-"+mocc).show();jQuery("#wppa-rat-"+mocc).show();jQuery("#wppa-ncom-"+mocc).show();}
12
- function wppaPopDown(mocc){jQuery('#wppa-popup-'+mocc).html("");return;}
13
- function wppaFullPopUp(mocc,id,url,xwidth,xheight){var height=xheight+50;var width=xwidth+14;var name='';var desc='';var elm=document.getElementById('i-'+id+'-'+mocc);if(elm){name=elm.alt;desc=elm.title;}
14
- var wnd=window.open('','Print','width='+width+', height='+height+', location=no, resizable=no, menubar=yes ');wnd.document.write('<html>');wnd.document.write('<head>');wnd.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+'; text-align:center;}</style>');wnd.document.write('<title>'+name+'</title>');wnd.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ></script>'+'<script type="text/javascript">function wppa_downl() {'+'jQuery.ajax( { url: \''+wppaAjaxUrl+'\','+'data: \'action=wppa'+'&wppa-action=makeorigname'+'&photo-id='+id+'&from=popup'+'\','+'async: true,'+'type: \'GET\','+'timeout: 10000,'+'beforeSend: function( xhr ) {'+'},'+'success: function( 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: function( xhr, status, error ) {'+'wppaConsoleLog( \'wppaFullPopUp failed. Error = \' + error + \', status = \' + status, \'force\' );'+'},'+'} );'+'}</script>');wnd.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>');wnd.document.write('</head>');wnd.document.write('<body>');wnd.document.write('<div style="width:'+xwidth+'px;">');wnd.document.write('<img src="'+url+'" style="padding-bottom:6px;" /><br/>');wnd.document.write('<div style="text-align:center">'+desc+'</div>');var left=xwidth-66;wnd.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+left+'px; background-color:'+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />');left=xwidth-30;wnd.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+left+'px; background-color:'+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />');wnd.document.write('</div>');wnd.document.write('</body>');wnd.document.write('</html>');}
15
- wppaConsoleLog('wppa-popup.js version '+wppaJsPopupVersion+' loaded.','force');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wppa-slideshow.js CHANGED
@@ -837,6 +837,13 @@ function _wppaNextSlide_5( mocc ) {
837
  }
838
  }
839
  }
 
 
 
 
 
 
 
840
  }
841
 
842
  // Format a slide
837
  }
838
  }
839
  }
840
+
841
+ /* invre modification */
842
+ /* activate the placeholder with actual html */
843
+ if ( renderInvisibleReCaptcha ) {
844
+ renderInvisibleReCaptcha();
845
+ }
846
+ /* end invre modification */
847
  }
848
 
849
  // Format a slide
js/wppa-slideshow.min.js DELETED
@@ -1,226 +0,0 @@
1
- // wppa-slideshow.js
2
- //
3
- // Contains slideshow modules
4
- // Dependancies: wppa.js and default wp jQuery library
5
- //
6
-
7
- var wppaJsSlideshowVersion='6.6.20';function wppaStoreSlideInfo(mocc,id,url,size,width,height,fullname,name,desc,photoid,avgrat,discount,myrat,rateurl,linkurl,linktitle,linktarget,iwtimeout,commenthtml,iptchtml,exifhtml,lbtitle,shareurl,smhtml,ogdsc,hiresurl,videohtml,audiohtml,waittext,imagealt,posterurl){var cursor;desc=wppaRepairScriptTags(desc);if(!_wppaSlides[mocc]||'0'==id){_wppaSlides[mocc]=[];_wppaNames[mocc]=[];_wppaFullNames[mocc]=[];_wppaDsc[mocc]=[];_wppaOgDsc[mocc]=[];_wppaCurIdx[mocc]=-1;_wppaNxtIdx[mocc]=0;if(parseInt(iwtimeout)>0)_wppaTimeOut[mocc]=parseInt(iwtimeout);else _wppaTimeOut[mocc]=wppaSlideShowTimeOut;_wppaSSRuns[mocc]=false;_wppaTP[mocc]=-2;_wppaFg[mocc]=0;_wppaIsBusy[mocc]=false;_wppaFirst[mocc]=true;_wppaId[mocc]=[];_wppaAvg[mocc]=[];_wppaDisc[mocc]=[];_wppaMyr[mocc]=[];_wppaVRU[mocc]=[];_wppaLinkUrl[mocc]=[];_wppaLinkTitle[mocc]=[];_wppaLinkTarget[mocc]=[];_wppaCommentHtml[mocc]=[];_wppaIptcHtml[mocc]=[];_wppaExifHtml[mocc]=[];_wppaUrl[mocc]=[];_wppaSkipRated[mocc]=false;_wppaLbTitle[mocc]=[];_wppaDidGoto[mocc]=false;wppaSlidePause[mocc]=false;_wppaShareUrl[mocc]=[];_wppaShareHtml[mocc]=[];_wppaFilmNoMove[mocc]=false;_wppaHiresUrl[mocc]=[];_wppaIsVideo[mocc]=[];_wppaVideoHtml[mocc]=[];_wppaAudioHtml[mocc]=[];_wppaVideoNatWidth[mocc]=[];_wppaVideoNatHeight[mocc]=[];wppaVideoPlaying[mocc]=false;wppaAudioPlaying[mocc]=false;_wppaWaitTexts[mocc]=[];_wppaImageAlt[mocc]=[];}
8
- cursor='default';if(linkurl!=''){cursor='pointer';}
9
- else if(wppaLightBox[mocc]!=''){cursor='url( '+wppaImageDirectory+wppaMagnifierCursor+' ),pointer';}
10
- _wppaIsVideo[mocc][id]=(''!=videohtml);if(_wppaIsVideo[mocc][id]){_wppaSlides[mocc][id]=' alt="'+imagealt+'" class="theimg theimg-'+mocc+' big" ';if(wppaSlideVideoStart&&wppaLightBox[mocc]==''){_wppaSlides[mocc][id]+=' autoplay ';}
11
- if(posterurl.length>0){_wppaSlides[mocc][id]+=' poster="'+posterurl+'" ';}}
12
- else{_wppaSlides[mocc][id]=' src="'+url+'" alt="'+imagealt+'" class="theimg theimg-'+mocc+' big stereo" ';}
13
- if(wppaSlideSwipe){_wppaSlides[mocc][id]+=' ontouchstart="wppaTouchStart( event, this.id, '+mocc+' );"'+' ontouchend="wppaTouchEnd( event );"'+' ontouchmove="wppaTouchMove( event );"'+' ontouchcancel="wppaTouchCancel( event );" ';}
14
- if(!wppaAutoColumnWidth[mocc])_wppaSlides[mocc][id]+='width="'+width+'" height="'+height+'" ';if(_wppaIsVideo[mocc][id]){var controls;controls='wppa'==wppaLightBox[mocc]?'':'controls';_wppaSlides[mocc][id]+='style="'+size+'; cursor:'+cursor+'; display:none;" '+controls+'>'+videohtml+'</video>';}
15
- else{_wppaSlides[mocc][id]+='style="'+size+'; cursor:'+cursor+'; display:none; vertical-align:middle;">';}
16
- _wppaFullNames[mocc][id]=fullname;_wppaNames[mocc][id]=name;_wppaDsc[mocc][id]=desc;_wppaOgDsc[mocc][id]=ogdsc;_wppaId[mocc][id]=photoid;_wppaAvg[mocc][id]=avgrat;wppaConsoleLog('_wppaAvg[mocc][id]='+_wppaAvg[mocc][id],'force');_wppaDisc[mocc][id]=discount;wppaConsoleLog('discount='+discount,'force');_wppaMyr[mocc][id]=myrat;wppaConsoleLog('myrat='+myrat,'force');_wppaVRU[mocc][id]=rateurl;_wppaLinkUrl[mocc][id]=linkurl;_wppaLinkTitle[mocc][id]=linktitle;if(linktarget!=''){_wppaLinkTarget[mocc][id]=linktarget;}
17
- else if(wppaSlideBlank[mocc]){_wppaLinkTarget[mocc][id]='_blank';}
18
- else{_wppaLinkTarget[mocc][id]='_self';}
19
- _wppaCommentHtml[mocc][id]=commenthtml;_wppaIptcHtml[mocc][id]=iptchtml;_wppaExifHtml[mocc][id]=exifhtml;_wppaUrl[mocc][id]=url;_wppaLbTitle[mocc][id]=wppaRepairScriptTags(lbtitle);_wppaShareUrl[mocc][id]=shareurl;_wppaShareHtml[mocc][id]=wppaRepairScriptTags(smhtml);_wppaHiresUrl[mocc][id]=hiresurl;_wppaVideoHtml[mocc][id]=videohtml;_wppaAudioHtml[mocc][id]=audiohtml;_wppaVideoNatWidth[mocc][id]=width;_wppaVideoNatHeight[mocc][id]=height;_wppaWaitTexts[mocc][id]=waittext;_wppaImageAlt[mocc][id]=imagealt;}
20
- function wppaSpeed(mocc,faster){if(_wppaSSRuns[mocc]){_wppaSpeed(mocc,faster);}}
21
- function wppaStopShow(mocc){if(_wppaSSRuns[mocc]){_wppaStop(mocc);}}
22
- function wppaStartStop(mocc,index){if(_wppaIsBusy[mocc]){_wppaTP[mocc]=index;}
23
- else{if(_wppaSSRuns[mocc]){_wppaStop(mocc);jQuery('#wppa-startstop-icon-'+mocc).html(wppaSvgHtml('Play-Button','48px',false,true,'0','10','50','50'));}
24
- else{_wppaStart(mocc,index);if(index==-1){jQuery('#wppa-startstop-icon-'+mocc).html(wppaSvgHtml('Pause-Button','48px',false,true,'0','10','50','50'));}}
25
- if(wppaIsMobile){jQuery('#wppa-startstop-icon-'+mocc).stop().fadeTo(10,1).fadeTo(3000,0);jQuery('.ubb-'+mocc).stop().fadeTo(10,1).fadeTo(3000,0);}}}
26
- function wppaBbb(mocc,where,act){if(!_wppaSSRuns[mocc]){_wppaBbb(mocc,where,act);}}
27
- function wppaUbb(mocc,where,act){_wppaUbb(mocc,where,act);}
28
- function wppaRateIt(mocc,value){_wppaRateIt(mocc,value);}
29
- function wppaOvlRateIt(id,value,mocc,reloadAfter){_wppaOvlRateIt(id,value,mocc,reloadAfter);}
30
- function wppaPrev(mocc){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaPrev(mocc);}}
31
- function wppaPrevN(mocc,n){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaPrevN(mocc,n);}}
32
- function wppaFirst(mocc){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaGoto(mocc,0);}}
33
- function wppaNext(mocc){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaNext(mocc);}}
34
- function wppaNextN(mocc,n){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaNextN(mocc,n);}}
35
- function wppaLast(mocc){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaGoto(mocc,_wppaSlides[mocc].length-1);}}
36
- function wppaFollowMe(mocc,idx){if(!_wppaSSRuns[mocc]){_wppaFollowMe(mocc,idx);}}
37
- function wppaLeaveMe(mocc,idx){if(!_wppaSSRuns[mocc]){_wppaLeaveMe(mocc,idx);}}
38
- function wppaGoto(mocc,idx){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaGoto(mocc,idx);}}
39
- function wppaGotoFilmNoMove(mocc,idx){_wppaDidGoto[mocc]=true;if(!_wppaSSRuns[mocc]){_wppaFilmNoMove[mocc]=true;_wppaGoto(mocc,idx);}}
40
- function wppaGotoKeepState(mocc,idx){if(_wppaNxtIdx[mocc]==idx)return;_wppaDidGoto[mocc]=true;_wppaGotoKeepState(mocc,idx);}
41
- function _wppaGotoKeepState(mocc,idx){if(_wppaSSRuns[mocc]){_wppaGotoRunning(mocc,idx);}
42
- else{_wppaGoto(mocc,idx);}}
43
- function wppaGotoRunning(mocc,idx){_wppaDidGoto[mocc]=true;_wppaGotoRunning(mocc,idx);}
44
- function wppaValidateComment(mocc){return _wppaValidateComment(mocc);}
45
- function _wppaNextSlide(mocc,mode){var fg=_wppaFg[mocc];var bg=1-fg;if((wppaVideoPlaying[mocc]||wppaAudioPlaying[mocc])&&_wppaSSRuns[mocc]){setTimeout('_wppaNextSlide( '+mocc+', \''+mode+'\' )',500);return;}
46
- wppaStopVideo(mocc);wppaStopAudio(mocc);if('auto'==mode){if(wppaSlidePause[mocc]){jQuery('#theimg'+fg+'-'+mocc).attr("title",wppaSlidePause[mocc]);jQuery('#slide_frame-'+mocc).attr("title",wppaSlidePause[mocc]);setTimeout('_wppaNextSlide( '+mocc+', "auto" )',250);return;}}
47
- else{jQuery('#slide_frame-'+mocc).removeAttr("title");}
48
- if(!_wppaSSRuns[mocc]&&'auto'==mode)return;if(!_wppaSlides[mocc])return;if(_wppaSlides[mocc].length<2&&!_wppaFirst[mocc])return;if(!_wppaSSRuns[mocc]&&'reset'==mode){_wppaSSRuns[mocc]=true;__wppaOverruleRun=false;}
49
- _wppaVoteInProgress=false;_wppaIsBusy[mocc]=true;if(_wppaSSRuns[mocc])_wppaShowMetaData(mocc,'hide');if(_wppaSSRuns[mocc]){_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]+1;if(_wppaNxtIdx[mocc]==_wppaSlides[mocc].length)_wppaNxtIdx[mocc]=0;}
50
- jQuery('#geodiv-'+mocc+'-'+_wppaId[mocc][_wppaCurIdx[mocc]]).css({display:'none'});jQuery('#geodiv-'+mocc+'-'+_wppaId[mocc][_wppaNxtIdx[mocc]]).css({display:''});if(typeof(_wppaLat)!='undefined'){if(_wppaLat[mocc]){if(_wppaLat[mocc][_wppaId[mocc][_wppaNxtIdx[mocc]]]){jQuery('#map-canvas-'+mocc).css('display','');wppaGeoInit(mocc,_wppaLat[mocc][_wppaId[mocc][_wppaNxtIdx[mocc]]],_wppaLon[mocc][_wppaId[mocc][_wppaNxtIdx[mocc]]]);}
51
- else jQuery('#map-canvas-'+mocc).css('display','none');}
52
- else jQuery('#map-canvas-'+mocc).css('display','none');}
53
- else jQuery('#map-canvas-'+mocc).css('display','none');jQuery('[id^=wppa-numbar-'+mocc+'-]').css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar});jQuery("#wppa-numbar-"+mocc+"-"+_wppaNxtIdx[mocc]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive});if(_wppaSlides[mocc].length>wppaNumbarMax){jQuery('[id^=wppa-numbar-'+mocc+'-]').html(' . ');jQuery("#wppa-numbar-"+mocc+"-"+_wppaNxtIdx[mocc]).html(' '+(_wppaNxtIdx[mocc]+1)+' ');}
54
- if(_wppaFirst[mocc]){if(_wppaCurIdx[mocc]!=-1){wppaMakeTheSlideHtml(mocc,'0',_wppaCurIdx[mocc]);}
55
- wppaMakeTheSlideHtml(mocc,'1',_wppaNxtIdx[mocc]);jQuery("#imagedesc-"+mocc).html(_wppaDsc[mocc][_wppaCurIdx[mocc]]);jQuery("#imagetitle-"+mocc).html(wppaMakeNameHtml(mocc));jQuery("#wppa-comments-"+mocc).html(_wppaCommentHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#iptc-"+mocc).html(_wppaIptcHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#exif-"+mocc).html(_wppaExifHtml[mocc][_wppaCurIdx[mocc]]);if(wppaSlideshowNavigationType=='icons'){jQuery('#prev-arrow-'+mocc).html(wppaSvgHtml('Prev-Button','1.5em',false,true));jQuery('#next-arrow-'+mocc).html(wppaSvgHtml('Next-Button','1.5em',false,true));}
56
- else{if(wppaIsMini[mocc]||wppaGetContainerWidth(mocc)<wppaMiniTreshold){jQuery('#prev-arrow-'+mocc).html('&laquo;&nbsp;'+wppaPrevP);jQuery('#next-arrow-'+mocc).html(wppaNextP+'&nbsp;&raquo;');}
57
- else{jQuery('#prev-arrow-'+mocc).html('&laquo;&nbsp;'+wppaPreviousPhoto);jQuery('#next-arrow-'+mocc).html(wppaNextPhoto+'&nbsp;&raquo;');}}
58
- if(wppaIsMini[mocc]||wppaGetContainerWidth(mocc)<wppaMiniTreshold){jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRat);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRat);}
59
- else{jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRating);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRating);}}
60
- else{wppaMakeTheSlideHtml(mocc,bg,_wppaNxtIdx[mocc]);}
61
- _wppaLoadSpinner(mocc);_wppaFirst[mocc]=false;_wppaCheckRewind(mocc);wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);setTimeout('_wppaNextSlide_2( '+mocc+' )',10);}
62
- function _wppaNextSlide_2(mocc){var fg=_wppaFg[mocc];var bg=1-fg;var elm=document.getElementById('theimg'+bg+"-"+mocc);if(elm){if(1==elm.nodeType){if('IMG'==elm.nodeName){if(!elm.complete){setTimeout('_wppaNextSlide_2( '+mocc+' )',100);wppaConsoleLog('Retry next2');return;}}}}
63
- wppaUpdateLightboxes();_wppaUnloadSpinner(mocc);if(_wppaSSRuns[mocc]!=-1){if(!_wppaToTheSame){_wppaShowMetaData(mocc,'hide');}}
64
- _wppaFg[mocc]=1-_wppaFg[mocc];fg=_wppaFg[mocc];bg=1-fg;setTimeout('_wppaNextSlide_3( '+mocc+' )',10);}
65
- function _wppaNextSlide_3(mocc){var nw=_wppaFg[mocc];var ol=1-nw;var olIdx=_wppaCurIdx[mocc];var nwIdx=_wppaNxtIdx[mocc];var olSli="#theslide"+ol+"-"+mocc;var nwSli="#theslide"+nw+"-"+mocc;var olImg="#theimg"+ol+"-"+mocc;var nwImg="#theimg"+nw+"-"+mocc;var w=parseInt(jQuery(olSli).css('width'));var dir='nil';if(olIdx==nwIdx)dir='none';if(olIdx==nwIdx-1)dir='left';if(olIdx==nwIdx+1)dir='right';if(olIdx==_wppaSlides[mocc].length-1&&0==nwIdx&&wppaSlideWrap)dir='left';if(0==olIdx&&nwIdx==_wppaSlides[mocc].length-1&&wppaSlideWrap)dir='right';if('nil'==dir){if(olIdx<nwIdx)dir='left';else dir='right';}
66
- jQuery(olSli).css({marginLeft:0,width:w});jQuery(nwSli).css({marginLeft:0,width:w});wppaFormatSlide(mocc);switch(wppaAnimationType){case'fadeover':jQuery(olImg).fadeOut(wppaAnimationSpeed);jQuery(nwImg).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(mocc));break;case'fadeafter':jQuery(olImg).fadeOut(wppaAnimationSpeed);jQuery(nwImg).delay(wppaAnimationSpeed).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(mocc));break;case'swipe':switch(dir){case'left':jQuery(olSli).animate({marginLeft:-w+"px"},wppaAnimationSpeed,"swing");jQuery(nwSli).css({marginLeft:w+"px"});jQuery(nwImg).fadeIn(10);jQuery(nwSli).animate({marginLeft:0+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));break;case'right':jQuery(olSli).animate({marginLeft:w+"px"},wppaAnimationSpeed,"swing");jQuery(nwSli).css({marginLeft:-w+"px"});jQuery(nwImg).fadeIn(10);jQuery(nwSli).animate({marginLeft:0+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));break;case'none':jQuery(nwImg).fadeIn(10);setTimeout('_wppaNextSlide_4( '+mocc+' )',10);break;}
67
- break;case'stackon':switch(dir){case'left':jQuery(olSli).css({zIndex:80});jQuery(nwSli).css({marginLeft:w+"px",zIndex:81});jQuery(nwImg).fadeIn(10);jQuery(olImg).delay(wppaAnimationSpeed).fadeOut(10);jQuery(nwSli).animate({marginLeft:0+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));break;case'right':jQuery(olSli).css({zIndex:80});jQuery(nwSli).css({marginLeft:-w+"px",zIndex:81});jQuery(nwImg).fadeIn(10);jQuery(olImg).delay(wppaAnimationSpeed).fadeOut(10);jQuery(nwSli).animate({marginLeft:0+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));break;case'none':jQuery(nwImg).fadeIn(10);setTimeout('_wppaNextSlide_4( '+mocc+' )',10);break;}
68
- break;case'stackoff':switch(dir){case'left':jQuery(olSli).css({marginLeft:0,zIndex:81});jQuery(olSli).animate({marginLeft:-w+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));jQuery(nwSli).css({marginLeft:0,zIndex:80});jQuery(nwImg).fadeIn(10);jQuery(olImg).delay(wppaAnimationSpeed).fadeOut(10);break;case'right':jQuery(olSli).css({marginLeft:0,zIndex:81});jQuery(olSli).animate({marginLeft:w+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));jQuery(nwSli).css({marginLeft:0,zIndex:80});jQuery(nwImg).fadeIn(10);jQuery(olImg).delay(wppaAnimationSpeed).fadeOut(10);break;case'none':jQuery(nwImg).fadeIn(10);setTimeout('_wppaNextSlide_4( '+mocc+' )',10);break;}
69
- break;case'turnover':switch(dir){case'left':case'right':var nwImgWid=parseInt(jQuery(nwSli).css('width'));var nwMarLft=parseInt(jQuery(nwImg).css('marginLeft'));jQuery(olSli).css({zIndex:80});jQuery(nwSli).css({zIndex:81,width:0});jQuery(nwImg).css({maxWidth:0,marginLeft:0});jQuery(nwImg).fadeIn(10);jQuery(nwSli).animate({width:w},wppaAnimationSpeed,"swing");jQuery(nwImg).animate({maxWidth:nwImgWid,marginLeft:nwMarLft},wppaAnimationSpeed,"swing",_wppaNextSlide_4(mocc));jQuery(olImg).delay(wppaAnimationSpeed).fadeOut(10);break;case'none':jQuery(nwImg).fadeIn(10);setTimeout('_wppaNextSlide_4( '+mocc+' )',10);break;}
70
- break;default:alert('Animation type '+wppaAnimationType+' is not supported in this version');}}
71
- function _wppaNextSlide_4(mocc){var nw=_wppaFg[mocc];var ol=1-nw;var olSli="#theslide"+ol+"-"+mocc;var nwSli="#theslide"+nw+"-"+mocc;jQuery(olSli).css({zIndex:80});jQuery(nwSli).css({zIndex:81});_wppaCurIdx[mocc]=_wppaNxtIdx[mocc];wppaFormatSlide(mocc);if(wppaIsMini[mocc]||wppaGetContainerWidth(mocc)<wppaMiniTreshold){jQuery('#counter-'+mocc).html((_wppaCurIdx[mocc]+1)+' / '+_wppaSlides[mocc].length);}
72
- else{jQuery('#counter-'+mocc).html(wppaPhoto+' '+(_wppaCurIdx[mocc]+1)+' '+wppaOf+' '+_wppaSlides[mocc].length);}
73
- jQuery('#bc-pname-modal-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);jQuery('#bc-pname-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);_wppaAdjustFilmstrip(mocc);_wppaSetRatingDisplay(mocc);setTimeout('_wppaNextSlide_5( '+mocc+' )',_wppaTextDelay);}
74
- function _wppaNextSlide_5(mocc){if(!_wppaToTheSame){var imageDescHtml=_wppaDsc[mocc][_wppaCurIdx[mocc]];jQuery('#imagedesc-'+mocc).html(imageDescHtml);if(wppaHideWhenEmpty){var desc=_wppaDsc[mocc][_wppaCurIdx[mocc]];if(''==desc||'&nbsp;'==desc){jQuery('#descbox-'+mocc).css('display','none');}
75
- else{jQuery('#descbox-'+mocc).css('display','');}}
76
- jQuery("#imagetitle-"+mocc).html(wppaMakeNameHtml(mocc));jQuery("#wppa-comments-"+mocc).html(_wppaCommentHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#iptc-"+mocc).html(_wppaIptcHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#exif-"+mocc).html(_wppaExifHtml[mocc][_wppaCurIdx[mocc]]);jQuery("#wppa-share-"+mocc).html(_wppaShareHtml[mocc][_wppaCurIdx[mocc]]);}
77
- _wppaToTheSame=false;if(_wppaSSRuns[mocc]&&!wppaSlideWrap&&((_wppaCurIdx[mocc]+1)==_wppaSlides[mocc].length)){_wppaIsBusy[mocc]=false;_wppaStop(mocc);return;}
78
- _wppaShowMetaData(mocc,'show');if(_wppaTP[mocc]!=-2){var index=_wppaTP[mocc];_wppaTP[mocc]=-2;_wppaDidGoto[mocc]=false;_wppaIsBusy[mocc]=false;if(!wppaIsMini[mocc]){_bumpViewCount(_wppaId[mocc][_wppaCurIdx[mocc]]);}
79
- _wppaDoAutocol(mocc);wppaStartStop(mocc,index);return;}
80
- else{wppaUpdateLightboxes();if(!wppaIsMini[mocc]){var visurl=wppaGetCurrentFullUrl(mocc,_wppaCurIdx[mocc]);if(''==visurl){visurl=_wppaShareUrl[mocc][_wppaCurIdx[mocc]];}
81
- if(typeof(wppaQRUpdate)!='undefined'){wppaQRUpdate(_wppaShareUrl[mocc][_wppaCurIdx[mocc]]);}
82
- if(_wppaSlides[mocc].length>1){wppaPushStateSlide(mocc,_wppaCurIdx[mocc],visurl);}}
83
- if(_wppaSSRuns[mocc]){setTimeout('_wppaNextSlide( '+mocc+', "auto" )',wppaGetSlideshowTimeout(mocc));}}
84
- jQuery(document).trigger('glossaryTooltipReady');_wppaDidGoto[mocc]=false;_wppaIsBusy[mocc]=false;if(!wppaIsMini[mocc]){_bumpViewCount(_wppaId[mocc][_wppaCurIdx[mocc]]);}
85
- _wppaDoAutocol(mocc);wppaStopAudio(mocc);if(wppaSlideAudioStart){var elms=jQuery('.wppa-audio-'+_wppaId[mocc][_wppaCurIdx[mocc]]+'-'+mocc);if(elms.length>0){var audio=elms[elms.length-1];if(audio){if(!wppaAudioPlaying[mocc]){audio.play();}}}}}
86
- function wppaFormatSlide(mocc){var imgid='theimg'+_wppaFg[mocc]+'-'+mocc;var slideid='theslide'+_wppaFg[mocc]+'-'+mocc;var frameid='slide_frame-'+mocc;var contw=wppaColWidth[mocc];var elm=document.getElementById(imgid);var audios=jQuery('.wppa-audio-'+mocc);if(!elm)return;if(typeof(contw)=='undefined'||contw==0){contw=wppaGetContainerWidth(mocc);wppaColWidth[mocc]=contw;}
87
- var natwidth=elm.naturalWidth;if(typeof(natwidth)=='undefined')natwidth=parseInt(elm.style.maxWidth);var natheight=elm.naturalHeight;if(typeof(natheight)=='undefined')natheight=parseInt(elm.style.maxHeight);var aspect=wppaAspectRatio[mocc];var fullsize=wppaFullSize[mocc];var delta=wppaFullFrameDelta[mocc];var ponly=wppaPortraitOnly[mocc];var valign=wppaFullValign[mocc];if(typeof(valign)=='undefined')valign='none';var halign=wppaFullHalign[mocc];if(typeof(halign)=='undefined')halign='none';var stretch=wppaStretch;var imgw,imgh;var margl,margt;var slidew,slideh;var framew,frameh;if(ponly){imgw=contw-delta;imgh=parseInt(imgw*natheight/natwidth);margl=0;margt=0;slidew=contw;slideh=imgh+delta;framew=contw;frameh=slideh;jQuery('#'+frameid).css({width:framew,height:frameh});jQuery('#'+slideid).css({width:slidew,height:slideh});jQuery('#'+imgid).css({width:imgw,height:imgh});}
88
- else{framew=contw;if(fullsize<contw){framew=fullsize;}
89
- frameh=parseInt(framew*aspect);slidew=framew;slideh=frameh;if(stretch||natwidth>=(framew-delta)||natheight>=(frameh-delta)){if(((natheight+delta)/(natwidth+delta))>aspect){imgh=frameh-delta;imgw=parseInt(imgh*natwidth/natheight);}
90
- else{imgw=framew-delta;imgh=parseInt(imgw*natheight/natwidth);}}
91
- else{imgw=natwidth;imgh=natheight;}
92
- if(valign!='default'&&valign!='none'){switch(valign){case'top':margt=0;break;case'center':margt=parseInt((frameh-(imgh+delta))/2);break;case'bottom':margt=frameh-(imgh+delta);break;case'fit':margt=0;frameh=imgh+delta;slideh=imgh+delta;break;default:}
93
- jQuery('#'+imgid).css({marginTop:margt,marginBottom:0});}
94
- jQuery('#'+frameid).css({width:framew,height:frameh});jQuery('#'+slideid).css({width:slidew,height:slideh});jQuery('#'+imgid).css({width:imgw,height:imgh});if(valign!='default'&&valign!='none'&&halign!='none'&&halign!='default'){switch(halign){case'left':margl=0;break;case'center':margl=parseInt((contw-framew)/2);break;case'right':margl=contw-framew;break;default:}
95
- if(margl<0)margl=0;jQuery('#'+imgid).css({marginLeft:'auto',marginRight:'auto'});jQuery('#'+frameid).css({marginLeft:margl});}
96
- if(audios.length>0){var i=0;jQuery(audios[i]).css({width:imgw,left:(contw-imgw)/2});i++;}}
97
- var bbbwidth=parseInt(framew/3);var leftmarg=bbbwidth*2;jQuery('#bbb-'+mocc+'-l').css({height:frameh,width:bbbwidth,left:0});jQuery('#bbb-'+mocc+'-r').css({height:frameh,width:bbbwidth,left:leftmarg});}
98
- function wppaMakeNameHtml(mocc){var result='';if(_wppaCurIdx[mocc]<0)return'';if(wppaIsMini[mocc]||_wppaIsVideo[mocc][_wppaCurIdx[mocc]]){result=_wppaFullNames[mocc][_wppaCurIdx[mocc]];}
99
- else switch(wppaArtMonkyLink){case'file':case'zip':if(wppaArtMonkeyButton){if(_wppaFullNames[mocc][_wppaCurIdx[mocc]]){var label=_wppaFullNames[mocc][_wppaCurIdx[mocc]].split('<img');result='<input'+' type="button"'+' title="Download"'+' style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(mocc)-24)+'px;"'+' class="wppa-download-button"'+' onclick="'+(wppaIsSafari&&wppaArtMonkyLink=='file'?'wppaWindowReference = window.open();':'')+'wppaAjaxMakeOrigName( '+mocc+', \''+_wppaId[mocc][_wppaCurIdx[mocc]]+'\' );"'+' value="'+wppaDownLoad+': '+label[0]+'"'+' />';if(label[1])result+='<img'+label[1];}
100
- else{result='';}}
101
- else{result='<a'+' title="Download"'+' style="cursor:pointer;"'+' onclick="'+(wppaIsSafari&&wppaArtMonkyLink=='file'?'wppaWindowReference = window.open();':'')+'wppaAjaxMakeOrigName( '+mocc+', \''+_wppaId[mocc][_wppaCurIdx[mocc]]+'\' );"'+' >'+
102
- wppaDownLoad+': '+_wppaFullNames[mocc][_wppaCurIdx[mocc]]+'</a>';}
103
- break;case'none':result=_wppaFullNames[mocc][_wppaCurIdx[mocc]];break;default:result='';}
104
- return wppaRepairBrTags(result);}
105
- function wppaMakeTheSlideHtml(mocc,bgfg,idx){var imgVideo=(_wppaIsVideo[mocc][idx])?'video':'img';var theHtml;var url;var theTitle='title';if(wppaLightBox[mocc]=='wppa')theTitle='data-lbtitle';var mmEvents=wppaLightBox[mocc]==''?' onpause="wppaVideoPlaying['+mocc+'] = false;" onplay="wppaVideoPlaying['+mocc+'] = true;"':'';if(_wppaLinkUrl[mocc][idx]!=''){if(wppaSlideToFullpopup){theHtml='<a onclick="wppaStopAudio();wppaStopShow('+mocc+');'+_wppaLinkUrl[mocc][idx]+'" target="'+_wppaLinkTarget[mocc][idx]+'" title="'+_wppaLinkTitle[mocc][idx]+'">'+'<'+imgVideo+mmEvents+' title="'+_wppaLinkTitle[mocc][idx]+'" id="theimg'+bgfg+'-'+mocc+'" '+_wppaSlides[mocc][idx]+'</a>';}
106
- else{theHtml='<a onclick="_bumpClickCount(\''+_wppaId[mocc][idx]+'\');wppaStopAudio();wppaStopShow('+mocc+');window.open(\''+_wppaLinkUrl[mocc][idx]+'\', \''+_wppaLinkTarget[mocc][idx]+'\');" title="'+_wppaLinkTitle[mocc][idx]+'">'+'<'+imgVideo+mmEvents+' title="'+_wppaLinkTitle[mocc][idx]+'" id="theimg'+bgfg+'-'+mocc+'" '+_wppaSlides[mocc][idx]+'</a>';}}
107
- else{if(wppaLightBox[mocc]==''){theHtml='<'+imgVideo+mmEvents+' title="'+_wppaNames[mocc][idx]+'" id="theimg'+bgfg+'-'+mocc+'" '+_wppaSlides[mocc][idx];}
108
- else{var html='';var i=0;var set=wppaLightboxSingle[mocc]?'':'[slide-'+mocc+'-'+bgfg+']';while(i<idx){if(wppaOvlHires||(wppaLightBox[mocc]!='wppa')){url=_wppaHiresUrl[mocc][i];}
109
- else{url=wppaMakeFullsizeUrl(_wppaUrl[mocc][i]);}
110
- html+='<a href="'+url+'"'+
111
- ((_wppaIsVideo[mocc][i])?' data-videonatwidth="'+_wppaVideoNatWidth[mocc][i]+'"'+' data-videonatheight="'+_wppaVideoNatHeight[mocc][i]+'"'+' data-videohtml="'+encodeURI(_wppaVideoHtml[mocc][i])+'"':'')+
112
- ((_wppaAudioHtml[mocc][i]!='')?' data-audiohtml="'+encodeURI(_wppaAudioHtml[mocc][i])+'"':'')+' '+theTitle+'="'+_wppaLbTitle[mocc][i]+'"'+' '+wppaRel+'="'+wppaLightBox[mocc]+set+'"></a>';i++;}
113
- if(wppaOvlHires||(wppaLightBox[mocc]!='wppa')){url=_wppaHiresUrl[mocc][idx];}
114
- else{url=wppaMakeFullsizeUrl(_wppaUrl[mocc][idx]);}
115
- html+='<a href="'+url+'"'+' onclick="wppaStopAudio();wppaStopShow('+mocc+');"'+' target="'+_wppaLinkTarget[mocc][idx]+'"'+
116
- ((_wppaIsVideo[mocc][i])?' data-videonatwidth="'+_wppaVideoNatWidth[mocc][idx]+'"'+' data-videonatheight="'+_wppaVideoNatHeight[mocc][idx]+'"'+' data-videohtml="'+encodeURI(_wppaVideoHtml[mocc][idx])+'"':'')+
117
- ((_wppaAudioHtml[mocc][i]!='')?' data-audiohtml="'+encodeURI(_wppaAudioHtml[mocc][idx])+'"':'')+' '+theTitle+'="'+_wppaLbTitle[mocc][idx]+'"'+' '+wppaRel+'="'+wppaLightBox[mocc]+set+'">'+'<'+imgVideo+mmEvents+' title="'+_wppaLinkTitle[mocc][idx]+'" id="theimg'+bgfg+'-'+mocc+'" '+_wppaSlides[mocc][idx]+'</a>';i=idx+1;while(i<_wppaUrl[mocc].length){if(wppaOvlHires||(wppaLightBox[mocc]!='wppa')){url=_wppaHiresUrl[mocc][i];}
118
- else{url=wppaMakeFullsizeUrl(_wppaUrl[mocc][i]);}
119
- html+='<a href="'+url+'"'+
120
- ((_wppaIsVideo[mocc][i])?' data-videonatwidth="'+_wppaVideoNatWidth[mocc][i]+'"'+' data-videonatheight="'+_wppaVideoNatHeight[mocc][i]+'"'+' data-videohtml="'+encodeURI(_wppaVideoHtml[mocc][i])+'"':'')+
121
- ((_wppaAudioHtml[mocc][i]!='')?' data-audiohtml="'+encodeURI(_wppaAudioHtml[mocc][i])+'"':'')+' '+theTitle+'="'+_wppaLbTitle[mocc][i]+'"'+' '+wppaRel+'="'+wppaLightBox[mocc]+set+'"></a>';i++;}
122
- theHtml=html;}}
123
- if(_wppaAudioHtml[mocc][idx]!=''){theHtml+='<audio'+' controls'+' id="wppa-audio-'+_wppaId[mocc][idx]+'-'+mocc+'"'+' class="wppa-audio-'+mocc+' wppa-audio-'+_wppaId[mocc][idx]+'-'+mocc+'"'+' data-from="wppa"'+' onplay="wppaAudioPlaying['+mocc+'] = true;"'+' onpause="wppaAudioPlaying['+mocc+'] = false"'+' style="'+'position:relative;'+'top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+'px;'+'z-index:10;'+'width:'+_wppaVideoNatWidth[mocc][idx]+'px;'+'left:'+(Math.max(0,(wppaGetContainerWidth(mocc)-_wppaVideoNatWidth[mocc][idx])/2))+'px;'+'padding:0 '+wppaSlideBorderWidth+'px;'+'box-sizing:border-box;'+'"'+' >'+
124
- _wppaAudioHtml[mocc][idx]+'</audio>';}
125
- theHtml=theHtml.replace(/title=""/g,'');jQuery("#theslide"+bgfg+"-"+mocc).html(theHtml);}
126
- function _wppaAdjustFilmstrip(mocc){if(!document.getElementById('wppa-filmstrip-'+mocc))return;jQuery('.wppa-film-'+mocc).removeClass('wppa-filmthumb-active');if(!_wppaFilmNoMove[mocc]){var xoffset;xoffset=wppaFilmStripLength[mocc]/2-(_wppaCurIdx[mocc]+0.5+wppaPreambule)*wppaThumbnailPitch[mocc]-wppaFilmStripMargin[mocc];if(wppaFilmShowGlue)xoffset-=(wppaFilmStripMargin[mocc]*2+2);jQuery('#wppa-filmstrip-'+mocc).stop().animate({marginLeft:xoffset+'px'},wppaAnimationSpeed);}
127
- else{_wppaFilmNoMove[mocc]=false;}
128
- if(_wppaCurIdx[mocc]!=-1){var from=_wppaCurIdx[mocc]-10;if(from<0)from=0;var to=_wppaCurIdx[mocc]+10;if(to>_wppaSlides[mocc].length)to=_wppaSlides[mocc].length;var index=0;while(index<_wppaSlides[mocc].length){var html=jQuery('#film_wppatnf_'+_wppaId[mocc][index]+'_'+mocc).html();if(html){if(from<=index<=to){if(html.search('<!--')!=-1){html=html.replace('<!--','');html=html.replace('-->','');jQuery('#film_wppatnf_'+_wppaId[mocc][index]+'_'+mocc).html(html);}}
129
- if(jQuery('#wppa-film-'+index+'-'+mocc).attr('data-title')!=''){jQuery('#wppa-film-'+index+'-'+mocc).attr('title',jQuery('#wppa-film-'+index+'-'+mocc).attr('data-title'));jQuery('#wppa-pre-'+index+'-'+mocc).attr('title',jQuery('#wppa-film-'+index+'-'+mocc).attr('data-title'));}
130
- else if(wppaFilmThumbTitle!=''&&_wppaCurIdx[mocc]==index){jQuery('#wppa-film-'+index+'-'+mocc).attr('title',wppaFilmThumbTitle);jQuery('#wppa-pre-'+index+'-'+mocc).attr('title',wppaFilmThumbTitle);}
131
- else{jQuery('#wppa-film-'+index+'-'+mocc).attr('title',wppaClickToView+' '+_wppaNames[mocc][index]);jQuery('#wppa-pre-'+index+'-'+mocc).attr('title',wppaClickToView+' '+_wppaNames[mocc][index]);}}
132
- index++;}}
133
- jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).addClass('wppa-filmthumb-active');}
134
- function _wppaNext(mocc){if(!wppaSlideWrap&&_wppaCurIdx[mocc]==(_wppaSlides[mocc].length-1))return;_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]+1;if(_wppaNxtIdx[mocc]==_wppaSlides[mocc].length)_wppaNxtIdx[mocc]=0;_wppaNextSlide(mocc,0);}
135
- function _wppaNextN(mocc,n){if(!wppaSlideWrap&&_wppaCurIdx[mocc]>=(_wppaSlides[mocc].length-n))return;_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]+n;while(_wppaNxtIdx[mocc]>=_wppaSlides[mocc].length)_wppaNxtIdx[mocc]-=_wppaSlides[mocc].length;_wppaNextSlide(mocc,0);}
136
- function _wppaNextOnCallback(mocc){if(!wppaSlideWrap&&_wppaCurIdx[mocc]==(_wppaSlides[mocc].length-1))return;if(_wppaSkipRated[mocc]){var now=_wppaCurIdx[mocc];var idx=now+1;if(idx==_wppaSlides[mocc].length)idx=0;var next=idx;if(_wppaMyr[mocc][next]!=0){idx++;if(idx==_wppaSlides[mocc].length)idx=0;while(idx!=next&&_wppaMyr[mocc][idx]!=0){idx++;if(idx==_wppaSlides[mocc].length)idx=0;}
137
- next=idx;}
138
- _wppaNxtIdx[mocc]=next;}
139
- else{_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]+1;if(_wppaNxtIdx[mocc]==_wppaSlides[mocc].length)_wppaNxtIdx[mocc]=0;}
140
- _wppaNextSlide(mocc,0);}
141
- function _wppaPrev(mocc){if(!wppaSlideWrap&&_wppaCurIdx[mocc]==0)return;_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]-1;if(_wppaNxtIdx[mocc]<0)_wppaNxtIdx[mocc]=_wppaSlides[mocc].length-1;_wppaNextSlide(mocc,0);}
142
- function _wppaPrevN(mocc,n){if(!wppaSlideWrap&&_wppaCurIdx[mocc]<n)return;_wppaNxtIdx[mocc]=_wppaCurIdx[mocc]-n;while(_wppaNxtIdx[mocc]<0)_wppaNxtIdx[mocc]+=_wppaSlides[mocc].length;_wppaNextSlide(mocc,0);}
143
- function _wppaGoto(mocc,idx){_wppaToTheSame=(_wppaNxtIdx[mocc]==idx);_wppaNxtIdx[mocc]=idx;_wppaNextSlide(mocc,0);}
144
- function _wppaGotoRunning(mocc,idx){if(_wppaIsBusy[mocc]){setTimeout('_wppaGotoRunning( '+mocc+','+idx+' )',10);return;}
145
- wppaConsoleLog('GotoRunning '+mocc);_wppaSSRuns[mocc]=false;_wppaToTheSame=(_wppaNxtIdx[mocc]==idx);_wppaNxtIdx[mocc]=idx;__wppaOverruleRun=true;_wppaNextSlide(mocc,"manual");_wppaGotoContinue(mocc);}
146
- function _wppaGotoContinue(mocc){if(_wppaIsBusy[mocc]){setTimeout('_wppaGotoContinue( '+mocc+' )',10);return;}
147
- setTimeout('_wppaNextSlide( '+mocc+', "reset" )',wppaGetSlideshowTimeout(mocc)+10);}
148
- function _wppaStart(mocc,idx){if(wppaSlideshowNavigationType=='icons'){_wppaStartIcons(mocc,idx);}
149
- else{_wppaStartText(mocc,idx);}}
150
- function _wppaStartIcons(mocc,idx){if(idx==-2){var i=0;idx=0;_wppaSkipRated[mocc]=true;if(_wppaMyr[mocc][i]!=0){while(i<_wppaSlides[mocc].length){if(idx==0&&_wppaMyr[mocc][i]==0)idx=i;i++;}}}
151
- if(idx>-1){jQuery('#startstop-'+mocc).html(wppaSvgHtml('Play-Button','1.5em',false,true,'0','10','20','50'));jQuery('#speed0-'+mocc).hide();jQuery('#speed1-'+mocc).hide();_wppaNxtIdx[mocc]=idx;_wppaCurIdx[mocc]=idx;_wppaNextSlide(mocc,0);_wppaShowMetaData(mocc,'show');}
152
- else{_wppaSSRuns[mocc]=true;_wppaNextSlide(mocc,0);jQuery('#startstop-'+mocc).html(wppaSvgHtml('Pause-Button','1.5em',false,true,'0','10','20','50'));jQuery('#speed0-'+mocc).show();jQuery('#speed1-'+mocc).show();_wppaShowMetaData(mocc,'hide');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(wppaSlideShow);}
153
- else{jQuery('#bc-pname-'+mocc).html(wppaSlideShow);}}
154
- _wppaSetRatingDisplay(mocc);}
155
- function _wppaStartText(mocc,idx){if(idx==-2){var i=0;idx=0;_wppaSkipRated[mocc]=true;if(_wppaMyr[mocc][i]!=0){while(i<_wppaSlides[mocc].length){if(idx==0&&_wppaMyr[mocc][i]==0)idx=i;i++;}}}
156
- if(idx>-1){jQuery('#startstop-'+mocc).html(wppaStart+' '+wppaSlideShow);jQuery('#speed0-'+mocc).css('display','none');jQuery('#speed1-'+mocc).css('display','none');_wppaNxtIdx[mocc]=idx;_wppaCurIdx[mocc]=idx;_wppaNextSlide(mocc,0);_wppaShowMetaData(mocc,'show');}
157
- else{_wppaSSRuns[mocc]=true;_wppaNextSlide(mocc,0);jQuery('#startstop-'+mocc).html(wppaStop);jQuery('#speed0-'+mocc).css('display','inline');jQuery('#speed1-'+mocc).css('display','inline');_wppaShowMetaData(mocc,'hide');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(wppaSlideShow);}
158
- else{jQuery('#bc-pname-'+mocc).html(wppaSlideShow);}}
159
- _wppaSetRatingDisplay(mocc);}
160
- function _wppaStop(mocc){if(wppaSlideshowNavigationType=='icons'){_wppaStopIcons(mocc);}
161
- else{_wppaStopText(mocc);}}
162
- function _wppaStopIcons(mocc){_wppaSSRuns[mocc]=false;jQuery('#startstop-'+mocc).html(wppaSvgHtml('Play-Button','1.5em',false,true));jQuery('#speed0-'+mocc).hide();jQuery('#speed1-'+mocc).hide();_wppaShowMetaData(mocc,'show');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}
163
- else{jQuery('#bc-pname-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}}
164
- function _wppaStopText(mocc){_wppaSSRuns[mocc]=false;jQuery('#startstop-'+mocc).html(wppaStart+' '+wppaSlideShow);jQuery('#speed0-'+mocc).css('display','none');jQuery('#speed1-'+mocc).css('display','none');_wppaShowMetaData(mocc,'show');if(jQuery('#bc-pname-modal-'+mocc)){jQuery('#bc-pname-modal-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}
165
- else{jQuery('#bc-pname-'+mocc).html(_wppaNames[mocc][_wppaCurIdx[mocc]]);}}
166
- function _wppaSpeed(mocc,faster){if(_wppaTimeOut[mocc]=='random'){return;}
167
- if(faster){if(_wppaTimeOut[mocc]>500)_wppaTimeOut[mocc]/=1.5;}
168
- else{if(_wppaTimeOut[mocc]<60000)_wppaTimeOut[mocc]*=1.5;}}
169
- function _wppaLoadSpinner(mocc){return;if(!document.getElementById('slide_frame-'+mocc))return;jQuery("#wppa-ajax-spin-"+mocc).fadeIn(3000);}
170
- function _wppaUnloadSpinner(mocc){jQuery('#wppa-slide-spin-'+mocc).stop().fadeOut();}
171
- function _wppaCheckRewind(mocc){var n_images;var n_diff;var l_substrate;var x_marg;if(!document.getElementById('wppa-filmstrip-'+mocc))return;n_diff=Math.abs(_wppaCurIdx[mocc]-_wppaNxtIdx[mocc]);if(n_diff<=wppaFilmPageSize[mocc])return;var n_images=wppaFilmStripLength[mocc]/wppaThumbnailPitch[mocc];if(n_diff>=((n_images+1)/2)){l_substrate=wppaThumbnailPitch[mocc]*_wppaSlides[mocc].length;if(wppaFilmShowGlue)l_substrate+=(2+2*wppaFilmStripMargin[mocc]);x_marg=parseInt(jQuery('#wppa-filmstrip-'+mocc).css('margin-left'));if(_wppaNxtIdx[mocc]>_wppaCurIdx[mocc]){x_marg-=l_substrate;}
172
- else{x_marg+=l_substrate;}
173
- jQuery('#wppa-filmstrip-'+mocc).css('margin-left',x_marg+'px');}}
174
- function _wppaSetRatingDisplay(mocc){wppaConsoleLog('_wppaSetRatingDisplay() called with arg '+mocc,'force');wppaConsoleLog('_wppaAvg[mocc][_wppaCurIdx[mocc]]='+_wppaAvg[mocc][_wppaCurIdx[mocc]]+' _wppaCurIdx[mocc]='+_wppaCurIdx[mocc],'force');var idx,avg,tmp,cnt,dsc,myr,dsctxt;if(!document.getElementById('wppa-rating-'+mocc))return;avg=_wppaAvg[mocc][_wppaCurIdx[mocc]];if(typeof(avg)=='undefined')return;if(wppaRatingDisplayType=='likes'){var likeText=avg.split("|");jQuery('#wppa-like-'+mocc).attr('title',likeText[0]);jQuery('#wppa-liketext-'+mocc).html(likeText[1]);if(_wppaMyr[mocc][_wppaCurIdx[mocc]]=='1'){jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'thumbdown.png');}
175
- else{jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'thumbup.png');}
176
- return;}
177
- tmp=avg.split('|');avg=tmp[0];cnt=tmp[1];dsc=_wppaDisc[mocc][_wppaCurIdx[mocc]];myr=_wppaMyr[mocc][_wppaCurIdx[mocc]];wppaConsoleLog('avg='+avg+' cnt='+cnt+' dsc='+dsc+' myr='+myr);if(wppaRatingDisplayType=='graphic'){_wppaSetRd(mocc,avg,'#wppa-avg-');_wppaSetRd(mocc,myr,'#wppa-rate-');if(myr==0){jQuery('#wppa-dislike-'+mocc).css('display','inline');jQuery('#wppa-dislike-imgdiv-'+mocc).css('display','inline');if(document.getElementById('wppa-dislike-'+mocc))jQuery('#wppa-filler-'+mocc).css('display','none');jQuery('#wppa-dislike-'+mocc).stop().fadeTo(100,wppaStarOpacity);}
178
- else{jQuery('#wppa-dislike-'+mocc).css('display','none');jQuery('#wppa-dislike-imgdiv-'+mocc).css('display','none');jQuery('#wppa-filler-'+mocc).css('display','inline');jQuery('#wppa-filler-'+mocc).stop().fadeTo(100,wppaStarOpacity);jQuery('#wppa-filler-'+mocc).attr('title',dsc);}}
179
- else{jQuery('#wppa-numrate-avg-'+mocc).html(avg+' ( '+cnt+' ) ');if(wppaRatingOnce&&myr>0){jQuery('#wppa-numrate-mine-'+mocc).html(myr);}
180
- else if(myr<0){jQuery('#wppa-numrate-mine-'+mocc).html(' dislike');}
181
- else{var htm='';for(i=1;i<=wppaRatingMax;i++){if(myr==i){htm+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+mocc+', '+i+' )">&nbsp;'+i+'&nbsp;</span>';}
182
- else{if(myr>(i-1)&&myr<i)htm+='&nbsp;( '+myr+' )&nbsp;';htm+='<span style="cursor:pointer;" onclick="_wppaRateIt( '+mocc+', '+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+'&nbsp;</span>';}}
183
- jQuery('#wppa-numrate-mine-'+mocc).html(htm);}
184
- if(myr==0){jQuery('#wppa-dislike-'+mocc).css('display','inline');jQuery('#wppa-dislike-imgdiv-'+mocc).css('display','inline');jQuery('#wppa-filler-'+mocc).css('display','none');jQuery('#wppa-dislike-'+mocc).stop().fadeTo(100,wppaStarOpacity);}
185
- else{jQuery('#wppa-dislike-'+mocc).css('display','none');jQuery('#wppa-dislike-imgdiv-'+mocc).css('display','none');jQuery('#wppa-filler-'+mocc).css('display','inline');}
186
- jQuery('#wppa-discount-'+mocc).html(dsc+'&bull; ');jQuery('#wppa-filler-'+mocc).css('display','none');}
187
- if(myr==0){jQuery('#wppa-vote-button-'+mocc).val(wppaVoteForMe);}
188
- else{jQuery('#wppa-vote-button-'+mocc).val(wppaVotedForMe);}
189
- jQuery('#wppa-vote-count-'+mocc).html(cnt);}
190
- function wppaGetDislikeText(dsc,myr,incmine){return dsc;}
191
- function _wppaSetRd(mocc,avg,where){wppaConsoleLog('_wppaSetRd() called with args:'+mocc+' '+avg+' '+where,'force');var idx1=parseInt(avg);var idx2=idx1+1;var frac=avg-idx1;var opac=wppaStarOpacity+frac*(1.0-wppaStarOpacity);var ilow=1;var ihigh=wppaRatingMax;for(idx=ilow;idx<=ihigh;idx++){if(where=='#wppa-rate-'||where=='.wppa-rate-'){if(jQuery(where+mocc+'-'+idx).attr('src')!=wppaImageDirectory+'star.ico'){jQuery(where+mocc+'-'+idx).attr('src',wppaImageDirectory+'star.ico');}}
192
- if(idx<=idx1){jQuery(where+mocc+'-'+idx).stop().fadeTo(100,1.0);}
193
- else if(idx==idx2){jQuery(where+mocc+'-'+idx).stop().fadeTo(100,opac);}
194
- else{jQuery(where+mocc+'-'+idx).stop().fadeTo(100,wppaStarOpacity);}}}
195
- function _wppaFollowMe(mocc,idx){if(_wppaSSRuns[mocc])return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]!=0&&wppaRatingOnce)return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]<0)return;if(_wppaVoteInProgress)return;_wppaSetRd(mocc,idx,'#wppa-rate-');}
196
- function wppaOvlFollowMe(mocc,idx,val){if(val)return;_wppaSetRd(mocc,idx,'.wppa-rate-');}
197
- function _wppaLeaveMe(mocc,idx){if(_wppaSSRuns[mocc])return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]!=0&&wppaRatingOnce)return;if(_wppaMyr[mocc][_wppaCurIdx[mocc]]<0)return;if(_wppaVoteInProgress)return;_wppaSetRd(mocc,_wppaMyr[mocc][_wppaCurIdx[mocc]],'#wppa-rate-');}
198
- function wppaOvlLeaveMe(mocc,idx,val){_wppaSetRd(mocc,val,'.wppa-rate-');}
199
- function _wppaValidateComment(mocc,photoid){if(!photoid)photoid=_wppaId[mocc][_wppaCurIdx[mocc]];var name=jQuery('#wppa-comname-'+mocc).val();if(name.length<1){alert(wppaPleaseName);return false;}
200
- if(wppaEmailRequired=='required'||wppaEmailRequired=='optional'){var email=jQuery('#wppa-comemail-'+mocc).val();if(wppaEmailRequired=='optional'&&email.length==0){return true;}
201
- var atpos=email.indexOf("@");var dotpos=email.lastIndexOf(".");if(atpos<1||dotpos<atpos+2||dotpos+2>=email.length){alert(wppaPleaseEmail);return false;}}
202
- var text=jQuery('#wppa-comment-'+mocc).val();if(text.length<1){alert(wppaPleaseComment);return false;}
203
- return true;}
204
- function _wppaGo(url){document.location=url;}
205
- function _wppaBbb(mocc,where,act){if(_wppaSSRuns[mocc])return;var elm='#bbb-'+mocc+'-'+where;switch(act){case'show':if(where=='l')jQuery(elm).attr('title',wppaPreviousPhoto);if(where=='r')jQuery(elm).attr('title',wppaNextPhoto);jQuery('.bbb-'+mocc).css('cursor','pointer');break;case'hide':jQuery('.bbb-'+mocc).removeAttr('title');jQuery('.bbb-'+mocc).css('cursor','default');break;case'click':if(where=='l')wppaPrev(mocc);if(where=='r')wppaNext(mocc);break;default:alert('Unimplemented instruction: '+act+' on: '+elm);}}
206
- function _wppaUbb(mocc,where,act){var elm='#ubb-'+mocc+'-'+where;switch(act){case'show':if(where=='l')jQuery(elm).attr('title',wppaPreviousPhoto);if(where=='r')jQuery(elm).attr('title',wppaNextPhoto);jQuery('.ubb-'+mocc).css('cursor','pointer');jQuery('.ubb-'+mocc).stop().fadeTo(200,0.8);jQuery('#wppa-startstop-icon-'+mocc).stop().fadeTo(200,0.8);break;case'hide':jQuery('.ubb-'+mocc).removeAttr('title');jQuery('.ubb-'+mocc).css('cursor','default');jQuery('.ubb-'+mocc).stop().fadeTo(200,0);jQuery('#wppa-startstop-icon-'+mocc).stop().fadeTo(200,0);break;case'click':var idx;if(where=='l'){idx=_wppaCurIdx[mocc]-1;if(idx<0){if(!wppaSlideWrap){return;}
207
- idx=_wppaSlides[mocc].length-1;}}
208
- if(where=='r'){idx=_wppaCurIdx[mocc]+1;if(idx==_wppaSlides[mocc].length){if(!wppaSlideWrap){return;}
209
- idx=0;}}
210
- if(wppaIsMobile){jQuery('.ubb-'+mocc).stop().fadeTo(200,1).fadeTo(1000,0);jQuery('#wppa-startstop-icon-'+mocc).stop().fadeTo(200,1).fadeTo(1000,0);}
211
- wppaGotoKeepState(mocc,idx);break;default:alert('Unimplemented instruction: '+act+' on: '+elm);}}
212
- function wppaOpenComments(mocc){if(_wppaSSRuns[mocc])_wppaStop(mocc);jQuery('#wppa-comtable-wrap-'+mocc).css('display','block');jQuery('#wppa-comform-wrap-'+mocc).css('display','block');jQuery('#wppa-comfooter-wrap-'+mocc).css('display','none');wppaColWidth[mocc]=0;setTimeout('_wppaDoAutocol( '+mocc+' )',100);}
213
- function _wppaShowMetaData(mocc,key){if(!_wppaSSRuns[mocc]&&!__wppaOverruleRun){if(key=='show'){if(wppaAutoOpenComments){jQuery('#wppa-comtable-wrap-'+mocc).css('display','block');jQuery('#wppa-comform-wrap-'+mocc).css('display','block');jQuery('#wppa-comfooter-wrap-'+mocc).css('display','none');}
214
- if(_wppaCurIdx[mocc]!=0)
215
- jQuery('.wppa-first-'+mocc).show();if(_wppaCurIdx[mocc]!=(_wppaSlides[mocc].length-1))
216
- jQuery('.wppa-last-'+mocc).show();if(wppaShareHideWhenRunning){jQuery('#wppa-share-'+mocc).css('display','');}
217
- wppaFotomotoToolbar(mocc,_wppaHiresUrl[mocc][_wppaCurIdx[mocc]]);}
218
- else{jQuery('#wppa-comtable-wrap-'+mocc).css('display','none');jQuery('#wppa-comform-wrap-'+mocc).css('display','none');jQuery('#wppa-comfooter-wrap-'+mocc).css('display','block');wppaFotomotoHide(mocc);}}
219
- else{if(key=='show'){if(!wppaFotomotoHideWhenRunning)wppaFotomotoToolbar(mocc,_wppaHiresUrl[mocc][_wppaCurIdx[mocc]]);}
220
- else{if(wppaShareHideWhenRunning){jQuery('#wppa-share-'+mocc).css('display','none');}}}
221
- if(key=='show'){jQuery("#imagedesc-"+mocc).css('visibility','visible');jQuery("#imagetitle-"+mocc).css('visibility','visible');jQuery("#counter-"+mocc).css('visibility','visible');jQuery("#iptccontent-"+mocc).css('visibility','visible');jQuery("#exifcontent-"+mocc).css('visibility','visible');}
222
- else{jQuery("#counter-"+mocc).css('visibility','hidden');jQuery('.wppa-first-'+mocc).hide();jQuery('.wppa-last-'+mocc).hide();jQuery("#iptccontent-"+mocc).css('visibility','hidden');jQuery("#exifcontent-"+mocc).css('visibility','hidden');}}
223
- function wppaGetSlideshowTimeout(mocc){var time;if(_wppaTimeOut[mocc]=='random'){var min=2*wppaAnimationSpeed;var max=7*wppaAnimationSpeed;time=Math.floor(Math.random()*(max-min+1))+min;}
224
- else{time=_wppaTimeOut[mocc];}
225
- return time;}
226
- wppaConsoleLog('wppa-slideshow.js version '+wppaJsSlideshowVersion+' loaded.','force');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wppa-touch.min.js DELETED
@@ -1,35 +0,0 @@
1
- // wppa-touch.js
2
- //
3
- // Contains swipe modules
4
- // Dependancies: wppa.js and default wp jQuery library
5
- //
6
-
7
- var wppaJsTouchVersion='6.6.06';var wppaTriggerElementID=null;var wppaFingerCount=0;var wppaStartX=0;var wppaStartY=0;var wppaCurX=0;var wppaCurY=0;var wppaDeltaX=0;var wppaDeltaY=0;var wppaHorzDiff=0;var wppaVertDiff=0;var wppaMinLength=72;var wppaSwipeLength=0;var wppaSwipeAngle=null;var wppaSwipeDirection=null;var wppaSwipeOnLightbox=false;var wppaSwipeMocc=0;var wppaMobileTimeStart=0;function wppaStartTime(){var d=new Date();var t=d.getTime();wppaMobileTimeStart=t;return true;}
8
- function wppaInTime(){var d=new Date();var t=d.getTime();return(t-wppaMobileTimeStart)<250;}
9
- function wppaTapLink(id,url){if(wppaInTime()){_bumpClickCount(id);document.location.href=url;}}
10
- function wppaTouchStart(event,id,mocc){wppaSwipeMocc=mocc;if(mocc==-1){wppaSwipeOnLightbox=true;event.preventDefault();}
11
- wppaFingerCount=event.touches.length;if(wppaFingerCount==1){wppaStartX=event.touches[0].pageX;wppaStartY=event.touches[0].pageY;wppaTriggerElementID=id;}else{wppaTouchCancel();}}
12
- function wppaTouchMove(event){if(wppaSwipeOnLightbox){event.preventDefault();}
13
- if(event.touches.length==1){wppaCurX=event.touches[0].pageX;wppaCurY=event.touches[0].pageY;}else{wppaTouchCancel();}}
14
- function wppaTouchEnd(event){if(wppaSwipeOnLightbox){event.preventDefault();}
15
- if(wppaFingerCount==1&&wppaCurX!=0){wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2)));if(wppaSwipeLength>=wppaMinLength){wppaCalculateAngle();wppaDetermineSwipeDirection();wppaProcessingRoutine();}}
16
- wppaTouchCancel();}
17
- function wppaTouchCancel(){wppaFingerCount=0;wppaStartX=0;wppaStartY=0;wppaCurX=0;wppaCurY=0;wppaDeltaX=0;wppaDeltaY=0;wppaHorzDiff=0;wppaVertDiff=0;wppaSwipeLength=0;wppaSwipeAngle=null;wppaSwipeDirection=null;wppaTriggerElementID=null;wppaSwipeOnLightbox=false;wppaSwipeMocc=0;}
18
- function wppaCalculateAngle(){var X=wppaStartX-wppaCurX;var Y=wppaCurY-wppaStartY;var Z=Math.round(Math.sqrt(Math.pow(X,2)+Math.pow(Y,2)));var r=Math.atan2(Y,X);wppaSwipeAngle=Math.round(r*180/Math.PI);if(wppaSwipeAngle<0){wppaSwipeAngle=360-Math.abs(wppaSwipeAngle);}}
19
- function wppaDetermineSwipeDirection(){if((wppaSwipeAngle<=45)&&(wppaSwipeAngle>=0)){wppaSwipeDirection='left';}
20
- else if((wppaSwipeAngle<=360)&&(wppaSwipeAngle>=315)){wppaSwipeDirection='left';}
21
- else if((wppaSwipeAngle>=135)&&(wppaSwipeAngle<=225)){wppaSwipeDirection='right';}
22
- else if((wppaSwipeAngle>45)&&(wppaSwipeAngle<135)){wppaSwipeDirection='down';}
23
- else{wppaSwipeDirection='up';}}
24
- function wppaProcessingRoutine(){var swipedElement=document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox){if(wppaSwipeDirection=='left'){wppaOvlShowNext();}
25
- else if(wppaSwipeDirection=='right'){wppaOvlShowPrev();}}
26
- else{if(wppaSwipeDirection=='right'){idx=_wppaCurIdx[wppaSwipeMocc]-1;if(idx<0){if(!wppaSlideWrap){return;}
27
- idx=_wppaSlides[wppaSwipeMocc].length-1;}
28
- wppaGotoKeepState(wppaSwipeMocc,idx);}
29
- if(wppaSwipeDirection=='left'){idx=_wppaCurIdx[wppaSwipeMocc]+1;if(idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap){return;}
30
- idx=0;}
31
- wppaGotoKeepState(wppaSwipeMocc,idx);}
32
- else if(wppaSwipeDirection=='up'){}
33
- else if(wppaSwipeDirection=='down'){}}
34
- wppaTouchCancel();}
35
- wppaConsoleLog('wppa-touch.js version '+wppaJsTouchVersion+' loaded.','force');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wppa-utils.min.js DELETED
@@ -1,50 +0,0 @@
1
- // wppa-utils.js
2
- //
3
- // conatins common vars and functions
4
- //
5
-
6
- var wppaJsUtilsVersion='6.6.20';var wppaDebug;function wppaTrim(str,arg){var result;result=wppaTrimLeft(str,arg);result=wppaTrimRight(result,arg);return result;}
7
- function wppaTrimLeft(str,arg){var result;var strlen;var arglen;var argcount;var i;var done;var oldStr,newStr;switch(typeof(arg)){case'string':result=str;strlen=str.length;arglen=arg.length;while(strlen>=arglen&&result.substr(0,arglen)==arg){result=result.substr(arglen);strlen=result.length;}
8
- break;case'object':done=false;newStr=str;while(!done){i=0;oldStr=newStr;while(i<arg.length){newStr=wppaTrimLeft(newStr,arg[i]);i++;}
9
- done=(oldStr==newStr);}
10
- result=newStr;break;default:return str.replace(/^\s\s*/,'');}
11
- return result;}
12
- function wppaTrimRight(str,arg){var result;var strlen;var arglen;var argcount;var i;var done;var oldStr,newStr;switch(typeof(arg)){case'string':result=str;strlen=str.length;arglen=arg.length;while(strlen>=arglen&&result.substr(strlen-arglen)==arg){result=result.substr(0,strlen-arglen);strlen=result.length;}
13
- break;case'object':done=false;newStr=str;while(!done){i=0;oldStr=newStr;while(i<arg.length){newStr=wppaTrimRight(newStr,arg[i]);i++;}
14
- done=(oldStr==newStr);}
15
- result=newStr;break;default:return str.replace(/\s\s*$/,'');}
16
- return result;}
17
- function wppa_setCookie(c_name,value,exdays){var exdate=new Date();exdate.setDate(exdate.getDate()+exdays);var c_value=escape(value)+((exdays==null)?"":"; expires="+exdate.toUTCString());document.cookie=c_name+"="+c_value;}
18
- function wppa_getCookie(c_name){var i,x,y,ARRcookies=document.cookie.split(";");for(i=0;i<ARRcookies.length;i++)
19
- {x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);x=x.replace(/^\s+|\s+$/g,"");if(x==c_name)
20
- {return unescape(y);}}
21
- return"";}
22
- function wppaStereoTypeChange(newval){wppa_setCookie('stereotype',newval,365);}
23
- function wppaStereoGlassChange(newval){wppa_setCookie('stereoglass',newval,365);}
24
- function wppaConsoleLog(arg,force){if(typeof(console)!='undefined'&&(wppaDebug||force=='force')){var d=new Date();var n=d.getTime();var t=n%(24*60*60*1000);var h=Math.floor(t/(60*60*1000));t-=h*60*60*1000;var m=Math.floor(t/(60*1000));t-=m*60*1000;var s=Math.floor(t/1000);t-=s*1000;console.log('At: '+h+':'+m+':'+s+'.'+t+' message: '+arg);}}
25
- function wppaConvertScriptToShortcode(scriptId,shortcodeId){var script;var workArr;var temp;var item;var value;var type;var album;var photo;var size;var align;var result;script=jQuery('#'+scriptId).val();if(typeof(script)!='string'||script.length==0){jQuery('#'+shortcodeId).val('No script found');jQuery('#'+shortcodeId).css('color','red');return;}
26
- workarr=script.split('%%');if(workarr[1]!='wppa'||workarr.length<3){jQuery('#'+shortcodeId).val('No %%wppa%% found');jQuery('#'+shortcodeId).css('color','red');return;}
27
- for(i=3;i<workarr.length;i+=2){temp=workarr[i].split('=');item=temp[0];value=temp[1];if(item&&value){switch(item){case'size':size=value;break;case'align':align=value;break;case'photo':case'mphoto':case'slphoto':type=item;photo=value;break;case'album':case'cover':case'slide':case'slideonly':case'slideonlyf':case'slidef':type=item;album=value;break;default:jQuery('#'+shortcodeId).val('Token "'+workarr[i]+'" not recognized');jQuery('#'+shortcodeId).css('color','red');return;}}}
28
- result='[wppa';if(type&&type.length>0){result+=' type="'+type+'"';}
29
- if(album&&album.length>0){result+=' album="'+album+'"';}
30
- if(photo&&photo.length>0){result+=' photo="'+photo+'"';}
31
- if(size&&size.length>0){result+=' size="'+size+'"';}
32
- if(align&&align.length>0){result+=' align="'+align+'"';}
33
- result+='][/wppa]';jQuery('#'+shortcodeId).val(result);jQuery('#'+shortcodeId).css('color','green');document.getElementById(shortcodeId).focus();document.getElementById(shortcodeId).select();}
34
- function wppaSvgHtml(image,height,isLightbox,border,none,light,medium,heavy){var fc;var bc;if(!none)none='0';if(!light)light='10';if(!medium)medium='20';if(!heavy)heavy='50';switch(wppaSvgCornerStyle){case'none':radius=none;break;case'light':radius=light;break;case'medium':radius=medium;break;case'heavy':radius=heavy;break;}
35
- if(!height){height='32px';}
36
- if(isLightbox){fc=wppaOvlSvgFillcolor;bc=wppaOvlSvgBgcolor;}
37
- else{fc=wppaSvgFillcolor;bc=wppaSvgBgcolor;}
38
- var src;if(wppaIsIe){src=wppaImageDirectory+image+'.png';}
39
- else{src=wppaImageDirectory+image+'.svg';}
40
- var result='<img'+' src="'+src+'"'+
41
- (wppaIsIe?'':' class="wppa-svg"')+' style="'+'height:'+height+';'+'fill:'+fc+';'+'background-color:'+bc+';'+
42
- (radius?'border-radius:'+radius+'%;':'')+
43
- (border?'border:2px solid '+bc+';box-sizing:border-box;':'')+
44
- (wppaIsIe?'':'display:none;')+'text-decoration:none !important;'+'vertical-align:middle;'+'"'+' onload="wppaReplaceSvg()"'+' />';setTimeout(function(){wppaReplaceSvg();},100);return result;}
45
- function wppaReplaceSvg(){wppaConsoleLog('Doing ReplaceSvg','force');jQuery('img.wppa-svg').each(function(){var $img=jQuery(this);var imgID=$img.attr('id');var imgClass=$img.attr('class');var imgURL=$img.attr('src');var imgStyle=$img.attr('style');jQuery.get(imgURL,function(data){var $svg=jQuery(data).find('svg');if(typeof imgID!=='undefined'){$svg=$svg.attr('id',imgID);}
46
- if(typeof imgClass!=='undefined'){$svg=$svg.attr('class',imgClass+' replaced-svg');}
47
- if(typeof imgStyle!=='undefined'){if(typeof(imgID)=='undefined'||(imgID.substr(0,15)!='wppa-ajax-spin-'&&imgID.substr(0,15)!='wppa-ovl-spin')){imgStyle=imgStyle.replace('display:none','display:inline');}
48
- $svg=$svg.attr('style',imgStyle);}
49
- $svg=$svg.removeAttr('xmlns:a');$img.replaceWith($svg);},'xml');});}
50
- wppaConsoleLog('wppa-utils.js version '+wppaJsUtilsVersion+' loaded.','force');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wppa.min.js DELETED
@@ -1,124 +0,0 @@
1
- // wppa.js
2
- //
3
- // conatins common vars and functions
4
- //
5
-
6
- var wppaJsVersion='6.6.20';var wppaVersion='0';var wppaIsIe=false;var wppaDebug;var wppaFullValign=[];var wppaFullHalign=[];var wppaFullFrameDelta=[];var wppaAnimationSpeed;var wppaImageDirectory;var wppaAutoColumnWidth=[];var wppaAutoColumnFrac=[];var wppaThumbnailAreaDelta;var wppaSlideShowTimeOut=2500;var wppaFadeInAfterFadeOut=false;var wppaTextFrameDelta=0;var wppaBoxDelta=0;var wppaPreambule;var wppaHideWhenEmpty=false;var wppaThumbnailPitch=[];var wppaFilmStripLength=[];var wppaFilmStripMargin=[];var wppaFilmStripAreaDelta=[];var wppaFilmShowGlue=false;var wppaIsMini=[];var wppaPortraitOnly=[];var wppaSlideShow;var wppaPhoto;var wppaOf;var wppaNextPhoto;var wppaPreviousPhoto;var wppaNextP;var wppaPrevP;var wppaAvgRating;var wppaMyRating;var wppaAvgRat;var wppaMyRat;var wppaDislikeMsg;var wppaMiniTreshold=300;var wppaStart='Start';var wppaStop='Stop';var wppaPleaseName;var wppaPleaseEmail;var wppaPleaseComment;var wppaRatingOnce=true;var wppaBGcolorNumbar='transparent';var wppaBcolorNumbar='transparent';var wppaBGcolorNumbarActive='transparent';var wppaBcolorNumbarActive='transparent';var wppaFontFamilyNumbar='';var wppaFontSizeNumbar='';var wppaFontColorNumbar='';var wppaFontWeightNumbar='';var wppaFontFamilyNumbarActive='';var wppaFontSizeNumbarActive='';var wppaFontColorNumbarActive='';var wppaFontWeightNumbarActive='';var wppaNumbarMax='10';var wppaAjaxUrl='';var wppaLang='';var wppaNextOnCallback=false;var wppaStarOpacity=0.2;var wppaSlideWrap=true;var wppaLightBox=[];var wppaEmailRequired='required';var wppaSlideBorderWidth=0;var wppaSlideInitRunning=[];var wppaAnimationType='fadeover';var wppaSlidePause=[];var wppaSlideBlank=[];var wppaRatingMax=5;var wppaRatingDisplayType='graphic';var wppaRatingPrec=2;var wppaFilmPageSize=[];var wppaAspectRatio=[];var wppaFullSize=[];var wppaStretch=false;var wppaThumbSpaceAuto=false;var wppaMinThumbSpace=4;var wppaMagnifierCursor='';var wppaArtMonkyLink='none';var wppaAutoOpenComments=false;var wppaUpdateAddressLine=false;var wppaFilmThumbTitle='';var wppaClickToView='';var wppaUploadUrl='';var wppaVoteForMe='';var wppaVotedForMe='';var wppaSlideSwipe=true;var wppaLightboxSingle=[];var wppaMaxCoverWidth=300;var wppaDownLoad='Download';var wppaSiteUrl='';var wppaWppaUrl='';var wppaIncludeUrl='';var wppaSlideToFullpopup=false;var wppaComAltSize=75;var wppaBumpViewCount=true;var wppaBumpClickCount=false;var wppaFotomoto=false;var wppaArtMonkeyButton=true;var wppaShortQargs=false;var wppaOvlHires=false;var wppaMasonryCols=[];var wppaVideoPlaying=[];var wppaAudioPlaying=[];var wppaSlideVideoStart=false;var wppaSlideAudioStart=false;var wppaAudioHeight=28;var wppaHis=0;var wppaStartHtml=[];var wppaCanAjaxRender=false;var wppaCanPushState=false;var wppaAllowAjax=true;var wppaMaxOccur=0;var wppaFirstOccur=0;var wppaUsePhotoNamesInUrls=false;var wppaShareHideWhenRunning=false;var wppaCommentRequiredAfterVote=true;var wppaTopMoc=0;var wppaColWidth=[];var wppaFotomotoHideWhenRunning=false;var wppaFotomotoMinWidth=400;var wppaPhotoView=[];var wppaBackgroundColorImage='';var wppaPopupLinkType='';var wppaPopupOnclick=[];var wppaThumbTargetBlank=false;var wppaRel='rel';var wppaEditPhotoWidth='960';var wppaThemeStyles='';var wppaStickyHeaderHeight=0;var wppaRenderModal=false;var wppaModalBgColor='#ffffff';var wppaBoxRadius=0;var wppaModalQuitImg;var wppaUploadEdit='none';var wppaPageArg='';var wppaSlideshowNavigationType='icons';var wppaCoverImageResponsive=[];var _wppaId=[];var _wppaAvg=[];var _wppaDisc=[];var _wppaMyr=[];var _wppaVRU=[];var _wppaLinkUrl=[];var _wppaLinkTitle=[];var _wppaLinkTarget=[];var _wppaCommentHtml=[];var _wppaIptcHtml=[];var _wppaExifHtml=[];var _wppaToTheSame=false;var _wppaSlides=[];var _wppaNames=[];var _wppaFullNames=[];var _wppaDsc=[];var _wppaOgDsc=[];var _wppaCurIdx=[];var _wppaNxtIdx=[];var _wppaTimeOut=[];var _wppaSSRuns=[];var _wppaFg=[];var _wppaTP=[];var _wppaIsBusy=[];var _wppaFirst=[];var _wppaVoteInProgress=false;var _wppaTextDelay;var _wppaUrl=[];var _wppaSkipRated=[];var _wppaLbTitle=[];var _wppaStateCount=0;var _wppaDidGoto=[];var _wppaShareUrl=[];var _wppaShareHtml=[];var _wppaFilmNoMove=[];var _wppaHiresUrl=[];var _wppaIsVideo=[];var _wppaVideoHtml=[];var _wppaAudioHtml=[];var _wppaVideoNatWidth=[];var _wppaVideoNatHeight=[];var _wppaWaitTexts=[];var _wppaImageAlt=[];var __wppaOverruleRun=false;var wppaOvlUrls;var wppaOvlTitles;var wppaOvlAlts;var wppaOvlIdx=0;var wppaOvlFirst=true;var wppaOvlKbHandler='';var wppaOvlSizeHandler='';var wppaOvlPadTop=5;var wppaOvlIsSingle;var wppaOvlRunning=false;var wppaOvlVideoHtmls;var wppaOvlAudioHtmls;var wppaOvlVideoNaturalWidths;var wppaOvlVideoNaturalHeights;var wppaOvlModeInitial='normal';var wppaOvlVideoPlaying=false;var wppaOvlAudioPlaying=false;var wppaOvlShowLegenda=true;var wppaOvlShowStartStop=true;var wppaOvlRadius=0;var wppaOvlBorderWidth=16;var wppaOvlTxtHeight=36;var wppaOvlOpacity=0.8;var wppaOvlOnclickType='none';var wppaOvlTheme='black';var wppaOvlAnimSpeed=300;var wppaOvlSlideSpeed=3000;var wppaVer4WindowWidth=800;var wppaVer4WindowHeight=600;var wppaOvlFontFamily='Helvetica';var wppaOvlFontSize='10';var wppaOvlFontColor='';var wppaOvlFontWeight='bold';var wppaOvlLineHeight='12';var wppaOvlShowCounter=true;var wppaOvlIsVideo=false;var wppaShowLegenda='';var wppaOvlFsPhotoId=0;var wppaPhotoId=0;var wppaOvlVideoStart=false;var wppaOvlAudioStart=false;var wppaLastIptc='';var wppaLastExif='';var wppaIsMobile=false;var wppaSvgFillcolor='gray';var wppaSvgBgcolor='transparent';var wppaSvgCornerStyle='light';jQuery(document).ready(function(){wppaDoInit(false);setTimeout(function(){wppaDoInit(true);},1000);});function wppaDoInit(autoOnly){var anyAutocol=false;for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);anyAutocol=true;}}
7
- if(!autoOnly){_wppaTextDelay=wppaAnimationSpeed;if(wppaFadeInAfterFadeOut)_wppaTextDelay*=2;if(anyAutocol){jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}});}}
8
- wppaReplaceSvg();jQuery('.wppa-ajax-spin').stop().fadeOut();jQuery('.wppa-ovl-spin').stop().fadeOut();}
9
- jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax){wppaCanAjaxRender=true;}
10
- if(typeof(history.pushState)!='undefined'){var i=1;while(i<=wppaMaxOccur){wppaStartHtml[i]=jQuery('#wppa-container-'+i).html();i++;}
11
- wppaCanPushState=true;}});function wppaUpdateLightboxes(){if(typeof(wppaInitOverlay)=='function'){wppaInitOverlay();}
12
- if(typeof(myLightbox)!='undefined'){if(typeof(myLightbox.updateImageList)=='function'){myLightbox.updateImageList();}}
13
- if(jQuery().prettyPhoto){jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:false,});}}
14
- function wppaStopVideo(mocc){var id=[];var video;var i;id[1]='wppa-overlay-img';id[2]='theimg0-'+mocc;id[3]='theimg1-'+mocc;i=0;while(i<3){i++;if(i!=1||mocc==0){video=document.getElementById(id[i]);if(video){if(typeof(video.pause)=='function'){video.pause();wppaConsoleLog('Video '+id[i]+' paused','force');}}}}}
15
- function wppaStopAudio(mocc){if(typeof(mocc)=='number'){if(jQuery('#audio-'+mocc).pause){jQuery('#audio-'+mocc).pause();}}
16
- else{var items=jQuery('audio');if(items.length>0){var i=0;while(i<items.length){if(jQuery(items[i]).attr('data-from')=='wppa'){items[i].pause();}
17
- i++;}}}}
18
- function wppaMakeFullsizeUrl(url){var temp;var temp2;url=url.replace('/thumbs/','/');temp=url.split('//');if(temp[1]){temp2=temp[1].split('/');url=temp[0]+'//';}
19
- else{temp2=temp[0].split('/');url='';}
20
- var j=0;while(j<temp2.length){var chunk=temp2[j];var w=chunk.split('_');if(w[0]!='w'){if(j!=0)url+='/';url+=chunk;}
21
- j++;}
22
- return url;}
23
- function wppaGetContainerWidth(mocc){var elm=document.getElementById('wppa-container-'+mocc);var w=0;if(!wppaAutoColumnWidth[mocc])return elm.clientWidth;while(w==0){elm=elm.parentNode;w=jQuery(elm).width();}
24
- return w*wppaAutoColumnFrac[mocc];}
25
- function _wppaDoAutocol(mocc){wppaConsoleLog('Doing autocol '+mocc);if(!wppaAutoColumnWidth[mocc])return;var w;var h;w=wppaGetContainerWidth(mocc);wppaColWidth[mocc]=w;jQuery(".wppa-container-"+mocc).css('width',w);if(wppaRenderModal){jQuery(".ui-dialog").css('width',w);jQuery(".ui-dialog").attr('height','auto');}
26
- if(wppaCoverImageResponsive[mocc]){}
27
- else{jQuery(".wppa-asym-text-frame-"+mocc).css('width',w-wppaTextFrameDelta);jQuery(".wppa-cover-box-"+mocc).css('width',w);}
28
- var exists=jQuery(".wppa-cover-box-mcr-"+mocc);var MCRWidth;if(exists.length>1){var nCovers=parseInt((w+8)/(wppaMaxCoverWidth+8))+1;var coverMax1=nCovers-1;MCRWidth=parseInt(((w+8)/nCovers)-8);var idx=0;while(idx<exists.length){var col=idx%nCovers;switch(col){case 0:jQuery(exists[idx]).css({'marginLeft':'0px','clear':'both','float':'left'});break;case coverMax1:jQuery(exists[idx]).css({'marginLeft':'8px','clear':'none','float':'right'});break;default:jQuery(exists[idx]).css({'marginLeft':'8px','clear':'none','float':'left'});}
29
- idx++;}
30
- if(wppaCoverImageResponsive[mocc]){}
31
- else{jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',MCRWidth-wppaTextFrameDelta);}
32
- jQuery(".wppa-cover-box-mcr-"+mocc).css('width',MCRWidth);}
33
- else{if(wppaCoverImageResponsive[mocc]){}
34
- else{jQuery(".wppa-asym-text-frame-mcr-"+mocc).css('width',w-wppaTextFrameDelta);var myCss={'marginLeft':'0px','float':'left'}
35
- jQuery(".wppa-cover-box-mcr-"+mocc).css(myCss);}}
36
- if(wppaThumbSpaceAuto){var tfw=parseInt(jQuery(".thumbnail-frame-"+mocc).css('width'));if(tfw){var minspc=wppaMinThumbSpace;var weff=w-wppaThumbnailAreaDelta-7;var nthumbs=parseInt(weff/(tfw+minspc));var availsp=weff-nthumbs*tfw;var newspc=parseInt(0.5+availsp/(nthumbs+1));jQuery(".thumbnail-frame-"+mocc).css({marginLeft:newspc});}}
37
- jQuery(".thumbnail-frame-comalt-"+mocc).css('width',w-wppaThumbnailAreaDelta);jQuery(".wppa-com-alt-"+mocc).css('width',w-wppaThumbnailAreaDelta-wppaComAltSize-16);var row=1;var rowHeightPix;var rowHeightPerc=jQuery('#wppa-mas-h-'+row+'-'+mocc).attr('data-height-perc');while(rowHeightPerc){rowHeightPix=rowHeightPerc*(w-wppaThumbnailAreaDelta)/100;jQuery('#wppa-mas-h-'+row+'-'+mocc).css('height',rowHeightPix);row++;rowHeightPerc=jQuery('#wppa-mas-h-'+row+'-'+mocc).attr('data-height-perc');}
38
- wppaSetMasHorFrameWidthsForIeAndChrome(mocc);wppaFormatSlide(mocc);jQuery("#audio-slide-"+mocc).css('width',w-wppaBoxDelta-6);jQuery(".wppa-comment-textarea-"+mocc).css('width',w*0.7);wppaFilmStripLength[mocc]=w-wppaFilmStripAreaDelta[mocc];jQuery("#filmwindow-"+mocc).css('width',wppaFilmStripLength[mocc]);_wppaAdjustFilmstrip(mocc);if(!wppaIsMini[mocc]&&typeof(_wppaSlides[mocc])!='undefined'){if(wppaColWidth[mocc]<wppaMiniTreshold){jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRat);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRat);jQuery('#counter-'+mocc).html((_wppaCurIdx[mocc]+1)+' / '+_wppaSlides[mocc].length);}
39
- else{jQuery('#wppa-avg-rat-'+mocc).html(wppaAvgRating);jQuery('#wppa-my-rat-'+mocc).html(wppaMyRating);jQuery('#counter-'+mocc).html(wppaPhoto+' '+(_wppaCurIdx[mocc]+1)+' '+wppaOf+' '+_wppaSlides[mocc].length);}}
40
- jQuery(".wppa-sphoto-"+mocc).css('width',w);jQuery(".wppa-simg-"+mocc).css('width',w-2*wppaSlideBorderWidth);jQuery(".wppa-simg-"+mocc).css('height','');jQuery(".wppa-mphoto-"+mocc).css('width',w+10);jQuery(".wppa-mimg-"+mocc).css('width',w);jQuery(".wppa-mimg-"+mocc).css('height','');}
41
- function wppaSetMasHorFrameWidthsForIeAndChrome(mocc){var frames=jQuery('.wppa-mas-h-'+mocc);var tnm=wppaMinThumbSpace;for(var i=0;i<frames.length;i++){var img=wppaGetChildI(frames[i]);if(img){if(img.nodeName=='IMG'){if(!img.complete){setTimeout('wppaSetMasHorFrameWidthsForIeAndChrome( '+mocc+' )',400);return;}}
42
- var wd=((img.naturalWidth)/(img.naturalHeight)*(img.height))+tnm;jQuery(frames[i]).css({'width':wd});}}}
43
- function wppaGetChildI(parent){var children=parent.childNodes;var img=false;var i;for(i=0;i<children.length;i++){var child=children[i];if(child.id){if(child.id.substr(0,2)=='i-'){return child;}}
44
- var grandChild=wppaGetChildI(child);if(grandChild){return grandChild;}}
45
- return false;}
46
- var wppaFotomotoLoaded=false;var wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=true;}
47
- function wppaFotomotoToolbar(mocc,url){if(wppaColWidth[mocc]>=wppaFotomotoMinWidth){jQuery('#wppa-fotomoto-container-'+mocc).css('display','inline');jQuery('#wppa-fotomoto-checkout-'+mocc).css('display','inline');}
48
- else{jQuery('#wppa-fotomoto-container-'+mocc).css('display','none');jQuery('#wppa-fotomoto-checkout-'+mocc).css('display','none');return;}
49
- if(wppaFotomoto&&document.getElementById('wppa-fotomoto-container-'+mocc)){if(wppaFotomotoLoaded){FOTOMOTO.API.checkinImage(url);wppaFotomotoToolbarIds[mocc]=FOTOMOTO.API.showToolbar('wppa-fotomoto-container-'+mocc,url);}
50
- else{setTimeout('wppaFotomotoToolbar( '+mocc+',"'+url+'" )',200);wppaConsoleLog('Waiting for Fotomoto');}}}
51
- function wppaFotomotoHide(mocc){jQuery('#wppa-fotomoto-container-'+mocc).css('display','none');jQuery('#wppa-fotomoto-checkout-'+mocc).css('display','none');}
52
- function wppaGetCurrentFullUrl(mocc,idx){var xurl=document.location.href;var url;var temp1=xurl.split("?");var temp2='nil';var temp3;var i=0;var first=true;var pfx;if(!wppaShortQargs)pfx='wppa-';else pfx='';if(temp1[1])temp2=temp1[1].split("&");var albumSeen=false;url=temp1[0];if(temp2!='nil'){if(temp2.length>0){while(i<temp2.length){temp3=temp2[i].split("=");if(temp3[0]==pfx+'album')albumSeen=true;if(temp3[0]!=pfx+'photo'){if(first)url+="?";else url+="&";first=false;url+=temp2[i];}
53
- i++;}}}
54
- if(!albumSeen)return'';if(first)url+="?";else url+="&";if(wppaUsePhotoNamesInUrls){url+=pfx+'photo='+encodeURIComponent(_wppaNames[mocc][idx]);}
55
- else{url+=pfx+'photo='+_wppaId[mocc][idx];}
56
- return url;}
57
- function wppaStringContainsForbiddenChars(str){var forbidden=['?','&','#','/','"',"'"];var i=0;while(i<forbidden.length){if(str.indexOf(forbidden[i])!=-1){return true;}
58
- i++;}
59
- return false;}
60
- window.onpopstate=function(event){var occ=0;if(wppaCanPushState){if(event.state){occ=event.state.occur;switch(event.state.type){case'html':jQuery('#wppa-container-'+occ).html(event.state.html);break;case'slide':_wppaGoto(occ,event.state.slide);break;}}
61
- else if(wppaUpdateAddressLine){occ=wppaFirstOccur;jQuery('#wppa-container-'+occ).html(wppaStartHtml[occ]);wppaFirstOccur=0;if(occ==0){var url=document.location.href;var urls=url.split("&wppa-occur=");occ=parseInt(urls[1]);}
62
- var url=document.location.href;var urls=url.split("&wppa-photo=");var photo=parseInt(urls[1]);if(photo>0){var idx=0;while(idx<_wppaId[occ].length){if(_wppaId[occ][idx]==photo)break;idx++;}
63
- if(idx<_wppaId[occ].length)_wppaGoto(occ,idx);}}
64
- if(document.getElementById('theslide0-'+occ)){_wppaStop(occ);}}
65
- if(typeof(wppaQRUpdate)!='undefined')wppaQRUpdate(document.location.href);};function wppaPushStateSlide(mocc,slide,url){if(!wppaIsMini[mocc]){if(wppaCanPushState&&wppaUpdateAddressLine){if(url!=''){try{history.pushState({page:wppaHis,occur:mocc,type:'slide',slide:slide},"---",url);wppaConsoleLog('Slide history stack updated');}
66
- catch(err){wppaConsoleLog('Slide history stack update failed');}}}}}
67
- function wppaRepairScriptTags(text){var temp;var newtext;if(typeof(text)=='undefined')return'';while(text.indexOf('[script')!=-1){text=text.replace('[script','<script');}
68
- while(text.indexOf('[/script')!=-1){text=text.replace('[/script','</script');}
69
- return text;}
70
- function wppaRepairBrTags(text){var newtext;if(typeof(text)=='undefined')return'';newtext=text.replace('[br /]','<br />');return newtext;}
71
- function wppaTrimAlt(text){var newtext;if(typeof(text)=='undefined')return'';if(text.length>13){newtext=text.substr(0,10)+'...';}
72
- else newtext=text;return newtext;}
73
- var wppaFbInitBusy=false;function wppaFbInit(){if(!wppaFbInitBusy){if(typeof(FB)!='undefined'){wppaFbInitBusy=true;setTimeout('_wppaFbInit()',10);}
74
- else{wppaConsoleLog('Fb wait');setTimeout('wppaFbInit()',200);}}
75
- else{wppaConsoleLog('Fb Init busy');}}
76
- function _wppaFbInit(){FB.init({status:true,xfbml:true});wppaFbInitBusy=false;}
77
- function wppaInsertAtCursor(elm,value){if(document.selection){elm.focus();sel=document.selection.createRange();sel.text=value;}
78
- else if(elm.selectionStart||elm.selectionStart=='0'){var startPos=elm.selectionStart;var endPos=elm.selectionEnd;elm.value=elm.value.substring(0,startPos)
79
- +value
80
- +elm.value.substring(endPos,elm.value.length);elm.selectionStart=startPos+value.length;elm.selectionEnd=startPos+value.length;}else{elm.value+=value;}}
81
- function wppaGeoInit(mocc,lat,lon){var myLatLng=new google.maps.LatLng(lat,lon);var mapOptions={disableDefaultUI:false,panControl:false,zoomControl:true,mapTypeControl:true,scaleControl:true,streetViewControl:true,overviewMapControl:true,zoom:10,center:myLatLng,};var map=new google.maps.Map(document.getElementById("map-canvas-"+mocc),mapOptions);var marker=new google.maps.Marker({position:myLatLng,map:map,title:""});google.maps.event.addListener(map,"center_changed",function(){window.setTimeout(function(){map.panTo(marker.getPosition());},1000);});}
82
- function wppaEncode(xtext){var text,result;if(typeof(xtext)=='undefined')return;text=xtext;result=text.replace(/#/g,'||HASH||');text=result;result=text.replace(/&/g,'||AMP||');text=result;var temp=text.split('+');var idx=0;result='';while(idx<temp.length){result+=temp[idx];idx++;if(idx<temp.length)result+='||PLUS||';}
83
- return result;}
84
- function wppaUrlToId(url){var temp=url.split('/wppa/');if(temp.length==1){temp=url.split('/upload/');}
85
- if(temp.length==1){return 0;}
86
- temp=temp[1];temp=temp.split('.');temp=temp[0].replace('/','');temp=temp.replace('/','');temp=temp.replace('/','');temp=temp.replace('/','');temp=temp.replace('/','');return temp;}
87
- function wppaSuperSearchSelect(mocc,go){jQuery('#wppa-ss-albumopt-'+mocc).css('display','none');jQuery('#wppa-ss-albumcat-'+mocc).css('display','none');jQuery('#wppa-ss-albumname-'+mocc).css('display','none');jQuery('#wppa-ss-albumtext-'+mocc).css('display','none');jQuery('#wppa-ss-photoopt-'+mocc).css('display','none');jQuery('#wppa-ss-photoname-'+mocc).css('display','none');jQuery('#wppa-ss-photoowner-'+mocc).css('display','none');jQuery('#wppa-ss-phototag-'+mocc).css('display','none');jQuery('#wppa-ss-phototext-'+mocc).css('display','none');jQuery('#wppa-ss-photoexif-'+mocc).css('display','none');jQuery('#wppa-ss-photoiptc-'+mocc).css('display','none');jQuery('#wppa-ss-exifopts-'+mocc).css('display','none');jQuery('#wppa-ss-iptcopts-'+mocc).css('display','none');jQuery('#wppa-ss-spinner-'+mocc).css('display','none');jQuery('#wppa-ss-button-'+mocc).css('display','none');var s1=jQuery('#wppa-ss-pa-'+mocc).val();var s2='';var s3='';var data='';switch(s1){case'a':jQuery('#wppa-ss-albumopt-'+mocc).css('display','');s2=jQuery('#wppa-ss-albumopt-'+mocc).val();switch(s2){case'c':jQuery('#wppa-ss-albumcat-'+mocc).css('display','');var set=jQuery('.wppa-ss-albumcat-'+mocc);data='';var i;for(i=0;i<set.length;i++){if(jQuery(set[i]).attr('selected')=='selected'){data+='.'+jQuery(set[i]).val();}}
88
- data=data.substr(1);if(data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}
89
- break;case'n':jQuery('#wppa-ss-albumname-'+mocc).css('display','');data=jQuery('#wppa-ss-albumname-'+mocc).val();if(data!=null){jQuery('#wppa-ss-button-'+mocc).css('display','');}
90
- break;case't':jQuery('#wppa-ss-albumtext-'+mocc).css('display','');var set=jQuery('.wppa-ss-albumtext-'+mocc);data='';var i;for(i=0;i<set.length;i++){if(jQuery(set[i]).attr('selected')=='selected'){data+='.'+jQuery(set[i]).val();}}
91
- data=data.substr(1);if(data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}
92
- break;}
93
- break;case'p':jQuery('#wppa-ss-photoopt-'+mocc).css('display','');s2=jQuery('#wppa-ss-photoopt-'+mocc).val();switch(s2){case'n':jQuery('#wppa-ss-photoname-'+mocc).css('display','');data=jQuery('#wppa-ss-photoname-'+mocc).val();if(data!=null){jQuery('#wppa-ss-button-'+mocc).css('display','');}
94
- break;case'o':jQuery('#wppa-ss-photoowner-'+mocc).css('display','');data=jQuery('#wppa-ss-photoowner-'+mocc).val();if(data!=null){jQuery('#wppa-ss-button-'+mocc).css('display','');}
95
- break;case'g':jQuery('#wppa-ss-phototag-'+mocc).css('display','');var set=jQuery('.wppa-ss-phototag-'+mocc);data='';var i;for(i=0;i<set.length;i++){if(jQuery(set[i]).attr('selected')=='selected'){data+='.'+jQuery(set[i]).val();}}
96
- data=data.substr(1);if(data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}
97
- break;case't':jQuery('#wppa-ss-phototext-'+mocc).css('display','');var set=jQuery('.wppa-ss-phototext-'+mocc);data='';var i;for(i=0;i<set.length;i++){if(jQuery(set[i]).attr('selected')=='selected'){data+='.'+jQuery(set[i]).val();}}
98
- data=data.substr(1);if(data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}
99
- break;case'i':jQuery('#wppa-ss-photoiptc-'+mocc).css('display','');s3=jQuery('#wppa-ss-photoiptc-'+mocc).val();if(s3){if(s3.length>2){s3=s3.replace('#','H');}
100
- if(s3!=''){jQuery('#wppa-ss-iptcopts-'+mocc).css('display','');if(wppaLastIptc!=s3){wppaAjaxGetSsIptcList(mocc,s3,'wppa-ss-iptcopts-'+mocc);wppaLastIptc=s3;}
101
- else{data=jQuery('#wppa-ss-iptcopts-'+mocc).val();if(data!=null&&data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}}}}
102
- break;case'e':jQuery('#wppa-ss-photoexif-'+mocc).css('display','');s3=jQuery('#wppa-ss-photoexif-'+mocc).val();if(s3){if(s3.length>2){s3=s3.replace('#','H');}
103
- if(s3!=''){jQuery('#wppa-ss-exifopts-'+mocc).css('display','');if(wppaLastExif!=s3){wppaAjaxGetSsExifList(mocc,s3,'wppa-ss-exifopts-'+mocc);wppaLastExif=s3;}
104
- else{data=jQuery('#wppa-ss-exifopts-'+mocc).val();if(data!=null&&data!=''){jQuery('#wppa-ss-button-'+mocc).css('display','');}}}}
105
- break;}
106
- break;}
107
- if(go){var url=jQuery('#wppa-ss-pageurl-'+mocc).val();if(url.indexOf('?')==-1){url+='?';}
108
- else{url+='&';}
109
- url+='occur=1&wppa-supersearch='+s1+','+s2+','+s3+','+data;document.location.href=url;}}
110
- function wppaAjaxGetSsIptcList(mocc,s3,selid){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=getssiptclist'+'&tag='+s3+'&moccur='+mocc,async:true,type:'GET',timeout:10000,beforeSend:function(xhr){jQuery('#wppa-ss-spinner-'+mocc).css('display','');},success:function(result,status,xhr){jQuery('#'+selid).html(result);jQuery('#wppa-ss-iptcopts-'+mocc).css('display','');wppaSuperSearchSelect(mocc);setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+mocc+'", "#'+selid+'" )',10);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxGetSsIptcList failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){jQuery('#wppa-ss-spinner-'+mocc).css('display','none');}});}
111
- function wppaAjaxGetSsExifList(mocc,s3,selid){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=getssexiflist'+'&tag='+s3+'&moccur='+mocc,async:true,type:'GET',timeout:10000,beforeSend:function(xhr){jQuery('#wppa-ss-spinner-'+mocc).css('display','');},success:function(result,status,xhr){jQuery('#'+selid).html(result);jQuery('#wppa-ss-exifopts-'+mocc).css('display','');wppaSuperSearchSelect(mocc);setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+mocc+'", "#'+selid+'" )',10);},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxGetSsExifList failed. Error = '+error+', status = '+status,'force');},complete:function(xhr,status,newurl){jQuery('#wppa-ss-spinner-'+mocc).css('display','none');}});}
112
- function wppaSetIptcExifSize(clas,selid){var t=jQuery(clas);var n=t.length;if(n>6)n=6;if(n<2)n=2;jQuery(selid).attr('size',n);}
113
- function wppaUpdateSearchRoot(text,root){var items=jQuery(".wppa-search-root");var i=0;while(i<items.length){jQuery(items[i]).html(text);i++;}
114
- items=jQuery(".wppa-rootbox");i=0;while(i<items.length){if(root){jQuery(items[i]).removeAttr('checked');jQuery(items[i]).removeAttr('disabled');}
115
- else{jQuery(items[i]).attr('checked','checked');jQuery(items[i]).attr('disabled','disabled');}
116
- i++;}
117
- items=jQuery(".wppa-search-root-id");i=0;while(i<items.length){jQuery(items[i]).attr('value',root);i++;}}
118
- function wppaSubboxChange(elm){if(jQuery(elm).attr('checked')=='checked'){var items=jQuery(".wppa-rootbox");var i=0;while(i<items.length){jQuery(items[i]).attr('checked','checked');i++;}}}
119
- function wppaClearSubsearch(){var items=jQuery(".wppa-display-searchstring");var i=0;while(i<items.length){jQuery(items[i]).html('');i++;}
120
- items=jQuery(".wppa-search-sub-box");i=0;while(i<items.length){jQuery(items[i]).attr('disabled','disabled');i++;}}
121
- function wppaEnableSubsearch(){var items=jQuery(".wppa-search-sub-box");var i=0;while(i<items.length){jQuery(items[i]).removeAttr('disabled');i++;}}
122
- function wppaDisplaySelectedFiles(id){var theFiles=jQuery('#'+id);var i=0;var result='';while(i<theFiles[0].files.length){result+=theFiles[0].files[i].name+' ';i++;}
123
- jQuery('#'+id+'-display').val(result);}
124
- wppaConsoleLog('wppa.js version '+wppaJsVersion+' loaded.','force');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wppa-ajax.php CHANGED
@@ -50,7 +50,7 @@ global $wppa_log_file;
50
 
51
  switch ( $wppa_action ) {
52
  case 'getqrcode':
53
- wppa_log( 'obs', 'Ajax getqrcode for '.$_REQUEST['url'] );
54
  $nonce = $_REQUEST['wppa-qr-nonce'];
55
  if ( ! wp_verify_nonce( $nonce, 'wppa-qr-nonce' ) ) {
56
  die( 'Security check falure' );
50
 
51
  switch ( $wppa_action ) {
52
  case 'getqrcode':
53
+ //wppa_log( 'obs', 'Ajax getqrcode for '.$_REQUEST['url'] );
54
  $nonce = $_REQUEST['wppa-qr-nonce'];
55
  if ( ! wp_verify_nonce( $nonce, 'wppa-qr-nonce' ) ) {
56
  die( 'Security check falure' );
wppa-boxes-html.php CHANGED
@@ -3367,6 +3367,17 @@ global $wpdb;
3367
  $result .= '<tr valign="top" style="vertical-align:top;">' .
3368
  '<td valign="top" class="wppa-box-text wppa-td" style="vertical-align:top; width:30%;background-color:transparent;'.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'" >' .
3369
  __( 'Your comment:', 'wp-photo-album-plus' ) . '<br />' . wppa( 'comment_user' ) . '<br />';
 
 
 
 
 
 
 
 
 
 
 
3370
  if ( ( is_user_logged_in() && wppa_opt( 'comment_captcha' ) == 'all' ) ||
3371
  ( ! is_user_logged_in() && wppa_opt( 'comment_captcha' ) != 'none' ) ) {
3372
  $wid = '20%';
@@ -3384,7 +3395,7 @@ global $wpdb;
3384
  }
3385
 
3386
  $result .=
3387
- '<input type="button" name="commentbtn" onclick="wppaAjaxComment( '.wppa( 'mocc' ).', '.$id.' )" value="'.$btn.'" style="margin:0 4px 0 0;" />' .
3388
  '<img id="wppa-comment-spin-'.wppa( 'mocc' ).'" src="'.wppa_get_imgdir().'spinner.gif" style="display:none;" />' .
3389
  '</td>' .
3390
  '<td valign="top" class="wppa-box-text wppa-td" style="vertical-align:top; width:70%;background-color:transparent;'.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'" >';
3367
  $result .= '<tr valign="top" style="vertical-align:top;">' .
3368
  '<td valign="top" class="wppa-box-text wppa-td" style="vertical-align:top; width:30%;background-color:transparent;'.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'" >' .
3369
  __( 'Your comment:', 'wp-photo-album-plus' ) . '<br />' . wppa( 'comment_user' ) . '<br />';
3370
+
3371
+ /* invre modification */
3372
+ /* Place the invre placeholder into the commentform */
3373
+ if ( wppa_opt( 'comment_captcha' ) == 'invre' ) {
3374
+ ob_start();
3375
+ do_action('google_invre_render_widget_action');
3376
+ $result .= ob_get_clean();
3377
+ }
3378
+ else
3379
+ /* end invre modification */
3380
+
3381
  if ( ( is_user_logged_in() && wppa_opt( 'comment_captcha' ) == 'all' ) ||
3382
  ( ! is_user_logged_in() && wppa_opt( 'comment_captcha' ) != 'none' ) ) {
3383
  $wid = '20%';
3395
  }
3396
 
3397
  $result .=
3398
+ '<input id="comsubmit-' . wppa( 'mocc' ) . '" type="submit" name="commentbtn" onclick="function(event){event.preventDefault()};wppaAjaxComment( '.wppa( 'mocc' ).', '.$id.' );return false;" value="'.$btn.'" style="margin:0 4px 0 0;" />' .
3399
  '<img id="wppa-comment-spin-'.wppa( 'mocc' ).'" src="'.wppa_get_imgdir().'spinner.gif" style="display:none;" />' .
3400
  '</td>' .
3401
  '<td valign="top" class="wppa-box-text wppa-td" style="vertical-align:top; width:70%;background-color:transparent;'.__wcs( 'wppa-box-text' ).__wcs( 'wppa-td' ).'" >';
wppa-functions.php CHANGED
@@ -2305,6 +2305,16 @@ global $wppa_done;
2305
  if ( ! wppa_is_int( $cedit ) ) wp_die( 'Security check falure 14' );
2306
 
2307
  // Check captcha
 
 
 
 
 
 
 
 
 
 
2308
  if ( ( is_user_logged_in() && wppa_opt( 'comment_captcha' ) == 'all' ) ||
2309
  ( ! is_user_logged_in() && wppa_opt( 'comment_captcha' ) != 'none' ) ) {
2310
  $captkey = $id;
2305
  if ( ! wppa_is_int( $cedit ) ) wp_die( 'Security check falure 14' );
2306
 
2307
  // Check captcha
2308
+ /* invre modification */
2309
+ if ( wppa_opt( 'comment_captcha' ) == 'invre' ) {
2310
+ $is_valid = apply_filters('google_invre_is_valid_request_filter', true);
2311
+ if( ! $is_valid ) {
2312
+ $status = 'spam';
2313
+ }
2314
+ }
2315
+ else
2316
+ /* end invre modification */
2317
+
2318
  if ( ( is_user_logged_in() && wppa_opt( 'comment_captcha' ) == 'all' ) ||
2319
  ( ! is_user_logged_in() && wppa_opt( 'comment_captcha' ) != 'none' ) ) {
2320
  $captkey = $id;
wppa-settings-autosave.php CHANGED
@@ -6681,8 +6681,8 @@ global $wp_version;
6681
  $desc = __('Use a simple calculate captcha on comments form.', 'wp-photo-album-plus');
6682
  $help = '';
6683
  $slug = 'wppa_comment_captcha';
6684
- $opts = array(__('All users', 'wp-photo-album-plus'), __('Logged out users', 'wp-photo-album-plus'), __('No users', 'wp-photo-album-plus'));
6685
- $vals = array('all', 'logout', 'none');
6686
  $html1 = wppa_select($slug, $opts, $vals);
6687
  $clas = 'wppa_comment_';
6688
  $html2 = '';
6681
  $desc = __('Use a simple calculate captcha on comments form.', 'wp-photo-album-plus');
6682
  $help = '';
6683
  $slug = 'wppa_comment_captcha';
6684
+ $opts = array(__('All users', 'wp-photo-album-plus'), __('Logged out users', 'wp-photo-album-plus'), __('No users', 'wp-photo-album-plus'), __('Use Google invisible reCaptcha', 'wp-photo-album-plus'));
6685
+ $vals = array('all', 'logout', 'none', 'invre');
6686
  $html1 = wppa_select($slug, $opts, $vals);
6687
  $clas = 'wppa_comment_';
6688
  $html2 = '';