WP Photo Album Plus - Version 7.3.01.007

Version Description

= 7.3.01 =

  • This version addresses various bug fixes, feature requests and performance enhancements.

= 7.3.00 =

  • This version addresses various bug fixes and performance enhancements.

= 7.2.14 =

  • This version addresses various bug fixes and feature requests.

= 7.2.13 =

  • This version addresses various bug fixes and feature requests.

= 7.2.12 =

  • This version addresses various bug fixes and feature requests.

= 7.2.11 =

  • This version addresses various bug fixes and feature requests.

= 7.2.10 =

  • This version addresses various bug fixes and feature requests.

= 7.2.09 =

  • This version addresses various bug fixes and feature requests.

= 7.2.08 =

  • This version addresses various bug fixes.

= 7.2.07 =

  • This version addresses various bug fixes.

= 7.2.06 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.05 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.04 =

  • This version addresses various bug fixes and feature requests.

= 7.2.03 =

  • This version addresses various bug fixes and feature requests.

= 7.2.02 =

  • This version addresses various bug fixes and feature requests.

= 7.2.01 =

  • This version addresses various bug fixes and feature requests.

= 7.2.00 =

  • This version addresses various bug fixes and feature requests.

= 7.1.11 =

  • This version addresses various bug fixes and feature requests.

= 7.1.10 =

  • This version addresses various bug fixes and feature requests.

= 7.1.09 =

  • This version addresses various bug fixes and feature requests.

= 7.1.08 =

  • This version addresses various bug fixes and feature requests.

= 7.1.07 =

  • This version addresses various bug fixes and feature requests.

= 7.1.06 =

  • This version addresses various bug fixes and feature requests.

= 7.1.05 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.04 =

  • This version addresses various bug fixes.

= 7.1.03 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.02 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.1.01 =

  • This version addresses various bug fixes and feature requests.

= 7.1.00 =

  • This version addresses various bug fixes and feature requests.
  • The Photo Album -> Upload Photos and Import Photos admin pages have been substantially improved. Read the changelog for details.

= 7.0.11 =

  • This version addresses various bug fixes and feature requests.

= 7.0.11 =

  • This version addresses various bug fixes

= 7.0.10 =

  • This version addresses various bug fixes

= 7.0.09 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.0.08 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.07 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.06 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.05 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 7.0.04 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.03 =

  • This version addresses various minor bug fixes and feature requests.

= 7.0.02 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.01 =

  • This version addresses various minor bug fixes and feature requests.

= 7.0.00 =

  • Shortcode generators for Gutenberg added.
  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.
  • To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Configure Table IX-M to enable various mailing lists, and use the WPPA+ Notify widget for full user flexibility.

= 6.9.21 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 6.9.20 =

  • This version addresses various bug fixes

= 6.9.19 =

  • This version addresses various minor bug fixes

= 6.9.18 =

  • This version addresses various minor bug fixes

= 6.9.17 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.16 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.15 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.14 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.13 =

  • Security release.

= 6.9.12 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.11 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.10 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.09 =

  • Panorama support phase III.

= 6.9.08 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase II.

= 6.9.07 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase I.

= 6.9.06 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.05 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.04 =

  • This version addresses various minor bug fixes and feature requests.
  • Local CDN functionality has been added.

= 6.9.03 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.02 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.01 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.00 =

  • This version includes the code for the privacy policy requirements.

= 6.8.09

  • This version addresses various bug fixes and code edits.

= 6.8.08 =

  • This version addresses various minor bug fixes and feature requests.
  • This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
  • For more info on performance improvements and compatibility with optimizers: see the changelog.txt

= 6.8.07 =

  • This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.

= 6.8.06 =

  • This version addresses various minor bug fixes and improved cache handling.

= 6.8.05 =

  • This version addresses various minor bug fixes and feture requests.

= 6.8.04 =

  • This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 7.3.01.007
Comparing to
See all releases

Code changes from version 7.3.00.004 to 7.3.01.007

changelog.txt CHANGED
@@ -1,5 +1,16 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 7.3.00 =
4
 
5
  * The originators of ratings and comments are now defined by their user ID if they are loggedin, and by their IP addresses when they are not logged in.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 7.3.01 =
4
+
5
+ * New setting: Table II-B1.2 Renew on Filmonly. Adds a renew link to the start/stop navigationbar on the slideonly display. Requires Table II-B1.1 (Start/Stop on filmonly) and Table IV-A1.0 (use Ajax) being checked.
6
+ * New setting: Table II-B18 No animate on mobile. If ticked, slideshow does no animation on mobile devices to unload cpu.
7
+ * Improved positioning and animations of filmonly deisplay.
8
+ * No longer uses https://cdnjs.cloudflare.com/ajax/libs/jquery.nicescroll/3.7.6/jquery.nicescroll.min.js due to bug https://github.com/inuyaksa/jquery.nicescroll/issues/799.
9
+ Now uses .../wp-photo-album-plus/vendor/nicescroll/jquery.nicescroll.min.js that has been patched.
10
+ * Removed slideshw animation types that do not work properly. Remaining types are: fadeover (default), fadeafter and swipe.
11
+ * Fixed a not defined PHP warning.
12
+ * Fixed a fatal error in import proc.
13
+
14
  = 7.3.00 =
15
 
16
  * The originators of ratings and comments are now defined by their user ID if they are loggedin, and by their IP addresses when they are not logged in.
js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 7.2.16
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -1829,6 +1829,7 @@ function wppaAjaxPopupWindow( slug ) {
1829
  closeText: wppaCloseText,
1830
  };
1831
  jQuery( '#wppa-modal-container' ).html( result ).dialog( opt ).dialog( "open" );
 
1832
  jQuery( '.ui-dialog' ).css( {
1833
  boxShadow: '0px 0px 5px 5px #aaaaaa',
1834
  // borderRadius: wppaBoxRadius+'px',
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 7.3.01
5
  /* Various js routines used in admin pages
6
  */
7
 
1829
  closeText: wppaCloseText,
1830
  };
1831
  jQuery( '#wppa-modal-container' ).html( result ).dialog( opt ).dialog( "open" );
1832
+ jQuery( '#wppa-modal-container' ).css( { width: '100%' } );
1833
  jQuery( '.ui-dialog' ).css( {
1834
  boxShadow: '0px 0px 5px 5px #aaaaaa',
1835
  // borderRadius: wppaBoxRadius+'px',
js/wppa-admin-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var wppaImageDirectory,wppaAjaxUrl,wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaUploadToThisAlbum="Upload to this album",wppaCropper=[];function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),n=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var i=a.files[0];if(i.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+i.name);else if(i.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");n.value="Uploading...",n.style.color="black";var o=new FormData;o.append("photo",i,i.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#remark-"+t).html(e[2]),n.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",n.value="Error occured",n.style.color="red"}}else alert("An error occurred!")},s.send(o)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("wppa_enable_video","wppa-video"),wppaCheckCheck("wppa_custom_fields","custfields"),wppaCheckCheck("wppa_album_custom_fields","albumcustfields"),wppaCheckCheck("wppa_new_mod_label_is_text","nmtxt"),wppaCheckCheck("wppa_coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<13;subtab++)"on"==(p=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]))&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);0<p.length&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible()});var wppaSubTabOn=new Array;function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-help").css("display","none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-h").css("display",""),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){var p=e.substring(5);document.getElementById(p).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==p?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}else jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none")}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,p){var a="",n="";a=e||'<div style="padding-left:5px;" >',p?n=p:aftrer="</div>",wppaFeAjaxLog("in");var i=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,i.open("GET",o,!0),i.send(),i.onreadystatechange=function(){switch(i.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:if(200==i.status){var e=wppaTrim(i.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=a+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=a+'<span style="color:red;" >Comm error '+i.status+": "+i.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,p.open("GET",e,!0),p.send(),p.onreadystatechange=function(){switch(p.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:if(200==p.status){var e=wppaTrim(p.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),p&&(n+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(n),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":document.getElementById("remark-"+t).innerHTML=e[2];break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>"}jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}function wppaAjaxUpdatePhoto(l,r,e,t,u,c){u=u||"",c=c||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+l+"&item="+r+"&wppa-nonce="+document.getElementById("photo-nonce-"+l).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==r&&jQuery("#wppa-photo-spin-"+l).css({visibility:"visible"}),jQuery("#remark-"+l).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"99":jQuery("#photoitem-"+l).html(u+'<span style="color:red">'+a[2]+"</span>"+c);break;default:var n,i,o=JSON.parse(a[2]);for(n in o)switch(i=o[n],n){case"remark":var s;i=(i=(i=i.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),s="0"!=a[1]?'<span style="color:red;" >'+i+"</span>":'<span style="color:green;" >'+i+"</span>",jQuery("#remark-"+l).html(s);break;case"photourl":if(wppaCropper[l])wppaCropper[l].replace(i);else jQuery("#photourl-"+l).attr("src",i);jQuery("#thumba-"+l).attr("href",i);break;case"thumburl":jQuery("#thumburl-"+l).attr("src",i);break;case"magickstack":jQuery("#magickstack-"+l).html(i),0<i.length?jQuery("#imstackbutton-"+l).css("display","inline"):jQuery("#imstackbutton-"+l).css("display","none");break;default:jQuery("#"+n+"-"+l).html(i)}}"description"==r&&jQuery("#wppa-photo-spin-"+l).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+l).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}_wppaRefreshAfter=!1;var wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,p,a){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var i=wppaAlbumUpdateMatrix.length,o=0,s=!1,l=-1;o<i;)wppaAlbumUpdateMatrix[o][0]==e&&wppaAlbumUpdateMatrix[o][1]==t&&(s=!0,l=o),o++;if(!s){wppaAlbumUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],l=i}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(s,l,r,u,c){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+s+"&item="+l+"&wppa-nonce="+document.getElementById("album-nonce-"+s).value+"&value="+wppaEncode(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxAlbumCount--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+s).html(a[2]):jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+s).html='<span style="color:red">'+a[2]+" ("+a[1]+")</span>"}if(void 0!==a[3]&&wppaProcessFull(a[3],a[4]),c&&"0"==a[1])return jQuery("#albumstatus-"+s).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==l&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var n=0,i=-1,o=wppaAlbumUpdateMatrix.length;n<o;)wppaAlbumUpdateMatrix[n][0]==s&&wppaAlbumUpdateMatrix[n][1]==l&&(i=n),n++;wppaAlbumUpdateMatrix[i][2]=r||0,wppaAlbumUpdateMatrix[i][4]=!1,wppaAlbumUpdateMatrix[i][5]=!1,wppaAjaxUpdateAlbumMonitor(u)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,p,e){var a=wppaGetXmlHttp(),n=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+p+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#remark-"+t).html(e[2]);break;default:jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>")}jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")}else jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",n,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(p.responseText).split("||");if(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status)switch(e[1]){case"0":jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2]),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+p.status),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(n,e,o){if(!o&&!e&&"yes"==document.getElementById(n+"_continue").value)return document.getElementById(n+"_continue").value="no",document.getElementById(n+"_button").value="Start!",void(0<jQuery("#"+n+"_togo").html()&&(jQuery("#"+n+"_status").html("Pausing..."),jQuery("#"+n+"_button").css("display","none")));o||(document.getElementById(n+"_continue").value="yes",document.getElementById(n+"_button").value="Stop!",""==jQuery("#"+n+"_status").html()&&jQuery("#"+n+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+n+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(o?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("||"),n=a[1],i=!1;return n?(10<a[0].length&&(alert("An error occurred:\n"+a[0]),i=!0),jQuery("#"+n+"_status").html(a[2]),jQuery("#"+n+"_togo").html(a[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==a[3]?"reload"==a[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?o||jQuery("#"+n+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,p){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+n+", Error = "+p+", status = "+t,"force"),jQuery("#"+n+"_status").html("Server error #"+(11-wppaAlwaysContinue));var a=!1;--wppaAlwaysContinue<1&&(a=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(a||0<wppaAlwaysContinue)&&("wppa_remake"==n&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==n&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==n&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+n+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*wppaWindowWidth(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,n="action=wppa&wppa-action=maintenancepopup&slug="+e;if(n+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),4==p.readyState&&200==p.status){var i=wppaEntityDecode(p.responseText).split("|"),o=i[0];i[0]="";var s=i.join("|").substring(1),l={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(s).dialog(l).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-dialog-title").html("<h2>"+o+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(r,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(r)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+r,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0])alert("The server returned unexpected output:\n"+a[0]);else{switch(a[1]){case"0":jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),a[3]&&alert(a[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),a[3]&&alert(a[3])}if(jQuery("#img_"+r.replace("#","H")).attr("title",a[2]),a[4])for(var n,i,o,s=a[4].split(";"),l=0;l<s.length;)n=s[l].split(":"),i=jQuery("#"+n[0]).html(),o=n[1],""!=i&&""==o&&(o='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+n[0]).html(o),l++}},error:function(e){jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+r).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=r&&"icon_corner_style"!=r||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=r&&"svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=r&&"ovl_svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){var t;if(void 0!==e){if("number"==typeof e)return e;var p=(t=(t=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0;for(t="";a<p.length;)t+=p[a],++a<p.length&&(t+="||PLUS||");return t}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",n=-1,i=-2,o=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(o=n,p==++o?s=!0:s?(a+=n==i?t+n+t+p:t+t+n+t+p,s=!1):a+=t+p,s||(i=p,i++),n=p),l++;for(s&&(a+=".."+n);"."==a.substr(0,1);)a=a.substr(1);for(;a.substr(0,1)==t;)a=a.substr(1);return a}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var p,a=[],n=0,i=0;for(t=t||".",p=jQuery(e),i=n=0;n<p.length;)p[n].selected&&(a[i]=p[n].value,i++),n++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+a,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+a+"-spin").css("display","inline")},success:function(e,t,p){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[2])},error:function(e,t,p){alert("Export Db Table "+a+" failed. Error = "+p+", status = "+t)},complete:function(e,t,p){jQuery("#"+a+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+o,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+o+"_togo").html(a[0]);var n=jQuery("#"+o+"_status").html(),i=a[1];""!=n&&""==i&&(i='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+o+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(o)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+n).html(a[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var p=0,a=0;function n(e){(e=e||window.event).preventDefault(),p=a-e.clientY,a=e.clientY,t.style.top=t.offsetTop-p+"px"}function i(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,a=e.clientY,document.onmouseup=i,document.onmousemove=n}}
1
+ var wppaImageDirectory,wppaAjaxUrl,wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaUploadToThisAlbum="Upload to this album",wppaCropper=[];function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),n=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var i=a.files[0];if(i.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+i.name);else if(i.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");n.value="Uploading...",n.style.color="black";var o=new FormData;o.append("photo",i,i.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#remark-"+t).html(e[2]),n.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",n.value="Error occured",n.style.color="red"}}else alert("An error occurred!")},s.send(o)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("wppa_enable_video","wppa-video"),wppaCheckCheck("wppa_custom_fields","custfields"),wppaCheckCheck("wppa_album_custom_fields","albumcustfields"),wppaCheckCheck("wppa_new_mod_label_is_text","nmtxt"),wppaCheckCheck("wppa_coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<13;subtab++)"on"==(p=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]))&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);0<p.length&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible()});var wppaSubTabOn=new Array;function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-help").css("display","none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-h").css("display",""),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){var p=e.substring(5);document.getElementById(p).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==p?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}else jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none")}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,p){var a="",n="";a=e||'<div style="padding-left:5px;" >',p?n=p:aftrer="</div>",wppaFeAjaxLog("in");var i=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,i.open("GET",o,!0),i.send(),i.onreadystatechange=function(){switch(i.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:if(200==i.status){var e=wppaTrim(i.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=a+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=a+'<span style="color:red;" >Comm error '+i.status+": "+i.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,p.open("GET",e,!0),p.send(),p.onreadystatechange=function(){switch(p.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:if(200==p.status){var e=wppaTrim(p.responseText).split("||");"ER"==e[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),p&&(n+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(n),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":document.getElementById("remark-"+t).innerHTML=e[2];break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>"}jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}function wppaAjaxUpdatePhoto(l,r,e,t,u,c){u=u||"",c=c||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+l+"&item="+r+"&wppa-nonce="+document.getElementById("photo-nonce-"+l).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==r&&jQuery("#wppa-photo-spin-"+l).css({visibility:"visible"}),jQuery("#remark-"+l).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"99":jQuery("#photoitem-"+l).html(u+'<span style="color:red">'+a[2]+"</span>"+c);break;default:var n,i,o=JSON.parse(a[2]);for(n in o)switch(i=o[n],n){case"remark":var s;i=(i=(i=i.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),s="0"!=a[1]?'<span style="color:red;" >'+i+"</span>":'<span style="color:green;" >'+i+"</span>",jQuery("#remark-"+l).html(s);break;case"photourl":if(wppaCropper[l])wppaCropper[l].replace(i);else jQuery("#photourl-"+l).attr("src",i);jQuery("#thumba-"+l).attr("href",i);break;case"thumburl":jQuery("#thumburl-"+l).attr("src",i);break;case"magickstack":jQuery("#magickstack-"+l).html(i),0<i.length?jQuery("#imstackbutton-"+l).css("display","inline"):jQuery("#imstackbutton-"+l).css("display","none");break;default:jQuery("#"+n+"-"+l).html(i)}}"description"==r&&jQuery("#wppa-photo-spin-"+l).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+l).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}_wppaRefreshAfter=!1;var wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,p,a){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var i=wppaAlbumUpdateMatrix.length,o=0,s=!1,l=-1;o<i;)wppaAlbumUpdateMatrix[o][0]==e&&wppaAlbumUpdateMatrix[o][1]==t&&(s=!0,l=o),o++;if(!s){wppaAlbumUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],l=i}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(s,l,r,u,c){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+s+"&item="+l+"&wppa-nonce="+document.getElementById("album-nonce-"+s).value+"&value="+wppaEncode(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxAlbumCount--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+s).html(a[2]):jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+s).html='<span style="color:red">'+a[2]+" ("+a[1]+")</span>"}if(void 0!==a[3]&&wppaProcessFull(a[3],a[4]),c&&"0"==a[1])return jQuery("#albumstatus-"+s).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==l&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var n=0,i=-1,o=wppaAlbumUpdateMatrix.length;n<o;)wppaAlbumUpdateMatrix[n][0]==s&&wppaAlbumUpdateMatrix[n][1]==l&&(i=n),n++;wppaAlbumUpdateMatrix[i][2]=r||0,wppaAlbumUpdateMatrix[i][4]=!1,wppaAlbumUpdateMatrix[i][5]=!1,wppaAjaxUpdateAlbumMonitor(u)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,p,e){var a=wppaGetXmlHttp(),n=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+p+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#remark-"+t).html(e[2]);break;default:jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>")}jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")}else jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",n,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(p.responseText).split("||");if(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status)switch(e[1]){case"0":jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2]),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+p.status),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(n,e,o){if(!o&&!e&&"yes"==document.getElementById(n+"_continue").value)return document.getElementById(n+"_continue").value="no",document.getElementById(n+"_button").value="Start!",void(0<jQuery("#"+n+"_togo").html()&&(jQuery("#"+n+"_status").html("Pausing..."),jQuery("#"+n+"_button").css("display","none")));o||(document.getElementById(n+"_continue").value="yes",document.getElementById(n+"_button").value="Stop!",""==jQuery("#"+n+"_status").html()&&jQuery("#"+n+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+n+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(o?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("||"),n=a[1],i=!1;return n?(10<a[0].length&&(alert("An error occurred:\n"+a[0]),i=!0),jQuery("#"+n+"_status").html(a[2]),jQuery("#"+n+"_togo").html(a[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==a[3]?"reload"==a[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?o||jQuery("#"+n+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,p){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+n+", Error = "+p+", status = "+t,"force"),jQuery("#"+n+"_status").html("Server error #"+(11-wppaAlwaysContinue));var a=!1;--wppaAlwaysContinue<1&&(a=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(a||0<wppaAlwaysContinue)&&("wppa_remake"==n&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==n&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==n&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+n+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*wppaWindowWidth(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,n="action=wppa&wppa-action=maintenancepopup&slug="+e;if(n+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),4==p.readyState&&200==p.status){var i=wppaEntityDecode(p.responseText).split("|"),o=i[0];i[0]="";var s=i.join("|").substring(1),l={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(s).dialog(l).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-dialog-title").html("<h2>"+o+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(r,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(r)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+r,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0])alert("The server returned unexpected output:\n"+a[0]);else{switch(a[1]){case"0":jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),a[3]&&alert(a[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),a[3]&&alert(a[3])}if(jQuery("#img_"+r.replace("#","H")).attr("title",a[2]),a[4])for(var n,i,o,s=a[4].split(";"),l=0;l<s.length;)n=s[l].split(":"),i=jQuery("#"+n[0]).html(),o=n[1],""!=i&&""==o&&(o='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+n[0]).html(o),l++}},error:function(e){jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+r).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=r&&"icon_corner_style"!=r||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=r&&"svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=r&&"ovl_svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){var t;if(void 0!==e){if("number"==typeof e)return e;var p=(t=(t=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0;for(t="";a<p.length;)t+=p[a],++a<p.length&&(t+="||PLUS||");return t}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",n=-1,i=-2,o=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(o=n,p==++o?s=!0:s?(a+=n==i?t+n+t+p:t+t+n+t+p,s=!1):a+=t+p,s||(i=p,i++),n=p),l++;for(s&&(a+=".."+n);"."==a.substr(0,1);)a=a.substr(1);for(;a.substr(0,1)==t;)a=a.substr(1);return a}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var p,a=[],n=0,i=0;for(t=t||".",p=jQuery(e),i=n=0;n<p.length;)p[n].selected&&(a[i]=p[n].value,i++),n++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+a,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+a+"-spin").css("display","inline")},success:function(e,t,p){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[2])},error:function(e,t,p){alert("Export Db Table "+a+" failed. Error = "+p+", status = "+t)},complete:function(e,t,p){jQuery("#"+a+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+o,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+o+"_togo").html(a[0]);var n=jQuery("#"+o+"_status").html(),i=a[1];""!=n&&""==i&&(i='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+o+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(o)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+n).html(a[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var p=0,a=0;function n(e){(e=e||window.event).preventDefault(),p=a-e.clientY,a=e.clientY,t.style.top=t.offsetTop-p+"px"}function i(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,a=e.clientY,document.onmouseup=i,document.onmousemove=n}}
js/wppa-ajax-front.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsAjaxVersion = '7.2.017';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
@@ -171,6 +171,10 @@ function wppaDoAjaxRender( mocc, ajaxurl, newurl, add, waitfor, addHilite ) {
171
  // Remove spinner
172
  jQuery( '#wppa-ajax-spin-'+mocc ).stop().fadeOut();
173
 
 
 
 
 
174
  // Fake resize
175
  window.dispatchEvent(new Event('resize'));
176
 
@@ -600,7 +604,7 @@ function _bumpViewCount( photo ) {
600
 
601
  // Already bumped?
602
  if ( wppaPhotoView[photo] ) {
603
- wppaConsoleLog( '_bumpViewCount not done. Duplicate ' + photo );
604
  return;
605
  }
606
 
@@ -614,7 +618,7 @@ function _bumpViewCount( photo ) {
614
  timeout: 60000,
615
  success: function( result, status, xhr ) {
616
  wppaPhotoView[photo] = true;
617
- wppaConsoleLog( '_bumpViewCount '+photo+' success.' );
618
  },
619
  error: function( xhr, status, error ) {
620
  wppaConsoleLog( '_bumpViewCount failed. Error = ' + error + ', status = ' + status, 'force' );
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsAjaxVersion = '7.3.001';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
171
  // Remove spinner
172
  jQuery( '#wppa-ajax-spin-'+mocc ).stop().fadeOut();
173
 
174
+ // Re-activate lazy
175
+ _wppaLazyDone[mocc] = false;
176
+ _wppaLazyDone[0] = false;
177
+
178
  // Fake resize
179
  window.dispatchEvent(new Event('resize'));
180
 
604
 
605
  // Already bumped?
606
  if ( wppaPhotoView[photo] ) {
607
+ // wppaConsoleLog( '_bumpViewCount not done. Duplicate ' + photo );
608
  return;
609
  }
610
 
618
  timeout: 60000,
619
  success: function( result, status, xhr ) {
620
  wppaPhotoView[photo] = true;
621
+ // wppaConsoleLog( '_bumpViewCount '+photo+' success.' );
622
  },
623
  error: function( xhr, status, error ) {
624
  wppaConsoleLog( '_bumpViewCount failed. Error = ' + error + ', status = ' + status, 'force' );
js/wppa-ajax-front.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsAjaxVersion="7.2.017",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(n,a,i,p,e,t){0<parseInt(e)&&e!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+n+", '"+a+"', '"+i+"', '"+p+"', "+e+" )",100):(wppaRenderAdd=p,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[n]&&(a+="&resp=1"),t&&_wppaCurIdx[n]&&_wppaId[n][_wppaCurIdx[n]]&&(a+="&wppa-hilite="+_wppaId[n][_wppaCurIdx[n]]),wppaCanAjaxRender||!i?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[n]&&_wppaStop(n),jQuery("#wppa-ajax-spin-"+n).fadeIn()},success:function(a,p,e){if(wppaRenderAdd)jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+n+"-end");else if(wppaRenderModal&&i){var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(n),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+n).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),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(n)})}else jQuery("#wppa-container-"+n).html(a),jQuery("#wppa-button-hide-"+n).show();if(wppaCanPushState&&wppaUpdateAddressLine&&i){wppaHis++,i=i.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:n,type:"html",html:a},"",i),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(a){try{history.replaceState({page:wppaHis,occur:n,type:"html"},"",i),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=n)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+i,"force"),wppaQRUpdate(i)),wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax");var o=a.indexOf("<script"),r=a.lastIndexOf("<script");-1==o?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+o+" last at "+r,"force")},error:function(a,p,e){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+e+", status = "+p,"force"),document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax")},complete:function(a,p,e){wppaWaitForCounter++,wppaRenderModal||jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+n).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+n).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,p,e){document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+e+", status = "+p,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),e="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){if("classic"==wppaUploadEdit){(r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>");var p='<meta name="viewport" content="width='+n+'" ><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" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" 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><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+e+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>';r.document.write(p),r.document.write("</head>"),r.document.write("<body>")}},success:function(a,p,e){if("classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit){var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),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(a,p,e){"classic"==wppaUploadEdit&&r.document.write(p+" "+e),wppaConsoleLog("wppaEditPhoto failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,p,e,t){for(var o,r,n=jQuery("."+a),i=[],c=jQuery("#"+e).val(),s=0,u=0;s<n.length;)n[s].selected&&(i[u]=n[s].value,u++),s++;""!=(o=jQuery("#"+p).val())&&(i[u]=o),r=i.join(),""==o&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+r+"&album="+c,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,p,e){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,p,e){jQuery("#"+t).html('<span style="color:red" >'+e+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDestroyAlbum(a,p){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+p,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+e+", status = "+p,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,p,e){wppaConsoleLog("_bumpClickCount success.")},error:function(a,p,e){wppaConsoleLog("_bumpClickCount failed. Error = "+e+", status = "+p,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]?wppaConsoleLog("_bumpViewCount not done. Duplicate "+t):jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){wppaPhotoView[t]=!0,wppaConsoleLog("_bumpViewCount "+t+" success.")},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(r,p){if(0!=p&&!_wppaSSRuns[r]){var a=_wppaId[r][_wppaCurIdx[r]],e=_wppaMyr[r][_wppaCurIdx[r]],t=_wppaWaitTexts[r][_wppaCurIdx[r]];0<t.length?alert(t):0!=e&&wppaRatingOnce||e<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur="+r+"&wppa-index="+_wppaCurIdx[r]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+r+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+r+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t=a.split("||");if(0==t[0])900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(r)):alert("Error Code="+t[1]+"\n\n"+t[2]);else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");jQuery("#wppa-like-"+r).attr("title",o[0]),jQuery("#wppa-liketext-"+r).html(o[1]),"1"==t[3]?jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]}else _wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(r),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7]);wppaNextOnCallback&&_wppaNextOnCallback(r)}},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))}}function _wppaOvlRateIt(r,n,i,c){0!=n&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+n+"&wppa-rating-id="+r+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+i+"-"+n).stop().fadeTo(100,1),jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){wppaConsoleLog(a,"force");var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");return jQuery("#wppa-like-0").attr("title",o[0]),jQuery("#wppa-liketext-0").html(o[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+r+"-"+i).attr("title",o[0]),jQuery("#wppa-liketext-"+r+"-"+i).html(o[1]),void("1"==t[3]?jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(i,t[4],".wppa-avg-"),_wppaSetRd(i,t[3],".wppa-rate-"),c)return;wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,p,e){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxMakeOrigName(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+p+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,p,e){var t=a.split("||");"0"==t[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=t[2]):"file"==wppaArtMonkyLink&&window.open(t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+t[1]+"\n\n"+t[2]))},error:function(a,p,e){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,p,e){var t=a.split("||"),o=t[0],r=t[1],n=t[2];3==t.length&&""!=n&&alert("Attention:\n\n"+n),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,p,e){alert("An error occurred:\n"+e+"\nPlease try again")},complete:function(a,p,e){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){if(_wppaValidateComment(t,a)){var p="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t;void 0!==jQuery("#wppa-comemail-"+t).val()&&(p+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(p+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(p+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(p+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,p,e){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){jQuery("#wppa-comment-spin-"+t).css("display","none")}})}}function wppaUpdatePhotoNew(a){for(var p=["name","description","tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],e="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<p.length;)void 0!==jQuery("#"+p[t]).val()&&(e+="&"+p[t]+"="+jQuery("#"+p[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:e,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,p,e){0<a.length&&alert(a)},error:function(a,p,e){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,o){if(wppaLastQrcodeUrl!=a){wppaLastQrcodeUrl=a;var p="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a);jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){var t=a.split("|");document.getElementById(o).src=t[0],jQuery(o).attr("title",t[1]),wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+o)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}})}}function wppaAjaxNotify(a,p){var e=jQuery(a).prop("checked")?"on":"off",t="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+p+"&onoff="+e;jQuery.ajax({url:wppaAjaxUrl,data:t,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxNotify failed. Error = "+e+", status = "+p,"force")}})}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
1
+ var wppaJsAjaxVersion="7.3.001",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(n,a,i,p,e,t){0<parseInt(e)&&e!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+n+", '"+a+"', '"+i+"', '"+p+"', "+e+" )",100):(wppaRenderAdd=p,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[n]&&(a+="&resp=1"),t&&_wppaCurIdx[n]&&_wppaId[n][_wppaCurIdx[n]]&&(a+="&wppa-hilite="+_wppaId[n][_wppaCurIdx[n]]),wppaCanAjaxRender||!i?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[n]&&_wppaStop(n),jQuery("#wppa-ajax-spin-"+n).fadeIn()},success:function(a,p,e){if(wppaRenderAdd)jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+n+"-end");else if(wppaRenderModal&&i){var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(n),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+n).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),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(n)})}else jQuery("#wppa-container-"+n).html(a),jQuery("#wppa-button-hide-"+n).show();if(wppaCanPushState&&wppaUpdateAddressLine&&i){wppaHis++,i=i.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:n,type:"html",html:a},"",i),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(a){try{history.replaceState({page:wppaHis,occur:n,type:"html"},"",i),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=n)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+i,"force"),wppaQRUpdate(i)),wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax");var o=a.indexOf("<script"),r=a.lastIndexOf("<script");-1==o?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+o+" last at "+r,"force")},error:function(a,p,e){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+e+", status = "+p,"force"),document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax")},complete:function(a,p,e){wppaWaitForCounter++,wppaRenderModal||jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+n).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+n).stop().fadeOut(),_wppaLazyDone[n]=!1,_wppaLazyDone[0]=!1,window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,p,e){document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+e+", status = "+p,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),e="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){if("classic"==wppaUploadEdit){(r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>");var p='<meta name="viewport" content="width='+n+'" ><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" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" 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><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+e+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>';r.document.write(p),r.document.write("</head>"),r.document.write("<body>")}},success:function(a,p,e){if("classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit){var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),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(a,p,e){"classic"==wppaUploadEdit&&r.document.write(p+" "+e),wppaConsoleLog("wppaEditPhoto failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,p,e,t){for(var o,r,n=jQuery("."+a),i=[],c=jQuery("#"+e).val(),s=0,u=0;s<n.length;)n[s].selected&&(i[u]=n[s].value,u++),s++;""!=(o=jQuery("#"+p).val())&&(i[u]=o),r=i.join(),""==o&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+r+"&album="+c,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,p,e){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,p,e){jQuery("#"+t).html('<span style="color:red" >'+e+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDestroyAlbum(a,p){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+p,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+e+", status = "+p,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,p,e){wppaConsoleLog("_bumpClickCount success.")},error:function(a,p,e){wppaConsoleLog("_bumpClickCount failed. Error = "+e+", status = "+p,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){wppaPhotoView[t]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,p,e){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(r,p){if(0!=p&&!_wppaSSRuns[r]){var a=_wppaId[r][_wppaCurIdx[r]],e=_wppaMyr[r][_wppaCurIdx[r]],t=_wppaWaitTexts[r][_wppaCurIdx[r]];0<t.length?alert(t):0!=e&&wppaRatingOnce||e<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur="+r+"&wppa-index="+_wppaCurIdx[r]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+r+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+r+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){var t=a.split("||");if(0==t[0])900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(r)):alert("Error Code="+t[1]+"\n\n"+t[2]);else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");jQuery("#wppa-like-"+r).attr("title",o[0]),jQuery("#wppa-liketext-"+r).html(o[1]),"1"==t[3]?jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]}else _wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(r),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7]);wppaNextOnCallback&&_wppaNextOnCallback(r)}},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))}}function _wppaOvlRateIt(r,n,i,c){0!=n&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+n+"&wppa-rating-id="+r+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+i+"-"+n).stop().fadeTo(100,1),jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,p,e){wppaConsoleLog(a,"force");var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");return jQuery("#wppa-like-0").attr("title",o[0]),jQuery("#wppa-liketext-0").html(o[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+r+"-"+i).attr("title",o[0]),jQuery("#wppa-liketext-"+r+"-"+i).html(o[1]),void("1"==t[3]?jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(i,t[4],".wppa-avg-"),_wppaSetRd(i,t[3],".wppa-rate-"),c)return;wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,p,e){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxMakeOrigName(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+p+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,p,e){var t=a.split("||");"0"==t[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=t[2]):"file"==wppaArtMonkyLink&&window.open(t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+t[1]+"\n\n"+t[2]))},error:function(a,p,e){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,p,e){var t=a.split("||"),o=t[0],r=t[1],n=t[2];3==t.length&&""!=n&&alert("Attention:\n\n"+n),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,p,e){alert("An error occurred:\n"+e+"\nPlease try again")},complete:function(a,p,e){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){if(_wppaValidateComment(t,a)){var p="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t;void 0!==jQuery("#wppa-comemail-"+t).val()&&(p+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(p+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(p+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(p+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,p,e){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){jQuery("#wppa-comment-spin-"+t).css("display","none")}})}}function wppaUpdatePhotoNew(a){for(var p=["name","description","tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],e="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<p.length;)void 0!==jQuery("#"+p[t]).val()&&(e+="&"+p[t]+"="+jQuery("#"+p[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:e,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,p,e){0<a.length&&alert(a)},error:function(a,p,e){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,o){if(wppaLastQrcodeUrl!=a){wppaLastQrcodeUrl=a;var p="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a);jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){var t=a.split("|");document.getElementById(o).src=t[0],jQuery(o).attr("title",t[1]),wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+o)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}})}}function wppaAjaxNotify(a,p){var e=jQuery(a).prop("checked")?"on":"off",t="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+p+"&onoff="+e;jQuery.ajax({url:wppaAjaxUrl,data:t,async:!0,type:"POST",timeout:1e4,success:function(a,p,e){alert(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxNotify failed. Error = "+e+", status = "+p,"force")}})}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
js/wppa-lightbox.js CHANGED
@@ -3,7 +3,7 @@
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaLightboxVersion = '7.3.00';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
@@ -239,6 +239,9 @@ wppaConsoleLog( 'wppaOvlShow arg=' + arg );
239
  if ( wppaOvlModeInitial != 'normal' ) {
240
  wppaOvlFull( true );
241
  }
 
 
 
242
  }
243
 
244
  // If arg = 'this', setup the array of data
@@ -971,7 +974,7 @@ wppaConsoleLog( 'wppaOvlSize' );
971
 
972
  // Are we still visible?
973
  if ( ! img || ! txt || jQuery('#wppa-overlay-bg').css('display') == 'none' ) {
974
- wppaConsoleLog( 'Lb quitted' );
975
  return;
976
  }
977
 
@@ -1418,6 +1421,12 @@ wppaConsoleLog( 'wppaOvlHide' );
1418
  document.onLbquitMocc = null;
1419
  document.onLbquitIdx = null;
1420
  }
 
 
 
 
 
 
1421
  }
1422
 
1423
  // Perform onclick action
@@ -1449,7 +1458,7 @@ wppaConsoleLog( 'wppaOvlOnClick' );
1449
 
1450
  // Initialize <a> tags with onclick and ontouchstart events to lightbox
1451
  function wppaInitOverlay() {
1452
- wppaConsoleLog( 'wppaInitOverlay' );
1453
 
1454
  // First find subtitles for non-wppa images
1455
  jQuery( '.wp-caption' ).each( function() {
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '7.3.01';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
239
  if ( wppaOvlModeInitial != 'normal' ) {
240
  wppaOvlFull( true );
241
  }
242
+
243
+ // Trigger lightbox open event
244
+ jQuery(window).trigger( 'wppalightboxstart' );
245
  }
246
 
247
  // If arg = 'this', setup the array of data
974
 
975
  // Are we still visible?
976
  if ( ! img || ! txt || jQuery('#wppa-overlay-bg').css('display') == 'none' ) {
977
+ // wppaConsoleLog( 'Lb quitted' );
978
  return;
979
  }
980
 
1421
  document.onLbquitMocc = null;
1422
  document.onLbquitIdx = null;
1423
  }
1424
+
1425
+ // Trigger lightbox open event
1426
+ jQuery(window).trigger( 'wppalightboxend' );
1427
+
1428
+ // Fake a window reize
1429
+ jQuery(window).trigger('resize');
1430
  }
1431
 
1432
  // Perform onclick action
1458
 
1459
  // Initialize <a> tags with onclick and ontouchstart events to lightbox
1460
  function wppaInitOverlay() {
1461
+ //wppaConsoleLog( 'wppaInitOverlay' );
1462
 
1463
  // First find subtitles for non-wppa images
1464
  jQuery( '.wp-caption' ).each( function() {
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.3.00",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;e=(a=null==p?event.keyCode:p.keyCode,27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){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(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&(!p&&"normal"!=a||(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){var a,e;if(wppaConsoleLog("wppaOvlShow arg="+p),0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1]){var o,l,i=t[1],n=jQuery("a"),r=0;for(l=0;l<n.length;l++)o=n[l],1<(t=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==i&&(wppaOvlUrls[r]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[r]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[r]=wppaRepairScriptTags(o.title),wppaOvlIds[r]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",wppaOvlAlts[r]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[r]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[r]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[r]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[r]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[r]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",0<(a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[r]=a.substr(e+1),wppaOvlPanoramaIds[r]=a.substr(0,e)):(wppaOvlPanoramaHtml[r]="",wppaOvlPanoramaIds[r]=0),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=r,wppaConsoleLog("Found "+r+": "+p.href)),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p],0<wppaOvlUrls[p].length&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete&&wppaOvlOpen))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",500);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&wppaOvlOpen&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<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';\" >",wppaOvlShowLegenda&&"normal"!=wppaOvlMode&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode=fullscreen. '+(wppaOvlIsSingle?wppaOvlFullLegendaSinglePanorama:wppaOvlFullLegendaPanorama)+"</div>")):(wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</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';\" >":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+"\" ></iframe><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';\" >":(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.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 );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<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';\" >"),wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>")),l+="</div>";var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;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,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>","normal"!=wppaOvlMode&&(l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<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"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( 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[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' 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 );" onclick="wppaOvlImgClick( event );" 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[p]+'" ></iframe>':(l+='<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 );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" 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[p]+'" />',wppaHasAudio&&(l+='<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 >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||wppaOvlIsPdf||(l+='<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;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(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);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<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;'+(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);" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+"</div>",l+='<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;'+(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);" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";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%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}function wppaOvlSize(p){if(wppaConsoleLog("wppaOvlSize"),!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,n,r,w,d=wppaWindowWidth(),v=wppaWindowHeight();l=wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(t=.9*wppaWindowWidth(),o=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t=a.clientWidth,o=a.naturalWidth,a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(i=(d-3*wppaOvlBorderWidth)/o)<(n=v/l)?i:n)<1&&(o=parseInt(o*r),l=parseInt(l*r));var s=jQuery("#wppa-overlay-txt").height();w="auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v-s-20-2*wppaOvlBorderWidth):v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop,parseInt((d-o)/2),h=o);var c=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,c=!(o=h=240)),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),c?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted")}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":r=o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":r=o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),wppaOvlIconSize,!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1,document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null)}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext())}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
1
+ var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.3.01",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;e=(a=null==p?event.keyCode:p.keyCode,27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){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(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&(!p&&"normal"!=a||(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){var a,e;if(wppaConsoleLog("wppaOvlShow arg="+p),0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0),jQuery(window).trigger("wppalightboxstart")),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1]){var o,l,i=t[1],n=jQuery("a"),r=0;for(l=0;l<n.length;l++)o=n[l],1<(t=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==i&&(wppaOvlUrls[r]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[r]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[r]=wppaRepairScriptTags(o.title),wppaOvlIds[r]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",wppaOvlAlts[r]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[r]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[r]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[r]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[r]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[r]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",0<(a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[r]=a.substr(e+1),wppaOvlPanoramaIds[r]=a.substr(0,e)):(wppaOvlPanoramaHtml[r]="",wppaOvlPanoramaIds[r]=0),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=r,wppaConsoleLog("Found "+r+": "+p.href)),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p],0<wppaOvlUrls[p].length&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete&&wppaOvlOpen))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",500);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&wppaOvlOpen&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<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';\" >",wppaOvlShowLegenda&&"normal"!=wppaOvlMode&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode=fullscreen. '+(wppaOvlIsSingle?wppaOvlFullLegendaSinglePanorama:wppaOvlFullLegendaPanorama)+"</div>")):(wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</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';\" >":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+"\" ></iframe><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';\" >":(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.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 );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<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';\" >"),wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>")),l+="</div>";var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;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,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>","normal"!=wppaOvlMode&&(l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<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"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( 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[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' 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 );" onclick="wppaOvlImgClick( event );" 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[p]+'" ></iframe>':(l+='<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 );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" 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[p]+'" />',wppaHasAudio&&(l+='<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 >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||wppaOvlIsPdf||(l+='<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;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(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);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<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;'+(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);" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+"</div>",l+='<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;'+(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);" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";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%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}function wppaOvlSize(p){if(wppaConsoleLog("wppaOvlSize"),!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,n,r,w,d=wppaWindowWidth(),v=wppaWindowHeight();l=wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(t=.9*wppaWindowWidth(),o=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t=a.clientWidth,o=a.naturalWidth,a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(i=(d-3*wppaOvlBorderWidth)/o)<(n=v/l)?i:n)<1&&(o=parseInt(o*r),l=parseInt(l*r));var s=jQuery("#wppa-overlay-txt").height();w="auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v-s-20-2*wppaOvlBorderWidth):v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop,parseInt((d-o)/2),h=o);var c=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,c=!(o=h=240)),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),c?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":r=o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":r=o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),wppaOvlIconSize,!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1,document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),jQuery(window).trigger("wppalightboxend"),jQuery(window).trigger("resize")}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext())}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
js/wppa-slideshow.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsSlideshowVersion = '7.3.00';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -343,7 +343,8 @@ function _wppaNextSlide( mocc, mode ) {
343
 
344
  if ( ! _wppaSSRuns[mocc] ) {
345
  _wppaCurIdx[mocc] = _wppaNxtIdx[mocc];
346
- _wppaAdjustFilmstrip( mocc );
 
347
  return;
348
  }
349
 
@@ -352,7 +353,7 @@ function _wppaNextSlide( mocc, mode ) {
352
  if ( _wppaCurIdx[mocc] == _wppaSlides[mocc].length ) _wppaCurIdx[mocc] = 0;
353
 
354
  // Adjust filmstrip
355
- _wppaAdjustFilmstrip( mocc );
356
  _wppaNxtIdx[mocc] = _wppaCurIdx[mocc];
357
 
358
  // Go for the next
@@ -645,55 +646,52 @@ function _wppaNextSlide_3( mocc ) {
645
 
646
  switch ( wppaAnimationType ) {
647
 
648
- case 'fadeover':
649
- jQuery( olImg ).fadeOut( wppaAnimationSpeed );
650
- jQuery( nwImg ).fadeIn( wppaAnimationSpeed, _wppaNextSlide_4( mocc ) );
651
- break;
652
-
653
  case 'fadeafter':
654
- jQuery( olImg ).fadeOut( wppaAnimationSpeed );
655
- jQuery( nwImg ).delay( wppaAnimationSpeed ).fadeIn( wppaAnimationSpeed, _wppaNextSlide_4( mocc ) );
 
656
  break;
657
 
658
  case 'swipe':
659
  switch ( dir ) {
660
  case 'left':
661
- jQuery( olSli ).animate( { marginLeft: - w + "px" }, wppaAnimationSpeed, "swing" );
662
  jQuery( nwSli ).css( { marginLeft: w + "px" });
663
- jQuery( nwImg ).fadeIn( 10 );
664
- jQuery( nwSli ).animate( { marginLeft: 0 + "px" }, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
665
  break;
666
  case 'right':
667
- jQuery( olSli ).animate( { marginLeft: w + "px" }, wppaAnimationSpeed, "swing" );
668
  jQuery( nwSli ).css( { marginLeft: - w + "px" });
669
- jQuery( nwImg ).fadeIn( 10 );
670
- jQuery( nwSli ).animate( { marginLeft: 0 + "px" }, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
671
  break;
672
  case 'none':
673
- jQuery( nwImg ).fadeIn( 10 );
674
  setTimeout( '_wppaNextSlide_4( ' + mocc + ' )', 10 );
675
  break;
676
  }
677
  break;
678
-
679
  case 'stackon':
680
  switch ( dir ) {
681
  case 'left':
682
  jQuery( olSli ).css( {zIndex:80});
683
  jQuery( nwSli ).css( {marginLeft:w+"px", zIndex:81});
684
- jQuery( nwImg ).fadeIn( 10 );
685
- jQuery( olImg ).delay( wppaAnimationSpeed ).fadeOut( 10 );
686
- jQuery( nwSli ).animate( {marginLeft:0+"px"}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
 
687
  break;
688
  case 'right':
689
  jQuery( olSli ).css( {zIndex:80});
690
  jQuery( nwSli ).css( {marginLeft:-w+"px", zIndex:81});
691
- jQuery( nwImg ).fadeIn( 10 );
692
- jQuery( olImg ).delay( wppaAnimationSpeed ).fadeOut( 10 );
693
- jQuery( nwSli ).animate( {marginLeft:0+"px"}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
694
  break;
695
  case 'none':
696
- jQuery( nwImg ).fadeIn( 10 );
697
  setTimeout( '_wppaNextSlide_4( '+mocc+' )', 10 );
698
  break;
699
  }
@@ -703,20 +701,20 @@ function _wppaNextSlide_3( mocc ) {
703
  switch ( dir ) {
704
  case 'left':
705
  jQuery( olSli ).css( {marginLeft:0, zIndex:81});
706
- jQuery( olSli ).animate( {marginLeft:-w+"px"}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
707
  jQuery( nwSli ).css( {marginLeft:0, zIndex:80});
708
- jQuery( nwImg ).fadeIn( 10 );
709
- jQuery( olImg ).delay( wppaAnimationSpeed ).fadeOut( 10 );
710
  break;
711
  case 'right':
712
  jQuery( olSli ).css( {marginLeft:0, zIndex:81});
713
- jQuery( olSli ).animate( {marginLeft:w+"px"}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
714
  jQuery( nwSli ).css( {marginLeft:0, zIndex:80});
715
- jQuery( nwImg ).fadeIn( 10 );
716
- jQuery( olImg ).delay( wppaAnimationSpeed ).fadeOut( 10 );
717
  break;
718
  case 'none':
719
- jQuery( nwImg ).fadeIn( 10 );
720
  setTimeout( '_wppaNextSlide_4( '+mocc+' )', 10 );
721
  break;
722
  }
@@ -727,34 +725,37 @@ function _wppaNextSlide_3( mocc ) {
727
  case 'left':
728
  /* there is a z-order problem here, if you can fix it, i would be glad
729
  jQuery( olSli ).css( {zIndex:81});
730
- jQuery( olSli ).animate( {width:0}, wppaAnimationSpeed, "swing" );
731
- jQuery( olImg ).animate( {marginLeft:0, width:0, paddingLeft:0, paddingRight:0}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
732
  jQuery( nwSli ).css( {width:w, zIndex:80});
733
- jQuery( nwImg ).fadeIn( 10 );
734
  jQuery( olImg ).fadeOut( 10 );
735
  break;
736
- */
737
  case 'right':
738
  var nwImgWid = parseInt( jQuery( nwSli ).css( 'width' ) );
739
  var nwMarLft = parseInt( jQuery( nwImg ).css( 'marginLeft' ) );
740
  jQuery( olSli ).css( {zIndex:80});
741
  jQuery( nwSli ).css( {zIndex:81, width:0});
742
  jQuery( nwImg ).css( {maxWidth:0, marginLeft:0});
743
- jQuery( nwImg ).fadeIn( 10 );
744
- jQuery( nwSli ).animate( {width:w}, wppaAnimationSpeed, "swing" );
745
- jQuery( nwImg ).animate( {maxWidth:nwImgWid, marginLeft:nwMarLft}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
746
- jQuery( olImg ).delay( wppaAnimationSpeed ).fadeOut( 10 );
747
  break;
748
 
749
  case 'none':
750
- jQuery( nwImg ).fadeIn( 10 );
751
  setTimeout( '_wppaNextSlide_4( '+mocc+' )', 10 );
752
  break;
753
  }
754
  break;
755
-
756
  default:
757
- alert( 'Animation type '+wppaAnimationType+' is not supported in this version' );
 
 
 
758
  }
759
  }
760
 
@@ -1279,36 +1280,57 @@ function wppaMakeTheSlideHtml( mocc, bgfg, idx ) {
1279
  }
1280
 
1281
  // Adjust the filmstrip
1282
- function _wppaAdjustFilmstrip( mocc ) {
1283
-
1284
  if ( ! document.getElementById( 'wppa-filmstrip-'+mocc ) ) return; // No filmstrip this mocc
1285
 
 
 
1286
  // Remove class from active thumb
1287
- jQuery( '.wppa-film-'+mocc ).removeClass( 'wppa-filmthumb-active' );
 
 
1288
 
1289
- if ( ! _wppaFilmNoMove[mocc] ) {
1290
- var xoffset;
1291
- xoffset = wppaFilmStripLength[mocc] / 2 - ( _wppaCurIdx[mocc] + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1292
- if ( wppaFilmShowGlue ) xoffset -= ( wppaFilmStripMargin[mocc] * 2 + 2 ); // Glue
1293
 
1294
- // If going to the first (0) and running and the last was top: jump to -1 and animate to 0. No glue correction, we are before the seam.
1295
- if ( ( ! wppaFilmInit[mocc] ) || ( typeof( _wppaLastIdx[mocc] ) == 'undefined' ) || ( _wppaCurIdx[mocc] == 0 && _wppaSSRuns[mocc] && _wppaLastIdx[mocc] == ( _wppaSlides[mocc].length -1 ) ) ) {
1296
 
1297
- var loc_1 = wppaFilmStripLength[mocc] / 2 - ( -1 + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1298
- jQuery( '#wppa-filmstrip-'+mocc ).stop().css( {marginLeft: loc_1+'px'} );
1299
- _wppaLastIdx[mocc] = _wppaCurIdx[mocc];
1300
- wppaFilmInit[mocc] = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1301
  }
1302
- jQuery( '#wppa-filmstrip-'+mocc ).stop().animate( {marginLeft: xoffset+'px'}, wppaAnimationSpeed );
1303
 
1304
- /* end new */
1305
  }
 
 
1306
  else {
1307
  _wppaFilmNoMove[mocc] = false; // reset
1308
  }
 
1309
 
1310
- // make them visible...
1311
- if ( _wppaCurIdx[mocc] != -1 ) {
 
 
 
1312
  var from = _wppaCurIdx[mocc] - 10; if ( from < 0 ) from = 0;
1313
  var to = _wppaCurIdx[mocc] + 10; if ( to > _wppaSlides[mocc].length ) to = _wppaSlides[mocc].length;
1314
  var index = 0;
@@ -1319,7 +1341,7 @@ function _wppaAdjustFilmstrip( mocc ) {
1319
  if ( html ) {
1320
 
1321
  // Make lazy filmthumbs visible
1322
- wppaMakeLazyVisible();
1323
  // jQuery( window ).trigger( 'scroll' );
1324
 
1325
  // Fit title in
@@ -1341,7 +1363,9 @@ function _wppaAdjustFilmstrip( mocc ) {
1341
  }
1342
 
1343
  // Apply class to active filmthumb
1344
- jQuery( '#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc ).addClass( 'wppa-filmthumb-active' );
 
 
1345
  }
1346
 
1347
 
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '7.3.01';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
343
 
344
  if ( ! _wppaSSRuns[mocc] ) {
345
  _wppaCurIdx[mocc] = _wppaNxtIdx[mocc];
346
+ wppaFilmInit[mocc] = false;
347
+ _wppaAdjustFilmstrip( mocc, 'linear' );
348
  return;
349
  }
350
 
353
  if ( _wppaCurIdx[mocc] == _wppaSlides[mocc].length ) _wppaCurIdx[mocc] = 0;
354
 
355
  // Adjust filmstrip
356
+ _wppaAdjustFilmstrip( mocc, 'linear' );
357
  _wppaNxtIdx[mocc] = _wppaCurIdx[mocc];
358
 
359
  // Go for the next
646
 
647
  switch ( wppaAnimationType ) {
648
 
 
 
 
 
 
649
  case 'fadeafter':
650
+ wppaFadeOut( olImg, wppaAnimationSpeed );
651
+ setTimeout( wppaFadeIn( nwImg, wppaAnimationSpeed, _wppaNextSlide_4( mocc ) ), wppaAnimationSpeed );
652
+ // jQuery( nwImg ).delay( wppaAnimationSpeed ).fadeIn( wppaAnimationSpeed, _wppaNextSlide_4( mocc ) );
653
  break;
654
 
655
  case 'swipe':
656
  switch ( dir ) {
657
  case 'left':
658
+ wppaAnimate( olSli, { marginLeft: - w + "px" }, wppaAnimationSpeed, "swing" );
659
  jQuery( nwSli ).css( { marginLeft: w + "px" });
660
+ wppaFadeIn( nwImg, 10 );
661
+ wppaAnimate( nwSli, { marginLeft: 0 + "px" }, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
662
  break;
663
  case 'right':
664
+ jQuery( olSli ).wppaAnimate( { marginLeft: w + "px" }, wppaAnimationSpeed, "swing" );
665
  jQuery( nwSli ).css( { marginLeft: - w + "px" });
666
+ wppaFadeIn( nwImg, 10 );
667
+ jQuery( nwSli ).wppaAnimate( { marginLeft: 0 + "px" }, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
668
  break;
669
  case 'none':
670
+ wppaFadeIn( nwImg, 10 );
671
  setTimeout( '_wppaNextSlide_4( ' + mocc + ' )', 10 );
672
  break;
673
  }
674
  break;
675
+ /*
676
  case 'stackon':
677
  switch ( dir ) {
678
  case 'left':
679
  jQuery( olSli ).css( {zIndex:80});
680
  jQuery( nwSli ).css( {marginLeft:w+"px", zIndex:81});
681
+ wppaFadeIn( nwImg, 10 );
682
+ setTimeout( wppaFadeOut( olImg, 10 ), wppaAnimationSpeed );
683
+ // setTimeout( wppaFadeOut( olImg, 10 ), wppaAnimationSpeed );
684
+ wppaAnimate( nwSli, {marginLeft:0+"px"}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
685
  break;
686
  case 'right':
687
  jQuery( olSli ).css( {zIndex:80});
688
  jQuery( nwSli ).css( {marginLeft:-w+"px", zIndex:81});
689
+ wppaFadeIn( nwImg, 10 );
690
+ setTimeout( wppaFadeOut( olImg, 10 ), wppaAnimationSpeed );
691
+ wppaAnimate( nwSli, {marginLeft:0+"px"}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
692
  break;
693
  case 'none':
694
+ wppaFadeIn( nwImg, 10 );
695
  setTimeout( '_wppaNextSlide_4( '+mocc+' )', 10 );
696
  break;
697
  }
701
  switch ( dir ) {
702
  case 'left':
703
  jQuery( olSli ).css( {marginLeft:0, zIndex:81});
704
+ wppaAnimate( olSli, {marginLeft:-w+"px"}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
705
  jQuery( nwSli ).css( {marginLeft:0, zIndex:80});
706
+ wppaFadeIn( nwImg, 10 );
707
+ setTimeout( wppaFadeOut( olImg, 10 ), wppaAnimationSpeed );
708
  break;
709
  case 'right':
710
  jQuery( olSli ).css( {marginLeft:0, zIndex:81});
711
+ wppaAnimate( olSli, {marginLeft:w+"px"}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
712
  jQuery( nwSli ).css( {marginLeft:0, zIndex:80});
713
+ wppaFadeIn( nwImg, 10 );
714
+ setTimeout( wppaFadeOut( olImg, 10 ), wppaAnimationSpeed );
715
  break;
716
  case 'none':
717
+ wppaFadeIn( nwImg, 10 );
718
  setTimeout( '_wppaNextSlide_4( '+mocc+' )', 10 );
719
  break;
720
  }
725
  case 'left':
726
  /* there is a z-order problem here, if you can fix it, i would be glad
727
  jQuery( olSli ).css( {zIndex:81});
728
+ jQuery( olSli ).wppaAnimate( {width:0}, wppaAnimationSpeed, "swing" );
729
+ jQuery( olImg ).wppaAnimate( {marginLeft:0, width:0, paddingLeft:0, paddingRight:0}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
730
  jQuery( nwSli ).css( {width:w, zIndex:80});
731
+ wppaFadeIn( nwImg, 10 );
732
  jQuery( olImg ).fadeOut( 10 );
733
  break;
734
+ *//*
735
  case 'right':
736
  var nwImgWid = parseInt( jQuery( nwSli ).css( 'width' ) );
737
  var nwMarLft = parseInt( jQuery( nwImg ).css( 'marginLeft' ) );
738
  jQuery( olSli ).css( {zIndex:80});
739
  jQuery( nwSli ).css( {zIndex:81, width:0});
740
  jQuery( nwImg ).css( {maxWidth:0, marginLeft:0});
741
+ wppaFadeIn( nwImg, 10 );
742
+ wppaAnimate( nwsli, {width:w}, wppaAnimationSpeed, "swing" );
743
+ wppaAnimate( nwImg, {maxWidth:nwImgWid, marginLeft:nwMarLft}, wppaAnimationSpeed, "swing", _wppaNextSlide_4( mocc ) );
744
+ setTimeout( wppaFadeOut( olImg, 10 ), wppaAnimationSpeed );
745
  break;
746
 
747
  case 'none':
748
+ wppaFadeIn( nwImg, 10 );
749
  setTimeout( '_wppaNextSlide_4( '+mocc+' )', 10 );
750
  break;
751
  }
752
  break;
753
+ */
754
  default:
755
+ // case 'fadeover':
756
+ wppaFadeOut( olImg, wppaAnimationSpeed );
757
+ wppaFadeIn( nwImg, wppaAnimationSpeed, _wppaNextSlide_4( mocc ) );
758
+ break;
759
  }
760
  }
761
 
1280
  }
1281
 
1282
  // Adjust the filmstrip
1283
+ function _wppaAdjustFilmstrip( mocc, easing ) {
1284
+ // wppaConsoleLog('Adjust called with mocc = '+mocc+' init= '+(wppaFilmInit[mocc]?'true':'false'));
1285
  if ( ! document.getElementById( 'wppa-filmstrip-'+mocc ) ) return; // No filmstrip this mocc
1286
 
1287
+ var isFilmOnly = ! document.getElementById( 'slide_frame-'+mocc );
1288
+
1289
  // Remove class from active thumb
1290
+ if ( ! isFilmOnly ) {
1291
+ jQuery( '.wppa-film-'+mocc ).removeClass( 'wppa-filmthumb-active' );
1292
+ }
1293
 
1294
+ // wppaConsoleLog( 'Going film to '+_wppaCurIdx[mocc] );
 
 
 
1295
 
1296
+ if ( ! _wppaFilmNoMove[mocc] || ! wppaFilmInit[mocc] ) {
 
1297
 
1298
+ var loc = wppaFilmStripLength[mocc] / 2 - ( _wppaCurIdx[mocc] + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1299
+ if ( wppaFilmShowGlue ) loc -= ( wppaFilmStripMargin[mocc] * 2 + 2 ); // Glue
1300
+ var loc_0 = wppaFilmStripLength[mocc] / 2 - ( 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1301
+ var loc_1 = wppaFilmStripLength[mocc] / 2 - ( -1 + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1302
+
1303
+ // If filmstrip not inited, jump to desired location.
1304
+ if ( ! wppaFilmInit[mocc] ) {
1305
+ // wppaConsoleLog('Film Jump', 'force');
1306
+ jQuery( '#wppa-filmstrip-'+mocc ).css( {marginLeft: loc+'px' } );
1307
+ }
1308
+
1309
+ // if running from last to first, jump to -1 and animate to 0
1310
+ else if ( _wppaCurIdx[mocc] == 0 && _wppaSSRuns[mocc] && _wppaLastIdx[mocc] == ( _wppaSlides[mocc].length -1 ) ) {
1311
+ jQuery( '#wppa-filmstrip-'+mocc ).css( {marginLeft: loc_1+'px'} );
1312
+ wppaAnimate( '#wppa-filmstrip-'+mocc, {marginLeft: loc_0+'px'}, wppaAnimationSpeed, easing );
1313
+ }
1314
+
1315
+ // Default, animate to desired location
1316
+ else {
1317
+ wppaAnimate( '#wppa-filmstrip-'+mocc, {marginLeft: loc+'px'}, wppaAnimationSpeed, easing );
1318
  }
 
1319
 
1320
+ _wppaLastIdx[mocc] = _wppaCurIdx[mocc];
1321
  }
1322
+ //
1323
+ //
1324
  else {
1325
  _wppaFilmNoMove[mocc] = false; // reset
1326
  }
1327
+ //
1328
 
1329
+ // Make lazy filmthumbs visible
1330
+ wppaMakeLazyVisible(mocc);
1331
+
1332
+ // Fix titles
1333
+ if ( ! isFilmOnly && _wppaCurIdx[mocc] != -1 ) {
1334
  var from = _wppaCurIdx[mocc] - 10; if ( from < 0 ) from = 0;
1335
  var to = _wppaCurIdx[mocc] + 10; if ( to > _wppaSlides[mocc].length ) to = _wppaSlides[mocc].length;
1336
  var index = 0;
1341
  if ( html ) {
1342
 
1343
  // Make lazy filmthumbs visible
1344
+ // wppaMakeLazyVisible(mocc);
1345
  // jQuery( window ).trigger( 'scroll' );
1346
 
1347
  // Fit title in
1363
  }
1364
 
1365
  // Apply class to active filmthumb
1366
+ if ( ! isFilmOnly ) {
1367
+ jQuery( '#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc ).addClass( 'wppa-filmthumb-active' );
1368
+ }
1369
  }
1370
 
1371
 
js/wppa-slideshow.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsSlideshowVersion="7.3.00";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,s,l,d,u,_,m,y,c,h,S,x,f,g,I,j,Q,b,v,N,T,C,k){var R,L;(n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==h?_wppaTimeOut[p]="random":0<parseInt(h)?_wppaTimeOut[p]=parseInt(h):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[]),R="default",""!=m?R="pointer":""!=wppaLightBox[p]&&(R="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=v,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+C+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<k.length&&(_wppaSlides[p][a]+=' poster="'+k+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+C+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a])?(L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none;" '+L+">"+v+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none; vertical-align:middle;">';_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=Q,_wppaId[p][a]=s,_wppaAvg[p][a]=l,_wppaDisc[p][a]=d,_wppaMyr[p][a]=u,_wppaVRU[p][a]=_,_wppaLinkUrl[p][a]=m,_wppaLinkTitle[p][a]=y,""!=c?_wppaLinkTarget[p][a]=c:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=S,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(g),_wppaShareUrl[p][a]=I,_wppaShareHtml[p][a]=wppaRepairScriptTags(j),_wppaHiresUrl[p][a]=b,_wppaVideoHtml[p][a]=v,_wppaAudioHtml[p][a]=N,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=T,_wppaImageAlt[p][a]=C}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){_wppaSSRuns[p]?_wppaGotoRunning(p,a):_wppaGoto(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],void _wppaAdjustFilmstrip(p));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var e=_wppaFg[p],t=1-e;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if(wppaStopVideo(p),wppaStopAudio(p),"auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+e+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]&&_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]],_wppaLon[p][_wppaId[p][_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var i,w,r=_wppaSlides[p].length-1,o=_wppaNxtIdx[p],n=(wppaNumbarMax-1)/2;o<n?(i=0,w=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-n<o?(i=(w=r)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(w=o+n+.5-1,(i=o-n+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-1<w?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var s=0;s<_wppaSlides[p].length;)0!=s&&s!=r&&(s<i||w<s)?jQuery("#wppa-numbar-"+p+"-"+s).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+s).css({display:"block"}),s++}if(_wppaFirst[p]){if(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType){var l=wppaIconSize(p,"1.5em",!1);jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",l,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",l,!1,!0))}else wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;"));wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))}else wppaMakeTheSlideHtml(p,t,_wppaNxtIdx[p]);_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);if(t&&1==t.nodeType&&"IMG"==t.nodeName&&!t.complete)return setTimeout("_wppaNextSlide_2( "+p+" )",200),void wppaConsoleLog("Retry next2");wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],e=1-(a=_wppaFg[p]),setTimeout("_wppaNextSlide_3( "+p+" )",10)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,s=parseInt(jQuery(w).css("width")),l="nil";switch(t==i&&(l="none"),t==i-1&&(l="left"),t==i+1&&(l="right"),t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(l="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(l="right"),"nil"==l&&(l=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:s}),jQuery(r).css({marginLeft:0,width:s}),wppaFormatSlide(p),wppaAnimationType){case"fadeover":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"fadeafter":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).delay(wppaAnimationSpeed).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"swipe":switch(l){case"left":jQuery(w).animate({marginLeft:-s+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:s+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).animate({marginLeft:s+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-s+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackon":switch(l){case"left":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:s+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:-s+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackoff":switch(l){case"left":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:-s+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"right":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:s+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"turnover":switch(l){case"left":case"right":var d=parseInt(jQuery(r).css("width")),u=parseInt(jQuery(n).css("marginLeft"));jQuery(w).css({zIndex:80}),jQuery(r).css({zIndex:81,width:0}),jQuery(n).css({maxWidth:0,marginLeft:0}),jQuery(n).fadeIn(10),jQuery(r).animate({width:s},wppaAnimationSpeed,"swing"),jQuery(n).animate({maxWidth:d,marginLeft:u},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:alert("Animation type "+wppaAnimationType+" is not supported in this version")}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){if(!_wppaToTheSame){var a=_wppaDsc[p][_wppaCurIdx[p]];if(jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty){var e=_wppaDsc[p][_wppaCurIdx[p]];""==e||"&nbsp;"==e?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")}jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])}if(_wppaToTheSame=!1,_wppaSSRuns[p]&&!wppaSlideWrap[p]&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var t=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,t)}if(wppaUpdateLightboxes(),!wppaIsMini[p]){var i=_wppaShareUrl[p][_wppaCurIdx[p]];"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)}if(_wppaSSRuns[p]&&setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)),jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),wppaSlideAudioStart){var w=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p);if(0<w.length){var r=w[w.length-1];r&&(wppaAudioPlaying[p]||r.play())}}wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var s=wppaAspectRatio[p],l=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var y,c,h,S,x,f,g,I,j=wppaStretch;if(u)y=w-d,S=h=0,g=x=w,I=f=(c=parseInt(y*n/o))+d,jQuery("#"+i).css({width:g,height:I}),jQuery("#"+t).css({width:x,height:f}),jQuery("#"+a).css({width:y,height:c});else{if(l<(g=w)&&(g=l),x=g,f=I=parseInt(g*s),j||g-d<=o||I-d<=n?s<(n+d)/(o+d)?(c=I-d,y=parseInt(c*o/n)):(y=g-d,c=parseInt(y*n/o)):(y=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((I-(c+d))/2);break;case"bottom":S=I-(c+d);break;case"fit":S=0,f=I=c+d}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+i).css({width:g,height:I}),jQuery("#"+t).css({width:x,height:f}),jQuery("#"+a).css({width:y,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":h=0;break;case"center":h=parseInt((w-g)/2);break;case"right":h=w-g}h<0&&(h=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:h})}var Q=jQuery(r).height(),b=(g-y)/2;Q&&0<Q&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:y,left:b}))}var v,N=parseInt(g/3),T=2*N;v=0<r.length?I-wppaAudioHeight-wppaSlideBorderWidth-S:I,jQuery("#bbb-"+p+"-l").css({height:v,width:N,left:0}),jQuery("#bbb-"+p+"-r").css({height:v,width:N,left:T})}}function wppaMakeNameHtml(p){var a="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])a=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":if(wppaArtMonkeyButton)if(_wppaFullNames[p][_wppaCurIdx[p]]){var e=_wppaFullNames[p][_wppaCurIdx[p]].split("<img");a='<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e[0]+'" />',e[1]&&(a+="<img"+e[1])}else a="";else a='<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":a=_wppaFullNames[p][_wppaCurIdx[p]];break;default:a=""}return wppaRepairBrTags(a)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,s=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+s+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var l="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),l+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),l+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+s+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),l+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=l}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function _wppaAdjustFilmstrip(p){if(document.getElementById("wppa-filmstrip-"+p)){if(jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p])_wppaFilmNoMove[p]=!1;else{var a;if(a=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(a-=2*wppaFilmStripMargin[p]+2),!wppaFilmInit[p]||void 0===_wppaLastIdx[p]||0==_wppaCurIdx[p]&&_wppaSSRuns[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1){var e=wppaFilmStripLength[p]/2-(-.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p];jQuery("#wppa-filmstrip-"+p).stop().css({marginLeft:e+"px"}),_wppaLastIdx[p]=_wppaCurIdx[p],wppaFilmInit[p]=!0}jQuery("#wppa-filmstrip-"+p).stop().animate({marginLeft:a+"px"},wppaAnimationSpeed)}if(-1!=_wppaCurIdx[p]){var t=_wppaCurIdx[p]-10;t<0&&(t=0);var i=_wppaCurIdx[p]+10;i>_wppaSlides[p].length&&(i=_wppaSlides[p].length);for(var w=0;w<_wppaSlides[p].length;){jQuery("#film_wppatnf_"+_wppaId[p][w]+"_"+p).html()&&(wppaMakeLazyVisible(),""!=jQuery("#wppa-film-"+w+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+w+"-"+p).attr("title",jQuery("#wppa-film-"+w+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+w+"-"+p).attr("title",jQuery("#wppa-film-"+w+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==w?(jQuery("#wppa-film-"+w+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+w+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+w+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][w]),jQuery("#wppa-pre-"+w+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][w]))),w++}}jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0),_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0&&(_wppaNxtIdx[p]=_wppaSlides[p].length-1),_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(wppaConsoleLog("GotoRunning "+p),_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){"icons"==wppaSlideshowNavigationType?_wppaStartIcons(p,a):_wppaStartText(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){"icons"==wppaSlideshowNavigationType?_wppaStopIcons(p):_wppaStopText(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e,t;document.getElementById("wppa-filmstrip-"+p)&&((a=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=a&&(e=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(e+=2+2*wppaFilmStripMargin[p]),t=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?t-=e:t+=e,jQuery("#wppa-filmstrip-"+p).css("margin-left",t+"px")))}function _wppaSetRatingDisplay(p){var a,e,t,w,r;if(document.getElementById("wppa-rating-"+p)&&void 0!==(a=_wppaAvg[p][_wppaCurIdx[p]])){if("likes"==wppaRatingDisplayType){"void"==(r=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var o=a.split("|");return jQuery("#wppa-like-"+p).attr("title",o[0]),jQuery("#wppa-liketext-"+p).html(o[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(a=(e=a.split("|"))[0],t=e[1],w=_wppaDisc[p][_wppaCurIdx[p]],r=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,a,"#wppa-avg-"),_wppaSetRd(p,r,"#wppa-rate-"),0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",w));else{if(jQuery("#wppa-numrate-avg-"+p).html(a+" ( "+t+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==r)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<r)jQuery("#wppa-numrate-mine-"+p).html(r);else if(r<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)r==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(r>i-1&&r<i&&(n+="&nbsp;( "+r+" )&nbsp;"),n+='<span style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+"&nbsp;</span>");jQuery("#wppa-numrate-mine-"+p).html(n)}0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(w+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==r?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(t)}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":var i;if("l"==a&&(i=_wppaCurIdx[p]-1)<0){if(!wppaSlideWrap[p])return;i=_wppaSlides[p].length-1}if("r"==a&&(i=_wppaCurIdx[p]+1)==_wppaSlides[p].length){if(!wppaSlideWrap[p])return;i=0}wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),wppaGotoKeepState(p,i);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden"))}function wppaGetSlideshowTimeout(p){var a;if("random"==_wppaTimeOut[p]){var e=2*wppaAnimationSpeed,t=7*wppaAnimationSpeed;a=Math.floor(Math.random()*(t-e+1))+e}else a=_wppaTimeOut[p];return a}wppaConsoleLog("wppa-slideshow.js version "+wppaJsSlideshowVersion+" loaded.","force");
1
+ var wppaJsSlideshowVersion="7.3.01";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,h,y,S,x,g,f,I,j,Q,b,v,N,T,C,k){var R,F;(n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==y?_wppaTimeOut[p]="random":0<parseInt(y)?_wppaTimeOut[p]=parseInt(y):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[]),R="default",""!=m?R="pointer":""!=wppaLightBox[p]&&(R="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=v,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+C+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<k.length&&(_wppaSlides[p][a]+=' poster="'+k+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+C+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a])?(F="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none;" '+F+">"+v+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none; vertical-align:middle;">';_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=Q,_wppaId[p][a]=l,_wppaAvg[p][a]=s,_wppaDisc[p][a]=d,_wppaMyr[p][a]=u,_wppaVRU[p][a]=_,_wppaLinkUrl[p][a]=m,_wppaLinkTitle[p][a]=c,""!=h?_wppaLinkTarget[p][a]=h:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=S,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=g,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(f),_wppaShareUrl[p][a]=I,_wppaShareHtml[p][a]=wppaRepairScriptTags(j),_wppaHiresUrl[p][a]=b,_wppaVideoHtml[p][a]=v,_wppaAudioHtml[p][a]=N,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=T,_wppaImageAlt[p][a]=C}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){_wppaSSRuns[p]?_wppaGotoRunning(p,a):_wppaGoto(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var e=_wppaFg[p],t=1-e;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if(wppaStopVideo(p),wppaStopAudio(p),"auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+e+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]&&_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]],_wppaLon[p][_wppaId[p][_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var i,w,r=_wppaSlides[p].length-1,o=_wppaNxtIdx[p],n=(wppaNumbarMax-1)/2;o<n?(i=0,w=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-n<o?(i=(w=r)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(w=o+n+.5-1,(i=o-n+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-1<w?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var l=0;l<_wppaSlides[p].length;)0!=l&&l!=r&&(l<i||w<l)?jQuery("#wppa-numbar-"+p+"-"+l).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+l).css({display:"block"}),l++}if(_wppaFirst[p]){if(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType){var s=wppaIconSize(p,"1.5em",!1);jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",s,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",s,!1,!0))}else wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;"));wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))}else wppaMakeTheSlideHtml(p,t,_wppaNxtIdx[p]);_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);if(t&&1==t.nodeType&&"IMG"==t.nodeName&&!t.complete)return setTimeout("_wppaNextSlide_2( "+p+" )",200),void wppaConsoleLog("Retry next2");wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],e=1-(a=_wppaFg[p]),setTimeout("_wppaNextSlide_3( "+p+" )",10)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,l=parseInt(jQuery(w).css("width")),s="nil";switch(t==i&&(s="none"),t==i-1&&(s="left"),t==i+1&&(s="right"),t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),setTimeout(wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).wppaAnimate({marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),wppaFadeIn(n,10),jQuery(r).wppaAnimate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":wppaFadeIn(n,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p))}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){if(!_wppaToTheSame){var a=_wppaDsc[p][_wppaCurIdx[p]];if(jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty){var e=_wppaDsc[p][_wppaCurIdx[p]];""==e||"&nbsp;"==e?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")}jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]]),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])}if(_wppaToTheSame=!1,_wppaSSRuns[p]&&!wppaSlideWrap[p]&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var t=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,t)}if(wppaUpdateLightboxes(),!wppaIsMini[p]){var i=_wppaShareUrl[p][_wppaCurIdx[p]];"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)}if(_wppaSSRuns[p]&&setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)),jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),wppaSlideAudioStart){var w=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p);if(0<w.length){var r=w[w.length-1];r&&(wppaAudioPlaying[p]||r.play())}}wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,h,y,S,x,g,f,I,j=wppaStretch;if(u)c=w-d,S=y=0,f=x=w,I=g=(h=parseInt(c*n/o))+d,jQuery("#"+i).css({width:f,height:I}),jQuery("#"+t).css({width:x,height:g}),jQuery("#"+a).css({width:c,height:h});else{if(s<(f=w)&&(f=s),x=f,g=I=parseInt(f*l),j||f-d<=o||I-d<=n?l<(n+d)/(o+d)?(h=I-d,c=parseInt(h*o/n)):(c=f-d,h=parseInt(c*n/o)):(c=o,h=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((I-(h+d))/2);break;case"bottom":S=I-(h+d);break;case"fit":S=0,g=I=h+d}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+i).css({width:f,height:I}),jQuery("#"+t).css({width:x,height:g}),jQuery("#"+a).css({width:c,height:h}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":y=0;break;case"center":y=parseInt((w-f)/2);break;case"right":y=w-f}y<0&&(y=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:y})}var Q=jQuery(r).height(),b=(f-c)/2;Q&&0<Q&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:c,left:b}))}var v,N=parseInt(f/3),T=2*N;v=0<r.length?I-wppaAudioHeight-wppaSlideBorderWidth-S:I,jQuery("#bbb-"+p+"-l").css({height:v,width:N,left:0}),jQuery("#bbb-"+p+"-r").css({height:v,width:N,left:T})}}function wppaMakeNameHtml(p){var a="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])a=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":if(wppaArtMonkeyButton)if(_wppaFullNames[p][_wppaCurIdx[p]]){var e=_wppaFullNames[p][_wppaCurIdx[p]].split("<img");a='<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e[0]+'" />',e[1]&&(a+="<img"+e[1])}else a="";else a='<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":a=_wppaFullNames[p][_wppaCurIdx[p]];break;default:a=""}return wppaRepairBrTags(a)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,l=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+l+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var s="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),s+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+l+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=s}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function _wppaAdjustFilmstrip(p,a){if(document.getElementById("wppa-filmstrip-"+p)){var e=!document.getElementById("slide_frame-"+p);if(e||jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p]&&wppaFilmInit[p])_wppaFilmNoMove[p]=!1;else{var t=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p];wppaFilmShowGlue&&(t-=2*wppaFilmStripMargin[p]+2);var i=wppaFilmStripLength[p]/2-(.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],w=wppaFilmStripLength[p]/2-(-.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p];wppaFilmInit[p]?0==_wppaCurIdx[p]&&_wppaSSRuns[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:w+"px"}),wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:i+"px"},wppaAnimationSpeed,a)):wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:t+"px"},wppaAnimationSpeed,a):jQuery("#wppa-filmstrip-"+p).css({marginLeft:t+"px"}),_wppaLastIdx[p]=_wppaCurIdx[p]}if(wppaMakeLazyVisible(p),!e&&-1!=_wppaCurIdx[p]){var r=_wppaCurIdx[p]-10;r<0&&(r=0);var o=_wppaCurIdx[p]+10;o>_wppaSlides[p].length&&(o=_wppaSlides[p].length);for(var n=0;n<_wppaSlides[p].length;){jQuery("#film_wppatnf_"+_wppaId[p][n]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+n+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==n?(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]))),n++}}e||jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0),_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0&&(_wppaNxtIdx[p]=_wppaSlides[p].length-1),_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(wppaConsoleLog("GotoRunning "+p),_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){"icons"==wppaSlideshowNavigationType?_wppaStartIcons(p,a):_wppaStartText(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){"icons"==wppaSlideshowNavigationType?_wppaStopIcons(p):_wppaStopText(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e,t;document.getElementById("wppa-filmstrip-"+p)&&((a=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=a&&(e=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(e+=2+2*wppaFilmStripMargin[p]),t=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?t-=e:t+=e,jQuery("#wppa-filmstrip-"+p).css("margin-left",t+"px")))}function _wppaSetRatingDisplay(p){var a,e,t,w,r;if(document.getElementById("wppa-rating-"+p)&&void 0!==(a=_wppaAvg[p][_wppaCurIdx[p]])){if("likes"==wppaRatingDisplayType){"void"==(r=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var o=a.split("|");return jQuery("#wppa-like-"+p).attr("title",o[0]),jQuery("#wppa-liketext-"+p).html(o[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(a=(e=a.split("|"))[0],t=e[1],w=_wppaDisc[p][_wppaCurIdx[p]],r=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,a,"#wppa-avg-"),_wppaSetRd(p,r,"#wppa-rate-"),0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",w));else{if(jQuery("#wppa-numrate-avg-"+p).html(a+" ( "+t+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==r)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<r)jQuery("#wppa-numrate-mine-"+p).html(r);else if(r<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)r==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(r>i-1&&r<i&&(n+="&nbsp;( "+r+" )&nbsp;"),n+='<span style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+"&nbsp;</span>");jQuery("#wppa-numrate-mine-"+p).html(n)}0==r?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(w+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==r?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(t)}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":var i;if("l"==a&&(i=_wppaCurIdx[p]-1)<0){if(!wppaSlideWrap[p])return;i=_wppaSlides[p].length-1}if("r"==a&&(i=_wppaCurIdx[p]+1)==_wppaSlides[p].length){if(!wppaSlideWrap[p])return;i=0}wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),wppaGotoKeepState(p,i);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden"))}function wppaGetSlideshowTimeout(p){var a;if("random"==_wppaTimeOut[p]){var e=2*wppaAnimationSpeed,t=7*wppaAnimationSpeed;a=Math.floor(Math.random()*(t-e+1))+e}else a=_wppaTimeOut[p];return a}wppaConsoleLog("wppa-slideshow.js version "+wppaJsSlideshowVersion+" loaded.","force");
js/wppa-utils.js CHANGED
@@ -2,9 +2,57 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsUtilsVersion = '7.3.00';
6
  var wppaDebug;
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  // Trim
9
  // @1 string to be trimmed
10
  // @2 character, string, or array of characters or strings to trim off,
@@ -332,31 +380,81 @@ function wppaSvgHtml( image, height, isLightbox, border, none, light, medium, he
332
 
333
  var wppaLastLazy = 0;
334
  // Make lazy load images visible
335
- function wppaMakeLazyVisible() {
 
 
 
 
 
 
 
 
336
 
337
- // Only do this if the previous time was more than 200 ms ago
338
  var d = new Date();
339
  var t0 = d.getTime();
340
- if ( t0 < ( wppaLastLazy + 200 ) ) {
341
  // wppaConsoleLog( 'MakeLazyVisible() skipped', 'force' );
342
  return;
343
  }
344
 
345
  var src;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
 
347
- jQuery( '.wppa-lazy' ).each( function() {
348
- src = jQuery( this ).attr( 'data-src' );
349
- if ( ! wppaLazyLoad || wppaIsElementInViewport( this ) ) {
350
- jQuery( this ).attr( 'src', src );
351
- jQuery( this ).removeAttr( 'data-src' );
352
- jQuery( this ).removeClass( 'wppa-lazy' );
 
 
 
 
 
 
 
 
 
 
 
 
353
  }
354
- });
355
 
356
  var t1 = d.getTime();
357
  wppaLastLazy = t1;
358
 
359
- // wppaConsoleLog( 'MakeLazyVisible() took '+(t1-t0)+' ms.', 'force' );
360
 
361
  }
362
 
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsUtilsVersion = '7.3.01';
6
  var wppaDebug;
7
 
8
+ // Handle animation dependant of setting for mobile
9
+ function wppaAnimate( selector, properties, duration, easing, complete ) {
10
+ if ( wppaIsMobile && wppaNoAnimateOnMobile ) {
11
+ jQuery( selector ).css( properties );
12
+ if ( complete ) {
13
+ setTimeout( complete, 10 );
14
+ }
15
+ }
16
+ else {
17
+ jQuery( selector ).stop().animate( properties, duration, easing, complete );
18
+ }
19
+ }
20
+
21
+ // Handle fading dependant of setting for mobile
22
+ function wppaFadeIn( selector, duration, complete ) {
23
+ if ( wppaIsMobile && wppaNoAnimateOnMobile ) {
24
+ jQuery( selector ).css( {display:''} );
25
+ if ( complete ) {
26
+ setTimeout( complete, 10 );
27
+ }
28
+ }
29
+ else {
30
+ jQuery( selector ).stop().fadeIn( duration, complete );
31
+ }
32
+ }
33
+ function wppaFadeOut( selector, duration, complete ) {
34
+ if ( wppaIsMobile && wppaNoAnimateOnMobile ) {
35
+ jQuery( selector ).css( {display:'none'} );
36
+ if ( complete ) {
37
+ setTimeout( complete, 10 );
38
+ }
39
+ }
40
+ else {
41
+ jQuery( selector ).stop().fadeOut( duration, complete );
42
+ }
43
+ }
44
+ function wppaFadeTo( selector, duration, opacity, complete ) {
45
+ if ( wppaIsMobile && wppaNoAnimateOnMobile ) {
46
+ jQuery( selector ).css( {display:'', opacity: opacity} );
47
+ if ( complete ) {
48
+ setTimeout( complete, 10 );
49
+ }
50
+ }
51
+ else {
52
+ jQuery( selector ).stop().fadeTo( duration, opacity, complete );
53
+ }
54
+ }
55
+
56
  // Trim
57
  // @1 string to be trimmed
58
  // @2 character, string, or array of characters or strings to trim off,
380
 
381
  var wppaLastLazy = 0;
382
  // Make lazy load images visible
383
+ function wppaMakeLazyVisible(mocc) {
384
+
385
+ // No mocc or mocc = 0: all mocs
386
+ if ( typeof ( mocc ) != 'number' ) mocc = 0;
387
+
388
+ // If done for this mocc, return
389
+ if ( _wppaLazyDone[mocc] ) {
390
+ return;
391
+ }
392
 
393
+ // Only do this if the previous time was more than 500 ms ago
394
  var d = new Date();
395
  var t0 = d.getTime();
396
+ if ( t0 < ( wppaLastLazy + 500 ) ) {
397
  // wppaConsoleLog( 'MakeLazyVisible() skipped', 'force' );
398
  return;
399
  }
400
 
401
  var src;
402
+ var c0 = 0, c1 = 0;
403
+
404
+ // If mocc given, check this mocc only
405
+ if ( mocc > 0 ) {
406
+ jQuery( '.wppa-lazy-'+mocc ).each( function() {
407
+
408
+ src = jQuery( this ).attr( 'data-src' );
409
+
410
+ // if not done yet by all mocs proc
411
+ if ( src ) {
412
+ if ( ! wppaLazyLoad || wppaIsElementInViewport( this ) ) {
413
+ jQuery( this ).attr( 'src', src );
414
+ jQuery( this ).removeAttr( 'data-src' );
415
+ jQuery( this ).removeClass( 'wppa-lazy' );
416
+ jQuery( this ).removeClass( 'wppa-lazy-'+mocc );
417
+
418
+ c1++;
419
+ }
420
+ }
421
+ else if ( wppaIsElementInViewport( this ) ) { // 'all' proc removed 'wppa-lazy' but did not remove 'wppa-lazy-'+mocc
422
+ jQuery( this ).removeClass( 'wppa-lazy-'+mocc );
423
+ }
424
+ c0++;
425
+ });
426
+
427
+ // Done with this mocc?
428
+ if ( jQuery( '.wppa-lazy-'+mocc ).length == 0 ) {
429
+ _wppaLazyDone[mocc] = true;
430
+ }
431
+ }
432
 
433
+ // check all mocc's
434
+ else {
435
+ jQuery( '.wppa-lazy' ).each( function() {
436
+ src = jQuery( this ).attr( 'data-src' );
437
+ if ( src ) {
438
+ if ( ! wppaLazyLoad || wppaIsElementInViewport( this ) ) {
439
+ jQuery( this ).attr( 'src', src );
440
+ jQuery( this ).removeAttr( 'data-src' );
441
+ jQuery( this ).removeClass( 'wppa-lazy' );
442
+ c1++;
443
+ }
444
+ }
445
+ c0++;
446
+ });
447
+
448
+ // Done with all moccs?
449
+ if ( jQuery( '.wppa-lazy' ).length == 0 ) {
450
+ _wppaLazyDone[0] = true;
451
  }
452
+ }
453
 
454
  var t1 = d.getTime();
455
  wppaLastLazy = t1;
456
 
457
+ wppaConsoleLog( 'MakeLazyVisible('+mocc+') took '+(t1-t0)+' ms. Totoal count = '+c0+', modcount = '+c1, 'force' );
458
 
459
  }
460
 
js/wppa-utils.min.js CHANGED
@@ -1 +1 @@
1
- var wppaDebug,wppaJsUtilsVersion="7.3.00";function wppaTrim(e,t){return wppaTrimRight(wppaTrimLeft(e,t),t)}function wppaTrimLeft(e,t){var a,r,n,i,p,o,s;switch(typeof t){case"string":for(r=(a=e).length,n=t.length;n<=r&&a.substr(0,n)==t;)r=(a=a.substr(n)).length;break;case"object":for(p=!1,s=e;!p;){for(i=0,o=s;i<t.length;)s=wppaTrimLeft(s,t[i]),i++;p=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,r,n,i,p,o,s;switch(typeof t){case"string":for(r=(a=e).length,n=t.length;n<=r&&a.substr(r-n)==t;)r=(a=a.substr(0,r-n)).length;break;case"object":for(p=!1,s=e;!p;){for(i=0,o=s;i<t.length;)s=wppaTrimRight(s,t[i]),i++;p=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var r=new Date;r.setDate(r.getDate()+a);var n=escape(t)+(null==a?"":"; expires="+r.toUTCString());document.cookie=e+"="+n}function wppa_getCookie(e){var t,a,r,n=document.cookie.split(";");for(t=0;t<n.length;t++)if(a=n[t].substr(0,n[t].indexOf("=")),r=n[t].substr(n[t].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(r);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){if("undefined"!=typeof console&&(wppaDebug||"force"==t)){var a=(new Date).getTime()%864e5,r=Math.floor(a/36e5);a-=60*r*60*1e3;var n=Math.floor(a/6e4);a-=60*n*1e3;var i=Math.floor(a/1e3);a-=1e3*i,console.log("At: "+r+":"+n+":"+i+"."+a+" message: "+e)}}function wppaSvgHtml(e,t,a,r,n,i,p,o){var s,c,l;switch(n=n||"0",i=i||"10",p=p||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=n;break;case"light":radius=i;break;case"medium":radius=p;break;case"heavy":radius=o}t=t||"32px",c=a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),l=wppaUseSvg?wppaImageDirectory+e+".svg":wppaImageDirectory+e+".png";if(wppaUseSvg&&"-1"!=jQuery.inArray(e,["Next-Button","Prev-Button","Backward-Button","Forward-Button","Pause-Button","Play-Button","Stop-Button","Eagle-1","Snail","Exit","Full-Screen","Exit-Full-Screen","Content-View"])){var u='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+c+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":u+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":u+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":u+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":u+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Full-Screen":u+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Exit-Full-Screen":u+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;default:alert("Native svg "+e+" not implemented")}u+="</g></svg>"}else u='<img src="'+l+'"'+(wppaUseSvg?' class="wppa-svg"':"")+' style="height:'+t+";fill:"+s+";background-color:"+c+";"+(radius?"border-radius:"+radius+"%;":"")+(wppaUseSvg?"display:none;":"")+'text-decoration:none !important;vertical-align:middle;" />';return u}var wppaLastLazy=0;function wppaMakeLazyVisible(){var e=new Date;if(!(e.getTime()<wppaLastLazy+200)){var t;jQuery(".wppa-lazy").each(function(){t=jQuery(this).attr("data-src"),wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",t),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"))});var a=e.getTime();wppaLastLazy=a}}function wppaIsElementInViewport(e){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t=e.getBoundingClientRect();return!t||0<t.bottom&&0<t.right&&t.left<wppaWindowWidth()&&t.top<wppaWindowHeight()}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,t,a){var r=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==r?t:(wppaIsMini[e]?r/2:r)+"px;"}function wppaEntityDecode(e){return e.split("&amp;").join("&").split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}wppaConsoleLog("wppa-utils.js version "+wppaJsUtilsVersion+" loaded.","force");
1
+ var wppaDebug,wppaJsUtilsVersion="7.3.01";function wppaAnimate(e,t,a,p,r){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(t),r&&setTimeout(r,10)):jQuery(e).stop().animate(t,a,p,r)}function wppaFadeIn(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),a&&setTimeout(a,10)):jQuery(e).stop().fadeIn(t,a)}function wppaFadeOut(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),a&&setTimeout(a,10)):jQuery(e).stop().fadeOut(t,a)}function wppaFadeTo(e,t,a,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:a}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(t,a,p)}function wppaTrim(e,t){return wppaTrimRight(wppaTrimLeft(e,t),t)}function wppaTrimLeft(e,t){var a,p,r,o,n,i,s;switch(typeof t){case"string":for(p=(a=e).length,r=t.length;r<=p&&a.substr(0,r)==t;)p=(a=a.substr(r)).length;break;case"object":for(n=!1,s=e;!n;){for(o=0,i=s;o<t.length;)s=wppaTrimLeft(s,t[o]),o++;n=i==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,r,o,n,i,s;switch(typeof t){case"string":for(p=(a=e).length,r=t.length;r<=p&&a.substr(p-r)==t;)p=(a=a.substr(0,p-r)).length;break;case"object":for(n=!1,s=e;!n;){for(o=0,i=s;o<t.length;)s=wppaTrimRight(s,t[o]),o++;n=i==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var p=new Date;p.setDate(p.getDate()+a);var r=escape(t)+(null==a?"":"; expires="+p.toUTCString());document.cookie=e+"="+r}function wppa_getCookie(e){var t,a,p,r=document.cookie.split(";");for(t=0;t<r.length;t++)if(a=r[t].substr(0,r[t].indexOf("=")),p=r[t].substr(r[t].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(p);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){if("undefined"!=typeof console&&(wppaDebug||"force"==t)){var a=(new Date).getTime()%864e5,p=Math.floor(a/36e5);a-=60*p*60*1e3;var r=Math.floor(a/6e4);a-=60*r*1e3;var o=Math.floor(a/1e3);a-=1e3*o,console.log("At: "+p+":"+r+":"+o+"."+a+" message: "+e)}}function wppaSvgHtml(e,t,a,p,r,o,n,i){var s,l,c;switch(r=r||"0",o=o||"10",n=n||"20",i=i||"50",wppaSvgCornerStyle){case"gif":case"none":radius=r;break;case"light":radius=o;break;case"medium":radius=n;break;case"heavy":radius=i}t=t||"32px",l=a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),c=wppaUseSvg?wppaImageDirectory+e+".svg":wppaImageDirectory+e+".png";if(wppaUseSvg&&"-1"!=jQuery.inArray(e,["Next-Button","Prev-Button","Backward-Button","Forward-Button","Pause-Button","Play-Button","Stop-Button","Eagle-1","Snail","Exit","Full-Screen","Exit-Full-Screen","Content-View"])){var u='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+l+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":u+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":u+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":u+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":u+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":u+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Full-Screen":u+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Exit-Full-Screen":u+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;default:alert("Native svg "+e+" not implemented")}u+="</g></svg>"}else u='<img src="'+c+'"'+(wppaUseSvg?' class="wppa-svg"':"")+' style="height:'+t+";fill:"+s+";background-color:"+l+";"+(radius?"border-radius:"+radius+"%;":"")+(wppaUseSvg?"display:none;":"")+'text-decoration:none !important;vertical-align:middle;" />';return u}var wppaLastLazy=0;function wppaMakeLazyVisible(e){if("number"!=typeof e&&(e=0),!_wppaLazyDone[e]){var t=new Date,a=t.getTime();if(!(a<wppaLastLazy+500)){var p,r=0,o=0;0<e?(jQuery(".wppa-lazy-"+e).each(function(){(p=jQuery(this).attr("data-src"))?wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",p),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),jQuery(this).removeClass("wppa-lazy-"+e),o++):wppaIsElementInViewport(this)&&jQuery(this).removeClass("wppa-lazy-"+e),r++}),0==jQuery(".wppa-lazy-"+e).length&&(_wppaLazyDone[e]=!0)):(jQuery(".wppa-lazy").each(function(){(p=jQuery(this).attr("data-src"))&&(wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",p),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),o++)),r++}),0==jQuery(".wppa-lazy").length&&(_wppaLazyDone[0]=!0));var n=t.getTime();wppaConsoleLog("MakeLazyVisible("+e+") took "+((wppaLastLazy=n)-a)+" ms. Totoal count = "+r+", modcount = "+o,"force")}}}function wppaIsElementInViewport(e){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t=e.getBoundingClientRect();return!t||0<t.bottom&&0<t.right&&t.left<wppaWindowWidth()&&t.top<wppaWindowHeight()}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,t,a){var p=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==p?t:(wppaIsMini[e]?p/2:p)+"px;"}function wppaEntityDecode(e){return e.split("&amp;").join("&").split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}wppaConsoleLog("wppa-utils.js version "+wppaJsUtilsVersion+" loaded.","force");
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // contains common vars and functions
4
  //
5
- var wppaJsVersion = '7.3.00';
6
 
7
  // Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
8
  var wppaSlideShow;
@@ -168,7 +168,10 @@ var wppaExtendedResizeCount = 0;
168
  var wppaExtendedResizeDelay = 200;
169
  var wppaThumbAspect = 3/4;
170
  var wppaFilmonlyContinuous = false;
 
171
  var wppaFilmInit = [];
 
 
172
 
173
  // 'Internal' variables ( private )
174
  var _wppaId = [];
@@ -215,6 +218,7 @@ var _wppaVideoNatHeight = [];
215
  var _wppaWaitTexts = [];
216
  var _wppaImageAlt = [];
217
  var _wppaLastIdx = [];
 
218
 
219
  var __wppaOverruleRun = false;
220
 
@@ -298,6 +302,9 @@ function wppaDoInit() {
298
  if ( wppaFadeInAfterFadeOut ) {
299
  _wppaTextDelay *= 2;
300
  }
 
 
 
301
 
302
  // Make sure ajax spinners dies
303
  jQuery( '.wppa-ajax-spin' ).stop().fadeOut();
@@ -318,7 +325,7 @@ function wppaDoInit() {
318
  }, 3000 );
319
 
320
  // Responsive handlers
321
- jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaDoAllAutocols);
322
  // wppaDoAllAutocols();
323
 
324
  // Size scrollable areas
@@ -326,16 +333,63 @@ function wppaDoInit() {
326
  // wppaSizeThumbArea();
327
 
328
  // Make Lazy load images visible
329
- jQuery(window).on('DOMContentLoaded load resize scroll wheel orientationchange', wppaMakeLazyVisible);
330
- jQuery('.wppa-divnicewrap').on('DOMContentLoaded load resize scroll wheel orientationchange', wppaMakeLazyVisible);
331
  // wppaMakeLazyVisible();
332
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  jQuery(window).trigger('resize');
334
 
335
  // Protect rightclick
336
  wppaProtect();
 
337
  }
338
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  // Install auto div sizer
340
  jQuery(document).ready(function(){
341
  jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange", wppaSizeAutoDiv);
@@ -354,7 +408,7 @@ function wppaSizeAutoDiv() {
354
  function wppaDoAllAutocols(e) {
355
 
356
  // Report where it comes from
357
- wppaConsoleLog(e.type,'force');
358
 
359
  setTimeout(function(){_wppaDoAllAutocols(-1)}, wppaExtendedResizeDelay);
360
  }
@@ -365,7 +419,7 @@ function _wppaDoAllAutocols(i) {
365
  var t0 = Date.now();
366
  i++;
367
 
368
- wppaConsoleLog('Doing wppaDoAllAutocols('+i+')');
369
 
370
  // Do occurrences that are responsive
371
  var mocc = 1;
@@ -373,12 +427,12 @@ function _wppaDoAllAutocols(i) {
373
  if ( wppaAutoColumnWidth[mocc] ) {
374
  _wppaDoAutocol( mocc, i);
375
  }
 
 
 
376
  mocc++;
377
  }
378
 
379
- // Do lazy, just to be sure, for Ale
380
- wppaMakeLazyVisible();
381
-
382
  // Do retries if configured (-1 is infinite)
383
  if ( i < wppaExtendedResizeCount || wppaExtendedResizeCount == -1 ) {
384
  setTimeout(function(){_wppaDoAllAutocols(i)}, wppaExtendedResizeDelay);
@@ -386,7 +440,7 @@ function _wppaDoAllAutocols(i) {
386
 
387
  // Report time spent this try
388
  var t1 = Date.now();
389
- wppaConsoleLog('Do autocols took '+(t1-t0)+' ms');
390
  return true;
391
  }
392
 
@@ -465,7 +519,7 @@ function wppaStopVideo( mocc ) {
465
  if ( video ) {
466
  if ( typeof( video.pause ) == 'function') {
467
  video.pause();
468
- wppaConsoleLog('Video '+id[i]+' paused', 'force' );
469
  }
470
  }
471
  }
@@ -547,7 +601,7 @@ function wppaGetContainerWidth( mocc ) {
547
  function _wppaDoAutocol( mocc, i ) {
548
 
549
  // Log we are in
550
- wppaConsoleLog('Enter auto. mocc = '+mocc+' retry = '+i);
551
 
552
  // Auto?
553
  if ( ! wppaAutoColumnWidth[mocc] ) return true;
@@ -562,12 +616,12 @@ function _wppaDoAutocol( mocc, i ) {
562
  // Anything to do here?
563
  var container = document.getElementById( 'wppa-container-' + mocc );
564
  if ( ! container ) {
565
- wppaConsoleLog('DoAutocol '+mocc+' absent');
566
  return;
567
  }
568
  if ( ! wppaIsElementInViewport( container ) ) {
569
  jQuery( '#wppa-container-' + mocc ).css({visibility:'hidden'});
570
- wppaConsoleLog('DoAutocol '+mocc+' skipped');
571
  return;
572
  }
573
  jQuery( '#wppa-container-' + mocc ).css({visibility:'visible'});
@@ -890,7 +944,7 @@ function wppaFotomotoToolbar( mocc, url ) {
890
  }
891
  else { // Not loaded yet, retry after 200 ms
892
  setTimeout('wppaFotomotoToolbar( '+mocc+',"'+url+'" )', 200 );
893
- wppaConsoleLog('Waiting for Fotomoto' );
894
  }
895
  }
896
  }
@@ -973,10 +1027,10 @@ function wppaPushStateSlide( mocc, slide, url ) {
973
  if ( url != '' ) {
974
  try {
975
  history.pushState( {page: wppaHis, occur: mocc, type: 'slide', slide: slide}, "---", url );
976
- wppaConsoleLog('Slide history stack updated' );
977
  }
978
  catch( err ) {
979
- wppaConsoleLog('Slide history stack update failed' );
980
  }
981
  }
982
  }
2
  //
3
  // contains common vars and functions
4
  //
5
+ var wppaJsVersion = '7.3.01';
6
 
7
  // Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
8
  var wppaSlideShow;
168
  var wppaExtendedResizeDelay = 200;
169
  var wppaThumbAspect = 3/4;
170
  var wppaFilmonlyContinuous = false;
171
+ var wppaNoAnimateOnMobile = false;
172
  var wppaFilmInit = [];
173
+ var wppaResizeEndDelay = 200;
174
+ var wppaScrollEndDelay = 100;
175
 
176
  // 'Internal' variables ( private )
177
  var _wppaId = [];
218
  var _wppaWaitTexts = [];
219
  var _wppaImageAlt = [];
220
  var _wppaLastIdx = [];
221
+ var _wppaLazyDone = [];
222
 
223
  var __wppaOverruleRun = false;
224
 
302
  if ( wppaFadeInAfterFadeOut ) {
303
  _wppaTextDelay *= 2;
304
  }
305
+ if ( wppaIsMobile && wppaNoAnimateOnMobile ) {
306
+ _wppaTextDelay = 10;
307
+ }
308
 
309
  // Make sure ajax spinners dies
310
  jQuery( '.wppa-ajax-spin' ).stop().fadeOut();
325
  }, 3000 );
326
 
327
  // Responsive handlers
328
+ jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols);
329
  // wppaDoAllAutocols();
330
 
331
  // Size scrollable areas
333
  // wppaSizeThumbArea();
334
 
335
  // Make Lazy load images visible
336
+ jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaMakeLazyVisible);
337
+ jQuery('.wppa-divnicewrap').on('DOMContentLoaded load resize wppascrollend wheelend orientationchange', wppaMakeLazyVisible);
338
  // wppaMakeLazyVisible();
339
 
340
+ // When the window size changes, filmstrip needs immediate adjustment
341
+ jQuery(window).on('resize', function(){
342
+ var m = 1;
343
+ while ( m <= wppaTopMoc ) {
344
+ // wppaConsoleLog('window resize. mocc = '+m, 'force');
345
+ wppaFilmInit[m] = false; // mark as not initiated
346
+ jQuery( '#wppa-filmstrip-'+m ).stop(); // stop running animations
347
+ _wppaAdjustFilmstrip( m ); // re-adjust by jumping
348
+ m++;
349
+ }
350
+ });
351
+
352
+ // When resize is done, filmstrips are initilized
353
+ jQuery(window).on('wpparesizeend', function(){
354
+ var m = 1;
355
+ while ( m <= wppaTopMoc ) {
356
+ // wppaConsoleLog('window resize end. mocc = '+m, 'force');
357
+ wppaFilmInit[m] = true; // mark as not initiated
358
+ m++;
359
+ }
360
+ });
361
+
362
  jQuery(window).trigger('resize');
363
 
364
  // Protect rightclick
365
  wppaProtect();
366
+
367
  }
368
 
369
+ // reasize end listener
370
+ var wppaResizeEndTimer;
371
+ jQuery(document).ready(function(){
372
+ jQuery(window).on( 'resize load', function () {
373
+ clearTimeout( wppaResizeEndTimer );
374
+ wppaResizeEndTimer = setTimeout( function () {
375
+ wppaConsoleLog('Resize end triggered');
376
+ jQuery(window).trigger('wpparesizeend');
377
+ }, wppaResizeEndDelay );
378
+ });
379
+ });
380
+
381
+ // scroll end listener
382
+ var wppaScrollEndTimer;
383
+ jQuery(document).ready(function(){
384
+ jQuery(window).on( 'scroll wheel touchmove', function () {
385
+ clearTimeout( wppaScrollEndTimer );
386
+ wppaScrollEndTimer = setTimeout( function () {
387
+ wppaConsoleLog('Scroll end triggered');
388
+ jQuery(window).trigger('wppascrollend');
389
+ }, wppaScrollEndDelay );
390
+ });
391
+ });
392
+
393
  // Install auto div sizer
394
  jQuery(document).ready(function(){
395
  jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange", wppaSizeAutoDiv);
408
  function wppaDoAllAutocols(e) {
409
 
410
  // Report where it comes from
411
+ wppaConsoleLog('Do all auto cols from '+e.type,'force');
412
 
413
  setTimeout(function(){_wppaDoAllAutocols(-1)}, wppaExtendedResizeDelay);
414
  }
419
  var t0 = Date.now();
420
  i++;
421
 
422
+ // wppaConsoleLog('Doing wppaDoAllAutocols('+i+')');
423
 
424
  // Do occurrences that are responsive
425
  var mocc = 1;
427
  if ( wppaAutoColumnWidth[mocc] ) {
428
  _wppaDoAutocol( mocc, i);
429
  }
430
+
431
+ // Do lazy, just to be sure, for Ale
432
+ wppaMakeLazyVisible(mocc);
433
  mocc++;
434
  }
435
 
 
 
 
436
  // Do retries if configured (-1 is infinite)
437
  if ( i < wppaExtendedResizeCount || wppaExtendedResizeCount == -1 ) {
438
  setTimeout(function(){_wppaDoAllAutocols(i)}, wppaExtendedResizeDelay);
440
 
441
  // Report time spent this try
442
  var t1 = Date.now();
443
+ //wppaConsoleLog('Do autocols took '+(t1-t0)+' ms');
444
  return true;
445
  }
446
 
519
  if ( video ) {
520
  if ( typeof( video.pause ) == 'function') {
521
  video.pause();
522
+ // wppaConsoleLog('Video '+id[i]+' paused' );
523
  }
524
  }
525
  }
601
  function _wppaDoAutocol( mocc, i ) {
602
 
603
  // Log we are in
604
+ // wppaConsoleLog('Enter auto. mocc = '+mocc+' retry = '+i);
605
 
606
  // Auto?
607
  if ( ! wppaAutoColumnWidth[mocc] ) return true;
616
  // Anything to do here?
617
  var container = document.getElementById( 'wppa-container-' + mocc );
618
  if ( ! container ) {
619
+ // wppaConsoleLog('DoAutocol '+mocc+' absent');
620
  return;
621
  }
622
  if ( ! wppaIsElementInViewport( container ) ) {
623
  jQuery( '#wppa-container-' + mocc ).css({visibility:'hidden'});
624
+ // wppaConsoleLog('DoAutocol '+mocc+' skipped');
625
  return;
626
  }
627
  jQuery( '#wppa-container-' + mocc ).css({visibility:'visible'});
944
  }
945
  else { // Not loaded yet, retry after 200 ms
946
  setTimeout('wppaFotomotoToolbar( '+mocc+',"'+url+'" )', 200 );
947
+ // wppaConsoleLog('Waiting for Fotomoto' );
948
  }
949
  }
950
  }
1027
  if ( url != '' ) {
1028
  try {
1029
  history.pushState( {page: wppaHis, occur: mocc, type: 'slide', slide: slide}, "---", url );
1030
+ // wppaConsoleLog('Slide history stack updated' );
1031
  }
1032
  catch( err ) {
1033
+ // wppaConsoleLog('Slide history stack update failed' );
1034
  }
1035
  }
1036
  }
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsVersion="7.3.00",wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaFilmInit=[],_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize scroll wheel orientationchange",wppaMakeLazyVisible),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var a=jQuery(window).height(),e=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:a*e})})}function wppaDoAllAutocols(p){wppaConsoleLog(p.type,"force"),setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){var a=Date.now();p++,wppaConsoleLog("Doing wppaDoAllAutocols("+p+")");for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),e++;wppaMakeLazyVisible(),(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay);var t=Date.now();return wppaConsoleLog("Do autocols took "+(t-a)+" ms"),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(0<a.length)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;p=(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),a[0]+"//"):(e=a[0].split("/"),"");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,a){if(wppaConsoleLog("Enter auto. mocc = "+p+" retry = "+a),!wppaAutoColumnWidth[p])return!0;var e,t;e=jQuery("#wppa-container-"+p).width();var o=document.getElementById("wppa-container-"+p);if(o){if(!wppaIsElementInViewport(o))return jQuery("#wppa-container-"+p).css({visibility:"hidden"}),void wppaConsoleLog("DoAutocol "+p+" skipped");if(jQuery("#wppa-container-"+p).css({visibility:"visible"}),wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:e-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:e})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:e},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,s=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,i=s-1,n=parseInt((r+wppaCoverSpacing)/s-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=n){wppaColWidth[p]=r,wppaMCRWidth[p]=n;for(var w=0;w<t.length;){switch(w%s){case 0:jQuery(t[w]).css({marginLeft:"0px",clear:"both",float:"left"});break;case i:jQuery(t[w]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[w]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}w++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:n-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:n},wppaResponseSpeed)}}else if(1==t.length&&!wppaCoverImageResponsive[p]){jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){jQuery("#wppa-container-"+p).css("line-height","0");var l=parseInt(e/wppaMaxCoverWidth+.9999);l<1&&(l=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/l+"%"})}if(wppaThumbSpaceAuto){var u=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(u){var c=wppaMinThumbSpace,d=e-wppaThumbnailAreaDelta-7,y=Math.max(1,parseInt(d/(u+c))),h=parseInt(.5+(d-y*u)/(y+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:h})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",e-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",e-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var m,g=1,f=jQuery("#wppa-mas-h-"+g+"-"+p).attr("data-height-perc");f;)m=f*(e-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+g+"-"+p).css("height",m),g++,f=jQuery("#wppa-mas-h-"+g+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",e-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*e),wppaFilmStripLength[p]=e-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",e),jQuery(".wppa-simg-"+p).css("width",e-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",e+10),jQuery(".wppa-mimg-"+p).css("width",e),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(e/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*e),wppaSetRealCalendarHeights(p),!0}wppaConsoleLog("DoAutocol "+p+" absent")}function wppaSetRealCalendarHeights(a){var p=jQuery("#wppa-real-calendar-"+a).width();if(0<p){var e=!0,t=p*wppaThumbAspect/7;jQuery(".wppa-real-calendar-day-"+a).css({height:t});var o=p/50+2;jQuery("#wppa-real-calendar-"+a).css({fontSize:o});var r=o/4;jQuery(".wppa-real-calendar-head-td-"+a).css({marginTop:r,marginBottom:r});var s=t/2;jQuery(".wppa-realcalimg-"+a).each(function(){if(0==this.height)e=!1;else{var p=jQuery(this).attr("data-day");thisb=s-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+a).css({bottom:thisb})}}),e||setTimeout(function(){wppaSetRealCalendarHeights(a)},100)}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace("&quot;",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),(wppaFirstOccur=0)==a){var e=document.location.href.split("&wppa-occur=");a=parseInt(e[1])}e=document.location.href.split("&wppa-photo=");var t=parseInt(e[1]);if(0<t){for(var o=0;o<_wppaId[a].length&&_wppaId[a][o]!=t;)o++;o<_wppaId[a].length&&_wppaGoto(a,o)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),s=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(s.getPosition())},1e3)})}function wppaEncode(p){var a;if(void 0!==p){var e=(a=(a=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(a="";t<e.length;)a+=e[t],++t<e.length&&(a+="||PLUS||");return a}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:a=(a=(a=(a=(a=(a=(a=a[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var s=jQuery(".wppa-ss-albumcat-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");s=jQuery(".wppa-ss-albumtext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");s=jQuery(".wppa-ss-phototag-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var i;s=jQuery(".wppa-ss-phototext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+r,document.location.href=n}}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;6<e&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).prop("checked",!1),jQuery(e[t]).prop("disabled",!1)):(jQuery(e[t]).prop("checked",!0),jQuery(e[t]).prop("disabled",!0)),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,a,e,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
1
+ var wppaJsVersion="7.3.01",wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=100,_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaLazyDone=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("resize",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!1,jQuery("#wppa-filmstrip-"+p).stop(),_wppaAdjustFilmstrip(p),p++}),jQuery(window).on("wpparesizeend",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!0,p++}),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}function wppaDoAllAutocols(p){wppaConsoleLog("Do all auto cols from "+p.type,"force"),setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){Date.now();p++;for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),wppaMakeLazyVisible(e),e++;(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay);Date.now();return!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p),a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t;a=jQuery("#wppa-container-"+p).width();var o=document.getElementById("wppa-container-"+p);if(o){if(wppaIsElementInViewport(o)){if(jQuery("#wppa-container-"+p).css({visibility:"visible"}),wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:a-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:a})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:a-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:a},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,s=i-1,n=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=n){wppaColWidth[p]=r,wppaMCRWidth[p]=n;for(var w=0;w<t.length;){switch(w%i){case 0:jQuery(t[w]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[w]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[w]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}w++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:n-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:n},wppaResponseSpeed)}}else if(1==t.length&&!wppaCoverImageResponsive[p]){jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:a-wppaTextFrameDelta},wppaResponseSpeed);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){jQuery("#wppa-container-"+p).css("line-height","0");var l=parseInt(a/wppaMaxCoverWidth+.9999);l<1&&(l=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/l+"%"})}if(wppaThumbSpaceAuto){var u=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(u){var c=wppaMinThumbSpace,d=a-wppaThumbnailAreaDelta-7,y=Math.max(1,parseInt(d/(u+c))),m=parseInt(.5+(d-y*u)/(y+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:m})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var h,f=1,g=jQuery("#wppa-mas-h-"+f+"-"+p).attr("data-height-perc");g;)h=g*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+f+"-"+p).css("height",h),f++,g=jQuery("#wppa-mas-h-"+f+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*a),wppaSetRealCalendarHeights(p),!0}jQuery("#wppa-container-"+p).css({visibility:"hidden"})}}function wppaSetRealCalendarHeights(e){var p=jQuery("#wppa-real-calendar-"+e).width();if(0<p){var a=!0,t=p*wppaThumbAspect/7;jQuery(".wppa-real-calendar-day-"+e).css({height:t});var o=p/50+2;jQuery("#wppa-real-calendar-"+e).css({fontSize:o});var r=o/4;jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:r,marginBottom:r});var i=t/2;jQuery(".wppa-realcalimg-"+e).each(function(){if(0==this.height)a=!1;else{var p=jQuery(this).attr("data-day");thisb=i-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb})}}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100)}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:r})}}}function wppaGetChildI(p){var e,a=p.childNodes;for(e=0;e<a.length;e++){var t=a[e];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){wppaConsoleLog("Resize end triggered"),jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){wppaConsoleLog("Scroll end triggered"),jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace("&quot;",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){if(e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e){var a=document.location.href.split("&wppa-occur=");e=parseInt(a[1])}a=document.location.href.split("&wppa-photo=");var t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=e;else if(p.selectionStart||"0"==p.selectionStart){var a=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length}else p.value+=e}function wppaGeoInit(p,e,a){var t=new google.maps.LatLng(e,a),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),i=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(i.getPosition())},1e3)})}function wppaEncode(p){var e;if(void 0!==p){var a=(e=(e=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(e="";t<a.length;)e+=a[t],++t<a.length&&(e+="||PLUS||");return e}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var s;i=jQuery(".wppa-ss-phototext-"+p);for(r="",s=0;s<i.length;s++)"selected"==jQuery(i[s]).attr("selected")&&(r+="."+jQuery(i[s]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(e){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=n}}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){var a=jQuery(p).length;6<a&&(a=6),a<2&&(a=2),jQuery(e).attr("size",a)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).attr("disabled","disabled"),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 7.3.00.004
6
- Stable tag: 7.2.16.006
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -137,6 +137,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
 
138
  == Upgrade Notice ==
139
 
 
 
 
 
140
  = 7.3.00 =
141
 
142
  * This version addresses various bug fixes and performance enhancements.
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 7.3.01.007
6
+ Stable tag: 7.3.00.004
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
137
 
138
  == Upgrade Notice ==
139
 
140
+ = 7.3.01 =
141
+
142
+ * This version addresses various bug fixes, feature requests and performance enhancements.
143
+
144
  = 7.3.00 =
145
 
146
  * This version addresses various bug fixes and performance enhancements.
vendor/nicescroll/jquery.nicescroll.js CHANGED
@@ -2988,10 +2988,16 @@
2988
  q: false
2989
  });
2990
 
2991
- (passiveSupported && active) ? el.addEventListener(name, fn, {
2992
- passive: false,
2993
- capture: bubble
2994
- }) : el.addEventListener(name, fn, bubble || false);
 
 
 
 
 
 
2995
  };
2996
 
2997
  this._unbind = function (el, name, fn, bub) { // primitive unbind
2988
  q: false
2989
  });
2990
 
2991
+ // (passiveSupported && active) ? el.addEventListener(name, fn, {
2992
+ // passive: false,
2993
+ // capture: bubble
2994
+ // }) : el.addEventListener(name, fn, bubble || false);
2995
+ // Patched by opajaap according to https://github.com/inuyaksa/jquery.nicescroll/issues/799
2996
+ (passiveSupported && (active || el == window.document || el == window.document.body || el == window)) ?
2997
+ el.addEventListener(name, fn, { passive: false, capture: bubble }) :
2998
+ el.addEventListener(name, fn, bubble || false);
2999
+
3000
+
3001
  };
3002
 
3003
  this._unbind = function (el, name, fn, bub) { // primitive unbind
vendor/nicescroll/jquery.nicescroll.min.js CHANGED
@@ -1,2 +1 @@
1
- /* jquery.nicescroll v3.7.6 InuYaksa - MIT - https://nicescroll.areaaperta.com */
2
- !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var o=!1,t=!1,r=0,i=2e3,s=0,n=e,l=document,a=window,c=n(a),d=[],u=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||!1,h=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.mozCancelAnimationFrame||!1;if(u)a.cancelAnimationFrame||(h=function(e){});else{var p=0;u=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-p)),i=a.setTimeout(function(){e(t+r)},r);return p=t+r,i},h=function(e){a.clearTimeout(e)}}var m=a.MutationObserver||a.WebKitMutationObserver||!1,f=Date.now||function(){return(new Date).getTime()},g={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var e=l.currentScript||function(){var e=l.getElementsByTagName("script");return!!e.length&&e[e.length-1]}(),o=e?e.src.split("?")[0]:"";return o.split("/").length>0?o.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},v=!1,w=function(){if(v)return v;var e=l.createElement("DIV"),o=e.style,t=navigator.userAgent,r=navigator.platform,i={};return i.haspointerlock="pointerLockElement"in l||"webkitPointerLockElement"in l||"mozPointerLockElement"in l,i.isopera="opera"in a,i.isopera12=i.isopera&&"getUserMedia"in navigator,i.isoperamini="[object OperaMini]"===Object.prototype.toString.call(a.operamini),i.isie="all"in l&&"attachEvent"in e&&!i.isopera,i.isieold=i.isie&&!("msInterpolationMode"in o),i.isie7=i.isie&&!i.isieold&&(!("documentMode"in l)||7===l.documentMode),i.isie8=i.isie&&"documentMode"in l&&8===l.documentMode,i.isie9=i.isie&&"performance"in a&&9===l.documentMode,i.isie10=i.isie&&"performance"in a&&10===l.documentMode,i.isie11="msRequestFullscreen"in e&&l.documentMode>=11,i.ismsedge="msCredentials"in a,i.ismozilla="MozAppearance"in o,i.iswebkit=!i.ismsedge&&"WebkitAppearance"in o,i.ischrome=i.iswebkit&&"chrome"in a,i.ischrome38=i.ischrome&&"touchAction"in o,i.ischrome22=!i.ischrome38&&i.ischrome&&i.haspointerlock,i.ischrome26=!i.ischrome38&&i.ischrome&&"transition"in o,i.cantouch="ontouchstart"in l.documentElement||"ontouchstart"in a,i.hasw3ctouch=(a.PointerEvent||!1)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),i.hasmstouch=!i.hasw3ctouch&&(a.MSPointerEvent||!1),i.ismac=/^mac$/i.test(r),i.isios=i.cantouch&&/iphone|ipad|ipod/i.test(r),i.isios4=i.isios&&!("seal"in Object),i.isios7=i.isios&&"webkitHidden"in l,i.isios8=i.isios&&"hidden"in l,i.isios10=i.isios&&a.Proxy,i.isandroid=/android/i.test(t),i.haseventlistener="addEventListener"in e,i.trstyle=!1,i.hastransform=!1,i.hastranslate3d=!1,i.transitionstyle=!1,i.hastransition=!1,i.transitionend=!1,i.trstyle="transform",i.hastransform="transform"in o||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],t=0,r=e.length;t<r;t++)if(void 0!==o[e[t]]){i.trstyle=e[t];break}i.hastransform=!!i.trstyle}(),i.hastransform&&(o[i.trstyle]="translate3d(1px,2px,3px)",i.hastranslate3d=/translate3d/.test(o[i.trstyle])),i.transitionstyle="transition",i.prefixstyle="",i.transitionend="transitionend",i.hastransition="transition"in o||function(){i.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],t=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],r=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],s=0,n=e.length;s<n;s++)if(e[s]in o){i.transitionstyle=e[s],i.prefixstyle=t[s],i.transitionend=r[s];break}i.ischrome26&&(i.prefixstyle=t[1]),i.hastransition=i.transitionstyle}(),i.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(i.ischrome&&!i.ischrome38||i.isie)&&(e=[]);for(var t=0,r=e.length;t<r;t++){var s=e[t];if(o.cursor=s,o.cursor==s)return s}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),i.hasmousecapture="setCapture"in e,i.hasMutationObserver=!1!==m,e=null,v=i,i},b=function(e,p){function v(){var e=T.doc.css(P.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function b(){var e=T.win;if("zIndex"in e)return e.zIndex();for(;e.length>0;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}function x(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=I[r]||0)?t?T.win.outerHeight()-T.win.innerHeight():T.win.outerWidth()-T.win.innerWidth():1;return T.isie8&&i&&(i+=1),s?i:0}return i}function S(e,o,t,r){T._bind(e,o,function(r){var i={original:r=r||a.event,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return r.preventDefault?r.preventDefault():r.returnValue=!1,!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?r.stopImmediatePropagation():r.cancelBubble=!0}};return"mousewheel"==o?(r.wheelDeltaX&&(i.deltaX=-.025*r.wheelDeltaX),r.wheelDeltaY&&(i.deltaY=-.025*r.wheelDeltaY),!i.deltaY&&!i.deltaX&&(i.deltaY=-.025*r.wheelDelta)):i.deltaY=r.detail,t.call(e,i)},r)}function z(e,o,t,r){T.scrollrunning||(T.newscrolly=T.getScrollTop(),T.newscrollx=T.getScrollLeft(),D=f());var i=f()-D;if(D=f(),i>350?A=1:A+=(2-A)/10,e=e*A|0,o=o*A|0,e){if(r)if(e<0){if(T.getScrollLeft()>=T.page.maxw)return!0}else if(T.getScrollLeft()<=0)return!0;var s=e>0?1:-1;X!==s&&(T.scrollmom&&T.scrollmom.stop(),T.newscrollx=T.getScrollLeft(),X=s),T.lastdeltax-=e}if(o){if(function(){var e=T.getScrollTop();if(o<0){if(e>=T.page.maxh)return!0}else if(e<=0)return!0}()){if(M.nativeparentscrolling&&t&&!T.ispage&&!T.zoomactive)return!0;var n=T.view.h>>1;T.newscrolly<-n?(T.newscrolly=-n,o=-1):T.newscrolly>T.page.maxh+n?(T.newscrolly=T.page.maxh+n,o=1):o=0}var l=o>0?1:-1;B!==l&&(T.scrollmom&&T.scrollmom.stop(),T.newscrolly=T.getScrollTop(),B=l),T.lastdeltay-=o}(o||e)&&T.synched("relativexy",function(){var e=T.lastdeltay+T.newscrolly;T.lastdeltay=0;var o=T.lastdeltax+T.newscrollx;T.lastdeltax=0,T.rail.drag||T.doScrollPos(o,e)})}function k(e,o,t){var r,i;return!(t||!q)||(0===e.deltaMode?(r=-e.deltaX*(M.mousescrollstep/54)|0,i=-e.deltaY*(M.mousescrollstep/54)|0):1===e.deltaMode&&(r=-e.deltaX*M.mousescrollstep*50/80|0,i=-e.deltaY*M.mousescrollstep*50/80|0),o&&M.oneaxismousemode&&0===r&&i&&(r=i,i=0,t&&(r<0?T.getScrollLeft()>=T.page.maxw:T.getScrollLeft()<=0)&&(i=r,r=0)),T.isrtlmode&&(r=-r),z(r,i,t,!0)?void(t&&(q=!0)):(q=!1,e.stopImmediatePropagation(),e.preventDefault()))}var T=this;this.version="3.7.6",this.name="nicescroll",this.me=p;var E=n("body"),M=this.opt={doc:E,win:!1};if(n.extend(M,g),M.snapbackspeed=80,e)for(var L in M)void 0!==e[L]&&(M[L]=e[L]);if(M.disablemutationobserver&&(m=!1),this.doc=M.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(M.win?M.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==M.win,this.win=M.win||(this.ispage?c:this.doc),this.docscroll=this.ispage&&!this.haswrapper?c:this.win,this.body=E,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=M.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==M.rtlmode){var C=this.win[0]==a?this.body:this.win,N=C.css("writing-mode")||C.css("-webkit-writing-mode")||C.css("-ms-writing-mode")||C.css("-moz-writing-mode");"horizontal-tb"==N||"lr-tb"==N||""===N?(this.isrtlmode="rtl"==C.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==N||"tb"==N||"tb-rl"==N||"rl-tb"==N,this.isvertical="vertical-rl"==N||"tb"==N||"tb-rl"==N)}else this.isrtlmode=!0===M.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1!==M.scrollbarid)this.id=M.scrollbarid;else do{this.id="ascrail"+i++}while(l.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=M.overflowx,this.overflowy=M.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=w();var P=n.extend({},this.detected);this.canhwscroll=P.hastransform&&M.hwacceleration,this.ishwscroll=this.canhwscroll&&T.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(P.iswebkit||P.isie||P.isie11):this.hasreversehr=!(P.iswebkit||P.isie&&!P.isie10&&!P.isie11):this.hasreversehr=!1,this.istouchcapable=!1,P.cantouch||!P.hasw3ctouch&&!P.hasmstouch?!P.cantouch||P.isios||P.isandroid||!P.iswebkit&&!P.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0,M.enablemouselockapi||(P.hasmousecapture=!1,P.haspointerlock=!1),this.debounced=function(e,o,t){T&&(T.delaylist[e]||!1||(T.delaylist[e]={h:u(function(){T.delaylist[e].fn.call(T),T.delaylist[e]=!1},t)},o.call(T)),T.delaylist[e].fn=o)},this.synched=function(e,o){T.synclist[e]?T.synclist[e]=o:(T.synclist[e]=o,u(function(){T&&(T.synclist[e]&&T.synclist[e].call(T),T.synclist[e]=null)}))},this.unsynched=function(e){T.synclist[e]&&(T.synclist[e]=!1)},this.css=function(e,o){for(var t in o)T.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?T.getScrollTop():T.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?T.getScrollLeft():T.setScrollLeft(e)};var R=function(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=f(),this.df=o-e};if(R.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(f()-this.ts)/this.spd},getNow:function(){var e=(f()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return e>=1?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=f(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},P.hastranslate3d&&P.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[13]:-o[5];if(T.timerscroll&&T.timerscroll.bz)return T.timerscroll.bz.getNow()}return T.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[12]:-o[4];if(T.timerscroll&&T.timerscroll.bh)return T.timerscroll.bh.getNow()}return T.doc.translate.x},this.notifyScrollEvent=function(e){var o=l.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,a,1),o.niceevent=!0,e.dispatchEvent(o)};var _=this.isrtlmode?1:-1;P.hastranslate3d&&M.enabletranslate3d?(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])}):(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])})}else this.getScrollTop=function(){return T.docscroll.scrollTop()},this.setScrollTop=function(e){T.docscroll.scrollTop(e)},this.getScrollLeft=function(){return T.hasreversehr?T.detected.ismozilla?T.page.maxw-Math.abs(T.docscroll.scrollLeft()):T.page.maxw-T.docscroll.scrollLeft():T.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(T)return T.hasreversehr&&(e=T.detected.ismozilla?-(T.page.maxw-e):T.page.maxw-e),T.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var I={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:a.pageYOffset||l.documentElement.scrollTop,left:a.pageXOffset||l.documentElement.scrollLeft}},this.getOffset=function(){if(T.isfixed){var e=T.win.offset(),o=T.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=T.win.offset();if(!T.viewport)return t;var r=T.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(T.ishwscroll)T.rail.css({height:T.win.innerHeight()-(M.railpadding.top+M.railpadding.bottom)}),T.railh&&T.railh.css({width:T.win.innerWidth()-(M.railpadding.left+M.railpadding.right)});else{var r=T.getOffset();if(o={top:r.top,left:r.left-(M.railpadding.left+M.railpadding.right)},o.top+=x(T.win,"border-top-width",!0),o.left+=T.rail.align?T.win.outerWidth()-x(T.win,"border-right-width")-T.rail.width:x(T.win,"border-left-width"),(t=M.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),T.railslocked||T.rail.css({top:o.top,left:o.left,height:(e?e.h:T.win.innerHeight())-(M.railpadding.top+M.railpadding.bottom)}),T.zoom&&T.zoom.css({top:o.top+1,left:1==T.rail.align?o.left-20:o.left+T.rail.width+4}),T.railh&&!T.railslocked){o={top:r.top,left:r.left},(t=M.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=T.railh.align?o.top+x(T.win,"border-top-width",!0)+T.win.innerHeight()-T.railh.height:o.top+x(T.win,"border-top-width",!0),s=o.left+x(T.win,"border-left-width");T.railh.css({top:i-(M.railpadding.top+M.railpadding.bottom),left:s,width:T.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;T.railslocked||(T.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+l.documentElement.scrollLeft,e.pageY=e.clientY+l.documentElement.scrollTop),o?(r=t?T.doScrollLeft:T.doScrollTop,s=t?(e.pageX-T.railh.offset().left-T.cursorwidth/2)*T.scrollratio.x:(e.pageY-T.rail.offset().top-T.cursorheight/2)*T.scrollratio.y,T.unsynched("relativexy"),r(0|s)):(r=t?T.doScrollLeftBy:T.doScrollBy,s=t?T.scroll.x:T.scroll.y,n=t?e.pageX-T.railh.offset().left:e.pageY-T.rail.offset().top,i=t?T.view.w:T.view.h,r(s>=n?i:-i)))},T.newscrolly=T.newscrollx=0,T.hasanimationframe="requestAnimationFrame"in a,T.hascancelanimationframe="cancelAnimationFrame"in a,T.hasborderbox=!1,this.init=function(){if(T.saved.css=[],P.isoperamini)return!0;if(P.isandroid&&!("hidden"in l))return!0;M.emulatetouch=M.emulatetouch||M.touchbehavior,T.hasborderbox=a.getComputedStyle&&"border-box"===a.getComputedStyle(l.body)["box-sizing"];var e={"overflow-y":"hidden"};if((P.isie11||P.isie10)&&(e["-ms-overflow-style"]="none"),T.ishwscroll&&(this.doc.css(P.transitionstyle,P.prefixstyle+"transform 0ms ease-out"),P.transitionend&&T.bind(T.doc,P.transitionend,T.onScrollTransitionEnd,!1)),T.zindex="auto",T.ispage||"auto"!=M.zindex?T.zindex=M.zindex:T.zindex=b()||"auto",!T.ispage&&"auto"!=T.zindex&&T.zindex>s&&(s=T.zindex),T.isie&&0===T.zindex&&"auto"==M.zindex&&(T.zindex="auto"),!T.ispage||!P.isieold){var i=T.docscroll;T.ispage&&(i=T.haswrapper?T.win:T.doc),T.css(i,e),T.ispage&&(P.isie11||P.isie)&&T.css(n("html"),e),!P.isios||T.ispage||T.haswrapper||T.css(E,{"-webkit-overflow-scrolling":"touch"});var d=n(l.createElement("div"));d.css({position:"relative",top:0,float:"right",width:M.cursorwidth,height:0,"background-color":M.cursorcolor,border:M.cursorborder,"background-clip":"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),d.addClass("nicescroll-cursors"),T.cursor=d;var u=n(l.createElement("div"));u.attr("id",T.id),u.addClass("nicescroll-rails nicescroll-rails-vr");var h,p,f=["left","right","top","bottom"];for(var g in f)p=f[g],(h=M.railpadding[p]||0)&&u.css("padding-"+p,h+"px");u.append(d),u.width=Math.max(parseFloat(M.cursorwidth),d.outerWidth()),u.css({width:u.width+"px",zIndex:T.zindex,background:M.background,cursor:"default"}),u.visibility=!0,u.scrollable=!0,u.align="left"==M.railalign?0:1,T.rail=u,T.rail.drag=!1;var v=!1;!M.boxzoom||T.ispage||P.isieold||(v=l.createElement("div"),T.bind(v,"click",T.doZoom),T.bind(v,"mouseenter",function(){T.zoom.css("opacity",M.cursoropacitymax)}),T.bind(v,"mouseleave",function(){T.zoom.css("opacity",M.cursoropacitymin)}),T.zoom=n(v),T.zoom.css({cursor:"pointer",zIndex:T.zindex,backgroundImage:"url("+M.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),M.dblclickzoom&&T.bind(T.win,"dblclick",T.doZoom),P.cantouch&&M.gesturezoom&&(T.ongesturezoom=function(e){return e.scale>1.5&&T.doZoomIn(e),e.scale<.8&&T.doZoomOut(e),T.cancelEvent(e)},T.bind(T.win,"gestureend",T.ongesturezoom))),T.railh=!1;var w;if(M.horizrailenabled&&(T.css(i,{overflowX:"hidden"}),(d=n(l.createElement("div"))).css({position:"absolute",top:0,height:M.cursorwidth,width:0,backgroundColor:M.cursorcolor,border:M.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),P.isieold&&d.css("overflow","hidden"),d.addClass("nicescroll-cursors"),T.cursorh=d,(w=n(l.createElement("div"))).attr("id",T.id+"-hr"),w.addClass("nicescroll-rails nicescroll-rails-hr"),w.height=Math.max(parseFloat(M.cursorwidth),d.outerHeight()),w.css({height:w.height+"px",zIndex:T.zindex,background:M.background}),w.append(d),w.visibility=!0,w.scrollable=!0,w.align="top"==M.railvalign?0:1,T.railh=w,T.railh.drag=!1),T.ispage)u.css({position:"fixed",top:0,height:"100%"}),u.css(u.align?{right:0}:{left:0}),T.body.append(u),T.railh&&(w.css({position:"fixed",left:0,width:"100%"}),w.css(w.align?{bottom:0}:{top:0}),T.body.append(w));else{if(T.ishwscroll){"static"==T.win.css("position")&&T.css(T.win,{position:"relative"});var x="HTML"==T.win[0].nodeName?T.body:T.win;n(x).scrollTop(0).scrollLeft(0),T.zoom&&(T.zoom.css({position:"absolute",top:1,right:0,"margin-right":u.width+4}),x.append(T.zoom)),u.css({position:"absolute",top:0}),u.css(u.align?{right:0}:{left:0}),x.append(u),w&&(w.css({position:"absolute",left:0,bottom:0}),w.css(w.align?{bottom:0}:{top:0}),x.append(w))}else{T.isfixed="fixed"==T.win.css("position");var S=T.isfixed?"fixed":"absolute";T.isfixed||(T.viewport=T.getViewport(T.win[0])),T.viewport&&(T.body=T.viewport,/fixed|absolute/.test(T.viewport.css("position"))||T.css(T.viewport,{position:"relative"})),u.css({position:S}),T.zoom&&T.zoom.css({position:S}),T.updateScrollBar(),T.body.append(u),T.zoom&&T.body.append(T.zoom),T.railh&&(w.css({position:S}),T.body.append(w))}P.isios&&T.css(T.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),M.disableoutline&&(P.isie&&T.win.attr("hideFocus","true"),P.iswebkit&&T.win.css("outline","none"))}if(!1===M.autohidemode?(T.autohidedom=!1,T.rail.css({opacity:M.cursoropacitymax}),T.railh&&T.railh.css({opacity:M.cursoropacitymax})):!0===M.autohidemode||"leave"===M.autohidemode?(T.autohidedom=n().add(T.rail),P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursor)),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh)),T.railh&&P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"scroll"==M.autohidemode?(T.autohidedom=n().add(T.rail),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh))):"cursor"==M.autohidemode?(T.autohidedom=n().add(T.cursor),T.railh&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"hidden"==M.autohidemode&&(T.autohidedom=!1,T.hide(),T.railslocked=!1),P.cantouch||T.istouchcapable||M.emulatetouch||P.hasmstouch){T.scrollmom=new y(T);T.ontouchstart=function(e){if(T.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(T.hasmoving=!1,T.scrollmom.timer&&(T.triggerScrollEnd(),T.scrollmom.stop()),!T.railslocked){var o=T.getTarget(e);if(o&&/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return T.stopPropagation(e);var t="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),T.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,st:T.getScrollTop(),sl:T.getScrollLeft(),pt:2,dl:!1,tg:o},T.ispage||!M.directionlockdeadzone)T.rail.drag.dl="f";else{var i={w:c.width(),h:c.height()},s=T.getContentSize(),l=s.h-i.h,a=s.w-i.w;T.rail.scrollable&&!T.railh.scrollable?T.rail.drag.ck=l>0&&"v":!T.rail.scrollable&&T.railh.scrollable?T.rail.drag.ck=a>0&&"h":T.rail.drag.ck=!1}if(M.emulatetouch&&T.isiframe&&P.isie){var d=T.win.position();T.rail.drag.x+=d.left,T.rail.drag.y+=d.top}if(T.hasmoving=!1,T.lastmouseup=!1,T.scrollmom.reset(e.clientX,e.clientY),o&&t){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return P.hasmousecapture&&o.setCapture(),M.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(T.hasmoving)return!1;o._onclick.call(this,e)}),T.cancelEvent(e)):T.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(n(o).attr("type"))&&(T.preventclick={tg:o,click:!1})}}},T.ontouchend=function(e){if(!T.rail.drag)return!0;if(2==T.rail.drag.pt){if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;T.rail.drag=!1;var o="mouseup"===e.type;if(T.hasmoving&&(T.scrollmom.doMomentum(),T.lastmouseup=!0,T.hideCursor(),P.hasmousecapture&&l.releaseCapture(),o))return T.cancelEvent(e)}else if(1==T.rail.drag.pt)return T.onmouseup(e)};var z=M.emulatetouch&&T.isiframe&&!P.hasmousecapture,k=.3*M.directionlockdeadzone|0;T.ontouchmove=function(e,o){if(!T.rail.drag)return!0;if(e.targetTouches&&M.preventmultitouchscrolling&&e.targetTouches.length>1)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2==T.rail.drag.pt){"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY);var t,r;if(r=t=0,z&&!o){var i=T.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-T.rail.drag.y,a=e.clientX+r,c=a-T.rail.drag.x,d=T.rail.drag.st-n;if(T.ishwscroll&&M.bouncescroll)d<0?d=Math.round(d/2):d>T.page.maxh&&(d=T.page.maxh+Math.round((d-T.page.maxh)/2));else if(d<0?(d=0,s=0):d>T.page.maxh&&(d=T.page.maxh,s=0),0===s&&!T.hasmoving)return T.ispage||(T.rail.drag=!1),!0;var u=T.getScrollLeft();if(T.railh&&T.railh.scrollable&&(u=T.isrtlmode?c-T.rail.drag.sl:T.rail.drag.sl-c,T.ishwscroll&&M.bouncescroll?u<0?u=Math.round(u/2):u>T.page.maxw&&(u=T.page.maxw+Math.round((u-T.page.maxw)/2)):(u<0&&(u=0,a=0),u>T.page.maxw&&(u=T.page.maxw,a=0))),!T.hasmoving){if(T.rail.drag.y===e.clientY&&T.rail.drag.x===e.clientX)return T.cancelEvent(e);var h=Math.abs(n),p=Math.abs(c),m=M.directionlockdeadzone;if(T.rail.drag.ck?"v"==T.rail.drag.ck?p>m&&h<=k?T.rail.drag=!1:h>m&&(T.rail.drag.dl="v"):"h"==T.rail.drag.ck&&(h>m&&p<=k?T.rail.drag=!1:p>m&&(T.rail.drag.dl="h")):h>m&&p>m?T.rail.drag.dl="f":h>m?T.rail.drag.dl=p>k?"f":"v":p>m&&(T.rail.drag.dl=h>k?"f":"h"),!T.rail.drag.dl)return T.cancelEvent(e);T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0}return T.preventclick&&!T.preventclick.click&&(T.preventclick.click=T.preventclick.tg.onclick||!1,T.preventclick.tg.onclick=T.onpreventclick),T.rail.drag.dl&&("v"==T.rail.drag.dl?u=T.rail.drag.sl:"h"==T.rail.drag.dl&&(d=T.rail.drag.st)),T.synched("touchmove",function(){T.rail.drag&&2==T.rail.drag.pt&&(T.prepareTransition&&T.resetTransition(),T.rail.scrollable&&T.setScrollTop(d),T.scrollmom.update(a,s),T.railh&&T.railh.scrollable?(T.setScrollLeft(u),T.showCursor(d,u)):T.showCursor(d),P.isie10&&l.selection.clear())}),T.cancelEvent(e)}return 1==T.rail.drag.pt?T.onmousemove(e):void 0},T.ontouchstartCursor=function(e,o){if(!T.rail.drag||3==T.rail.drag.pt){if(T.locked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:T.scroll.x,sy:T.scroll.y,pt:3,hr:!!o};var t=T.getTarget(e);return!T.ispage&&P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.cancelEvent(e)}},T.ontouchendCursor=function(e){if(T.rail.drag){if(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),3!=T.rail.drag.pt)return;return T.rail.drag=!1,T.cancelEvent(e)}},T.ontouchmoveCursor=function(e){if(T.rail.drag){if(3!=T.rail.drag.pt)return;if(T.cursorfreezed=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.touches[0].clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.touches[0].clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("touchmove",function(){T.rail.drag&&3==T.rail.drag.pt&&(T.showCursor(),T.rail.drag.hr?T.doScrollLeft(Math.round(T.scroll.x*T.scrollratio.x),M.cursordragspeed):T.doScrollTop(Math.round(T.scroll.y*T.scrollratio.y),M.cursordragspeed))}),T.cancelEvent(e)}}}if(T.onmousedown=function(e,o){if(!T.rail.drag||1==T.rail.drag.pt){if(T.railslocked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,pt:1,hr:o||!1};var t=T.getTarget(e);return P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.hasmoving=!1,T.cancelEvent(e)}},T.onmouseup=function(e){if(T.rail.drag)return 1!=T.rail.drag.pt||(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),T.rail.drag=!1,T.cursorfreezed=!1,T.hasmoving&&T.triggerScrollEnd(),T.cancelEvent(e))},T.onmousemove=function(e){if(T.rail.drag){if(1!==T.rail.drag.pt)return;if(P.ischrome&&0===e.which)return T.onmouseup(e);if(T.cursorfreezed=!0,T.hasmoving||T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("mousemove",function(){T.cursorfreezed&&(T.showCursor(),T.rail.drag.hr?T.scrollLeft(Math.round(T.scroll.x*T.scrollratio.x)):T.scrollTop(Math.round(T.scroll.y*T.scrollratio.y)))}),T.cancelEvent(e)}T.checkarea=0},P.cantouch||M.emulatetouch)T.onpreventclick=function(e){if(T.preventclick)return T.preventclick.tg.onclick=T.preventclick.click,T.preventclick=!1,T.cancelEvent(e)},T.onclick=!P.isios&&function(e){return!T.lastmouseup||(T.lastmouseup=!1,T.cancelEvent(e))},M.grabcursorenabled&&P.cursorgrabvalue&&(T.css(T.ispage?T.doc:T.win,{cursor:P.cursorgrabvalue}),T.css(T.rail,{cursor:P.cursorgrabvalue}));else{var L=function(e){if(T.selectiondrag){if(e){var o=T.win.outerHeight(),t=e.pageY-T.selectiondrag.top;t>0&&t<o&&(t=0),t>=o&&(t-=o),T.selectiondrag.df=t}if(0!==T.selectiondrag.df){var r=-2*T.selectiondrag.df/6|0;T.doScrollBy(r),T.debounced("doselectionscroll",function(){L()},50)}}};T.hasTextSelected="getSelection"in l?function(){return l.getSelection().rangeCount>0}:"selection"in l?function(){return"None"!=l.selection.type}:function(){return!1},T.onselectionstart=function(e){T.ispage||(T.selectiondrag=T.win.offset())},T.onselectionend=function(e){T.selectiondrag=!1},T.onselectiondrag=function(e){T.selectiondrag&&T.hasTextSelected()&&T.debounced("selectionscroll",function(){L(e)},250)}}if(P.hasw3ctouch?(T.css(T.ispage?n("html"):T.win,{"touch-action":"none"}),T.css(T.rail,{"touch-action":"none"}),T.css(T.cursor,{"touch-action":"none"}),T.bind(T.win,"pointerdown",T.ontouchstart),T.bind(l,"pointerup",T.ontouchend),T.delegate(l,"pointermove",T.ontouchmove)):P.hasmstouch?(T.css(T.ispage?n("html"):T.win,{"-ms-touch-action":"none"}),T.css(T.rail,{"-ms-touch-action":"none"}),T.css(T.cursor,{"-ms-touch-action":"none"}),T.bind(T.win,"MSPointerDown",T.ontouchstart),T.bind(l,"MSPointerUp",T.ontouchend),T.delegate(l,"MSPointerMove",T.ontouchmove),T.bind(T.cursor,"MSGestureHold",function(e){e.preventDefault()}),T.bind(T.cursor,"contextmenu",function(e){e.preventDefault()})):P.cantouch&&(T.bind(T.win,"touchstart",T.ontouchstart,!1,!0),T.bind(l,"touchend",T.ontouchend,!1,!0),T.bind(l,"touchcancel",T.ontouchend,!1,!0),T.delegate(l,"touchmove",T.ontouchmove,!1,!0)),M.emulatetouch&&(T.bind(T.win,"mousedown",T.ontouchstart,!1,!0),T.bind(l,"mouseup",T.ontouchend,!1,!0),T.bind(l,"mousemove",T.ontouchmove,!1,!0)),(M.cursordragontouch||!P.cantouch&&!M.emulatetouch)&&(T.rail.css({cursor:"default"}),T.railh&&T.railh.css({cursor:"default"}),T.jqbind(T.rail,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.rail,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.rail,"click",function(e){T.doRailClick(e,!1,!1)}),T.bind(T.rail,"dblclick",function(e){T.doRailClick(e,!0,!1)}),T.bind(T.cursor,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursor,"dblclick",function(e){T.cancelEvent(e)})),T.railh&&(T.jqbind(T.railh,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.railh,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.railh,"click",function(e){T.doRailClick(e,!1,!0)}),T.bind(T.railh,"dblclick",function(e){T.doRailClick(e,!0,!0)}),T.bind(T.cursorh,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursorh,"dblclick",function(e){T.cancelEvent(e)})))),M.cursordragontouch&&(this.istouchcapable||P.cantouch)&&(T.bind(T.cursor,"touchstart",T.ontouchstartCursor),T.bind(T.cursor,"touchmove",T.ontouchmoveCursor),T.bind(T.cursor,"touchend",T.ontouchendCursor),T.cursorh&&T.bind(T.cursorh,"touchstart",function(e){T.ontouchstartCursor(e,!0)}),T.cursorh&&T.bind(T.cursorh,"touchmove",T.ontouchmoveCursor),T.cursorh&&T.bind(T.cursorh,"touchend",T.ontouchendCursor)),M.emulatetouch||P.isandroid||P.isios?(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.ontouchend),T.onclick&&T.bind(l,"click",T.onclick),M.cursordragontouch?(T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.cursorh&&T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onmouseup)):(T.bind(T.rail,"mousedown",function(e){e.preventDefault()}),T.railh&&T.bind(T.railh,"mousedown",function(e){e.preventDefault()}))):(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.onmouseup),T.bind(l,"mousemove",T.onmousemove),T.onclick&&T.bind(l,"click",T.onclick),T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.railh&&(T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.bind(T.cursorh,"mouseup",T.onmouseup)),!T.ispage&&M.enablescrollonselection&&(T.bind(T.win[0],"mousedown",T.onselectionstart),T.bind(l,"mouseup",T.onselectionend),T.bind(T.cursor,"mouseup",T.onselectionend),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onselectionend),T.bind(l,"mousemove",T.onselectiondrag)),T.zoom&&(T.jqbind(T.zoom,"mouseenter",function(){T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.zoom,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}))),M.enablemousewheel&&(T.isiframe||T.mousewheel(P.isie&&T.ispage?l:T.win,T.onmousewheel),T.mousewheel(T.rail,T.onmousewheel),T.railh&&T.mousewheel(T.railh,T.onmousewheelhr)),T.ispage||P.cantouch||/HTML|^BODY/.test(T.win[0].nodeName)||(T.win.attr("tabindex")||T.win.attr({tabindex:++r}),T.bind(T.win,"focus",function(e){o=T.getTarget(e).id||T.getTarget(e)||!1,T.hasfocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"blur",function(e){o=!1,T.hasfocus=!1}),T.bind(T.win,"mouseenter",function(e){t=T.getTarget(e).id||T.getTarget(e)||!1,T.hasmousefocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"mouseleave",function(e){t=!1,T.hasmousefocus=!1,T.rail.drag||T.hideCursor()})),T.onkeypress=function(e){if(T.railslocked&&0===T.page.maxh)return!0;e=e||a.event;var r=T.getTarget(e);if(r&&/INPUT|TEXTAREA|SELECT|OPTION/.test(r.nodeName)&&(!(r.getAttribute("type")||r.type||!1)||!/submit|button|cancel/i.tp))return!0;if(n(r).attr("contenteditable"))return!0;if(T.hasfocus||T.hasmousefocus&&!o||T.ispage&&!o&&!t){var i=e.keyCode;if(T.railslocked&&27!=i)return T.cancelEvent(e);var s=e.ctrlKey||!1,l=e.shiftKey||!1,c=!1;switch(i){case 38:case 63233:T.doScrollBy(72),c=!0;break;case 40:case 63235:T.doScrollBy(-72),c=!0;break;case 37:case 63232:T.railh&&(s?T.doScrollLeft(0):T.doScrollLeftBy(72),c=!0);break;case 39:case 63234:T.railh&&(s?T.doScrollLeft(T.page.maxw):T.doScrollLeftBy(-72),c=!0);break;case 33:case 63276:T.doScrollBy(T.view.h),c=!0;break;case 34:case 63277:T.doScrollBy(-T.view.h),c=!0;break;case 36:case 63273:T.railh&&s?T.doScrollPos(0,0):T.doScrollTo(0),c=!0;break;case 35:case 63275:T.railh&&s?T.doScrollPos(T.page.maxw,T.page.maxh):T.doScrollTo(T.page.maxh),c=!0;break;case 32:M.spacebarenabled&&(l?T.doScrollBy(T.view.h):T.doScrollBy(-T.view.h),c=!0);break;case 27:T.zoomactive&&(T.doZoom(),c=!0)}if(c)return T.cancelEvent(e)}},M.enablekeyboard&&T.bind(l,P.isopera&&!P.isopera12?"keypress":"keydown",T.onkeypress),T.bind(l,"keydown",function(e){(e.ctrlKey||!1)&&(T.wheelprevented=!0)}),T.bind(l,"keyup",function(e){e.ctrlKey||!1||(T.wheelprevented=!1)}),T.bind(a,"blur",function(e){T.wheelprevented=!1}),T.bind(a,"resize",T.onscreenresize),T.bind(a,"orientationchange",T.onscreenresize),T.bind(a,"load",T.lazyResize),P.ischrome&&!T.ispage&&!T.haswrapper){var C=T.win.attr("style"),N=parseFloat(T.win.css("width"))+1;T.win.css("width",N),T.synched("chromefix",function(){T.win.attr("style",C)})}if(T.onAttributeChange=function(e){T.lazyResize(T.isieold?250:30)},M.enableobserver&&(T.isie11||!1===m||(T.observerbody=new m(function(e){if(e.forEach(function(e){if("attributes"==e.type)return E.hasClass("modal-open")&&E.hasClass("modal-dialog")&&!n.contains(n(".modal-dialog")[0],T.doc[0])?T.hide():T.show()}),T.me.clientWidth!=T.page.width||T.me.clientHeight!=T.page.height)return T.lazyResize(30)}),T.observerbody.observe(l.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!T.ispage&&!T.haswrapper)){var R=T.win[0];!1!==m?(T.observer=new m(function(e){e.forEach(T.onAttributeChange)}),T.observer.observe(R,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),T.observerremover=new m(function(e){e.forEach(function(e){if(e.removedNodes.length>0)for(var o in e.removedNodes)if(T&&e.removedNodes[o]===R)return T.remove()})}),T.observerremover.observe(R.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(T.bind(R,P.isie&&!P.isie9?"propertychange":"DOMAttrModified",T.onAttributeChange),P.isie9&&R.attachEvent("onpropertychange",T.onAttributeChange),T.bind(R,"DOMNodeRemoved",function(e){e.target===R&&T.remove()}))}!T.ispage&&M.boxzoom&&T.bind(a,"resize",T.resizeZoom),T.istextarea&&(T.bind(T.win,"keydown",T.lazyResize),T.bind(T.win,"mouseup",T.lazyResize)),T.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var _=function(){T.iframexd=!1;var o;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){T.iframexd=!0,o=!1}if(T.iframexd)return"console"in a&&console.log("NiceScroll error: policy restriced iframe"),!0;if(T.forcescreen=!0,T.isiframe&&(T.iframe={doc:n(o),html:T.doc.contents().find("html")[0],body:T.doc.contents().find("body")[0]},T.getContentSize=function(){return{w:Math.max(T.iframe.html.scrollWidth,T.iframe.body.scrollWidth),h:Math.max(T.iframe.html.scrollHeight,T.iframe.body.scrollHeight)}},T.docscroll=n(T.iframe.body)),!P.isios&&M.iframeautoresize&&!T.isiframe){T.win.scrollTop(0),T.doc.height("");var t=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);T.doc.height(t)}T.lazyResize(30),T.css(n(T.iframe.body),e),P.isios&&T.haswrapper&&T.css(n(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?T.bind(this.contentWindow,"scroll",T.onscroll):T.bind(o,"scroll",T.onscroll),M.enablemousewheel&&T.mousewheel(o,T.onmousewheel),M.enablekeyboard&&T.bind(o,P.isopera?"keypress":"keydown",T.onkeypress),P.cantouch?(T.bind(o,"touchstart",T.ontouchstart),T.bind(o,"touchmove",T.ontouchmove)):M.emulatetouch&&(T.bind(o,"mousedown",T.ontouchstart),T.bind(o,"mousemove",function(e){return T.ontouchmove(e,!0)}),M.grabcursorenabled&&P.cursorgrabvalue&&T.css(n(o.body),{cursor:P.cursorgrabvalue})),T.bind(o,"mouseup",T.ontouchend),T.zoom&&(M.dblclickzoom&&T.bind(o,"dblclick",T.doZoom),T.ongesturezoom&&T.bind(o,"gestureend",T.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){_.call(T.doc[0],!1)},500),T.bind(this.doc,"load",_)}},this.showCursor=function(e,o){if(T.cursortimeout&&(clearTimeout(T.cursortimeout),T.cursortimeout=0),T.rail){if(T.autohidedom&&(T.autohidedom.stop().css({opacity:M.cursoropacitymax}),T.cursoractive=!0),T.rail.drag&&1==T.rail.drag.pt||(void 0!==e&&!1!==e&&(T.scroll.y=e/T.scrollratio.y|0),void 0!==o&&(T.scroll.x=o/T.scrollratio.x|0)),T.cursor.css({height:T.cursorheight,top:T.scroll.y}),T.cursorh){var t=T.hasreversehr?T.scrollvaluemaxw-T.scroll.x:T.scroll.x;T.cursorh.css({width:T.cursorwidth,left:!T.rail.align&&T.rail.visibility?t+T.rail.width:t}),T.cursoractive=!0}T.zoom&&T.zoom.stop().css({opacity:M.cursoropacitymax})}},this.hideCursor=function(e){T.cursortimeout||T.rail&&T.autohidedom&&(T.hasmousefocus&&"leave"===M.autohidemode||(T.cursortimeout=setTimeout(function(){T.rail.active&&T.showonmouseevent||(T.autohidedom.stop().animate({opacity:M.cursoropacitymin}),T.zoom&&T.zoom.stop().animate({opacity:M.cursoropacitymin}),T.cursoractive=!1),T.cursortimeout=0},e||M.hidecursordelay)))},this.noticeCursor=function(e,o,t){T.showCursor(o,t),T.rail.active||T.hideCursor(e)},this.getContentSize=T.ispage?function(){return{w:Math.max(l.body.scrollWidth,l.documentElement.scrollWidth),h:Math.max(l.body.scrollHeight,l.documentElement.scrollHeight)}}:T.haswrapper?function(){return{w:T.doc[0].offsetWidth,h:T.doc[0].offsetHeight}}:function(){return{w:T.docscroll[0].scrollWidth,h:T.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!T||!T.win)return!1;var t=T.page.maxh,r=T.page.maxw,i=T.view.h,s=T.view.w;if(T.view={w:T.ispage?T.win.width():T.win[0].clientWidth,h:T.ispage?T.win.height():T.win[0].clientHeight},T.page=o||T.getContentSize(),T.page.maxh=Math.max(0,T.page.h-T.view.h),T.page.maxw=Math.max(0,T.page.w-T.view.w),T.page.maxh==t&&T.page.maxw==r&&T.view.w==s&&T.view.h==i){if(T.ispage)return T;var n=T.win.offset();if(T.lastposition){var l=T.lastposition;if(l.top==n.top&&l.left==n.left)return T}T.lastposition=n}return 0===T.page.maxh?(T.hideRail(),T.scrollvaluemax=0,T.scroll.y=0,T.scrollratio.y=0,T.cursorheight=0,T.setScrollTop(0),T.rail&&(T.rail.scrollable=!1)):(T.page.maxh-=M.railpadding.top+M.railpadding.bottom,T.rail.scrollable=!0),0===T.page.maxw?(T.hideRailHr(),T.scrollvaluemaxw=0,T.scroll.x=0,T.scrollratio.x=0,T.cursorwidth=0,T.setScrollLeft(0),T.railh&&(T.railh.scrollable=!1)):(T.page.maxw-=M.railpadding.left+M.railpadding.right,T.railh&&(T.railh.scrollable=M.horizrailenabled)),T.railslocked=T.locked||0===T.page.maxh&&0===T.page.maxw,T.railslocked?(T.ispage||T.updateScrollBar(T.view),!1):(T.hidden||(T.rail.visibility||T.showRail(),T.railh&&!T.railh.visibility&&T.showRailHr()),T.istextarea&&T.win.css("resize")&&"none"!=T.win.css("resize")&&(T.view.h-=20),T.cursorheight=Math.min(T.view.h,Math.round(T.view.h*(T.view.h/T.page.h))),T.cursorheight=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorheight),T.cursorwidth=Math.min(T.view.w,Math.round(T.view.w*(T.view.w/T.page.w))),T.cursorwidth=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorwidth),T.scrollvaluemax=T.view.h-T.cursorheight-(M.railpadding.top+M.railpadding.bottom),T.hasborderbox||(T.scrollvaluemax-=T.cursor[0].offsetHeight-T.cursor[0].clientHeight),T.railh&&(T.railh.width=T.page.maxh>0?T.view.w-T.rail.width:T.view.w,T.scrollvaluemaxw=T.railh.width-T.cursorwidth-(M.railpadding.left+M.railpadding.right)),T.ispage||T.updateScrollBar(T.view),T.scrollratio={x:T.page.maxw/T.scrollvaluemaxw,y:T.page.maxh/T.scrollvaluemax},T.getScrollTop()>T.page.maxh?T.doScrollTop(T.page.maxh):(T.scroll.y=T.getScrollTop()/T.scrollratio.y|0,T.scroll.x=T.getScrollLeft()/T.scrollratio.x|0,T.cursoractive&&T.noticeCursor()),T.scroll.y&&0===T.getScrollTop()&&T.doScrollTo(T.scroll.y*T.scrollratio.y|0),T)},this.resize=T.onResize;var O=0;this.onscreenresize=function(e){clearTimeout(O);var o=!T.ispage&&!T.haswrapper;o&&T.hideRails(),O=setTimeout(function(){T&&(o&&T.showRails(),T.resize()),O=0},120)},this.lazyResize=function(e){return clearTimeout(O),e=isNaN(e)?240:e,O=setTimeout(function(){T&&T.resize(),O=0},e),T},this.jqbind=function(e,o,t){T.events.push({e:e,n:o,f:t,q:!0}),n(e).on(o,t)},this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in l.createElement("div"))T._bind(r,"wheel",o,t||!1);else{var i=void 0!==l.onmousewheel?"mousewheel":"DOMMouseScroll";S(r,i,o,t||!1),"DOMMouseScroll"==i&&S(r,"MozMousePixelScroll",o,t||!1)}};var Y=!1;if(P.haseventlistener){try{var H=Object.defineProperty({},"passive",{get:function(){Y=!0}});a.addEventListener("test",null,H)}catch(e){}this.stopPropagation=function(e){return!!e&&((e=e.original?e.original:e).stopPropagation(),!1)},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},a.constructor.prototype.addEventListener=l.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},a.constructor.prototype.removeEventListener=l.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||a.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||a.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=d[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;r>=0;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},T.bind(e,o,s.f,r,i),d[o]=s),T.ispage?(s.a=[T.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(T.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=d[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n<l;n++)s.a[n]===T.id&&(s.a.splice(n),s.l.splice(n),0===s.a.length&&(T._unbind(e,o,s.l.f),d[o]=null))},this.bind=function(e,o,t,r,i){var s="jquery"in e?e[0]:e;T._bind(s,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){T.events.push({e:e,n:o,f:t,b:r,q:!1}),Y&&i?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){d[o]?T.undelegate(e,o,t,r):e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<T.events.length;e++){var o=T.events[e];o.q?o.e.unbind(o.n,o.f):T._unbind(o.e,o.n,o.f,o.b)}},this.showRails=function(){return T.showRail().showRailHr()},this.showRail=function(){return 0===T.page.maxh||!T.ispage&&"none"==T.win.css("display")||(T.rail.visibility=!0,T.rail.css("display","block")),T},this.showRailHr=function(){return T.railh&&(0===T.page.maxw||!T.ispage&&"none"==T.win.css("display")||(T.railh.visibility=!0,T.railh.css("display","block"))),T},this.hideRails=function(){return T.hideRail().hideRailHr()},this.hideRail=function(){return T.rail.visibility=!1,T.rail.css("display","none"),T},this.hideRailHr=function(){return T.railh&&(T.railh.visibility=!1,T.railh.css("display","none")),T},this.show=function(){return T.hidden=!1,T.railslocked=!1,T.showRails()},this.hide=function(){return T.hidden=!0,T.railslocked=!0,T.hideRails()},this.toggle=function(){return T.hidden?T.show():T.hide()},this.remove=function(){T.stop(),T.cursortimeout&&clearTimeout(T.cursortimeout);for(var e in T.delaylist)T.delaylist[e]&&h(T.delaylist[e].h);T.doZoomOut(),T.unbindAll(),P.isie9&&T.win[0].detachEvent("onpropertychange",T.onAttributeChange),!1!==T.observer&&T.observer.disconnect(),!1!==T.observerremover&&T.observerremover.disconnect(),!1!==T.observerbody&&T.observerbody.disconnect(),T.events=null,T.cursor&&T.cursor.remove(),T.cursorh&&T.cursorh.remove(),T.rail&&T.rail.remove(),T.railh&&T.railh.remove(),T.zoom&&T.zoom.remove();for(var o=0;o<T.saved.css.length;o++){var t=T.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}T.saved=!1,T.me.data("__nicescroll","");var r=n.nicescroll;r.each(function(e){if(this&&this.id===T.id){delete r[e];for(var o=++e;o<r.length;o++,e++)r[e]=r[o];--r.length&&delete r[r.length]}});for(var i in T)T[i]=null,delete T[i];T=null},this.scrollstart=function(e){return this.onscrollstart=e,T},this.scrollend=function(e){return this.onscrollend=e,T},this.scrollcancel=function(e){return this.onscrollcancel=e,T},this.zoomin=function(e){return this.onzoomin=e,T},this.zoomout=function(e){return this.onzoomout=e,T},this.isScrollable=function(e){var o=e.target?e.target:e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o),r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r))return o.clientHeight!=o.scrollHeight;o=!!o.parentNode&&o.parentNode}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(t.getNiceScroll().length>0)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){if(T.onscrollstart){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:T.newscrollx,y:T.newscrolly},speed:i};T.onscrollstart.call(T,s)}},this.triggerScrollEnd=function(){if(T.onscrollend){var e=T.getScrollLeft(),o=T.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};T.onscrollend.call(T,t)}};var B=0,X=0,D=0,A=1,q=!1;if(this.onmousewheel=function(e){if(T.wheelprevented||T.locked)return!1;if(T.railslocked)return T.debounced("checkunlock",T.resize,250),!1;if(T.rail.drag)return T.cancelEvent(e);if("auto"===M.oneaxismousemode&&0!==e.deltaX&&(M.oneaxismousemode=!1),M.oneaxismousemode&&0===e.deltaX&&!T.rail.scrollable)return!T.railh||!T.railh.scrollable||T.onmousewheelhr(e);var o=f(),t=!1;if(M.preservenativescrolling&&T.checkarea+600<o&&(T.nativescrollingarea=T.isScrollable(e),t=!0),T.checkarea=o,T.nativescrollingarea)return!0;var r=k(e,!1,t);return r&&(T.checkarea=0),r},this.onmousewheelhr=function(e){if(!T.wheelprevented){if(T.railslocked||!T.railh.scrollable)return!0;if(T.rail.drag)return T.cancelEvent(e);var o=f(),t=!1;return M.preservenativescrolling&&T.checkarea+600<o&&(T.nativescrollingarea=T.isScrollable(e),t=!0),T.checkarea=o,!!T.nativescrollingarea||(T.railslocked?T.cancelEvent(e):k(e,!0,t))}},this.stop=function(){return T.cancelScroll(),T.scrollmon&&T.scrollmon.stop(),T.cursorfreezed=!1,T.scroll.y=Math.round(T.getScrollTop()*(1/T.scrollratio.y)),T.noticeCursor(),T},this.getTransitionSpeed=function(e){return 80+e/72*M.scrollspeed|0},M.smoothscroll)if(T.ishwscroll&&P.hastransition&&M.usetransition&&M.smoothscroll){var j="";this.resetTransition=function(){j="",T.doc.css(P.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(e,o){var t=o?e:T.getTransitionSpeed(e),r=t+"ms";return j!==r&&(j=r,T.doc.css(P.prefixstyle+"transition-duration",r)),t},this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.cursorupdate={running:!1,start:function(){var e=this;if(!e.running){e.running=!0;var o=function(){e.running&&u(o),T.showCursor(T.getScrollTop(),T.getScrollLeft()),T.notifyScrollEvent(T.win[0])};u(o)}},stop:function(){this.running=!1}},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();if(((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll(),M.bouncescroll?(o<0?o=o/2|0:o>T.page.maxh&&(o=T.page.maxh+(o-T.page.maxh)/2|0),e<0?e=e/2|0:e>T.page.maxw&&(e=T.page.maxw+(e-T.page.maxw)/2|0)):(o<0?o=0:o>T.page.maxh&&(o=T.page.maxh),e<0?e=0:e>T.page.maxw&&(e=T.page.maxw)),T.scrollrunning&&e==T.newscrollx&&o==T.newscrolly)return!1;T.newscrolly=o,T.newscrollx=e;var s=T.getScrollTop(),n=T.getScrollLeft(),l={};l.x=e-n,l.y=o-s;var a=0|Math.sqrt(l.x*l.x+l.y*l.y),c=T.prepareTransition(a);T.scrollrunning||(T.scrollrunning=!0,T.triggerScrollStart(n,s,e,o,c),T.cursorupdate.start()),T.scrollendtrapped=!0,P.transitionend||(T.scrollendtrapped&&clearTimeout(T.scrollendtrapped),T.scrollendtrapped=setTimeout(T.onScrollTransitionEnd,c)),T.setScrollTop(T.newscrolly),T.setScrollLeft(T.newscrollx)},this.cancelScroll=function(){if(!T.scrollendtrapped)return!0;var e=T.getScrollTop(),o=T.getScrollLeft();return T.scrollrunning=!1,P.transitionend||clearTimeout(P.transitionend),T.scrollendtrapped=!1,T.resetTransition(),T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.timerscroll&&T.timerscroll.tm&&clearInterval(T.timerscroll.tm),T.timerscroll=!1,T.cursorfreezed=!1,T.cursorupdate.stop(),T.showCursor(e,o),T},this.onScrollTransitionEnd=function(){if(T.scrollendtrapped){var e=T.getScrollTop(),o=T.getScrollLeft();if(e<0?e=0:e>T.page.maxh&&(e=T.page.maxh),o<0?o=0:o>T.page.maxw&&(o=T.page.maxw),e!=T.newscrolly||o!=T.newscrollx)return T.doScrollPos(o,e,M.snapbackspeed);T.scrollrunning&&T.triggerScrollEnd(),T.scrollrunning=!1,T.scrollendtrapped=!1,T.resetTransition(),T.timerscroll=!1,T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.cursorupdate.stop(),T.noticeCursor(!1,e,o),T.cursorfreezed=!1}}}else this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll();var s=!1;if(T.bouncescroll&&T.rail.visibility||(o<0?(o=0,s=!0):o>T.page.maxh&&(o=T.page.maxh,s=!0)),T.bouncescroll&&T.railh.visibility||(e<0?(e=0,s=!0):e>T.page.maxw&&(e=T.page.maxw,s=!0)),T.scrollrunning&&T.newscrolly===o&&T.newscrollx===e)return!0;T.newscrolly=o,T.newscrollx=e,T.dst={},T.dst.x=e-i,T.dst.y=o-r,T.dst.px=i,T.dst.py=r;var n=0|Math.sqrt(T.dst.x*T.dst.x+T.dst.y*T.dst.y),l=T.getTransitionSpeed(n);T.bzscroll={};var a=s?1:.58;T.bzscroll.x=new R(i,T.newscrollx,l,0,0,a,1),T.bzscroll.y=new R(r,T.newscrolly,l,0,0,a,1);f();var c=function(){if(T.scrollrunning){var e=T.bzscroll.y.getPos();T.setScrollLeft(T.bzscroll.x.getNow()),T.setScrollTop(T.bzscroll.y.getNow()),e<=1?T.timer=u(c):(T.scrollrunning=!1,T.timer=0,T.triggerScrollEnd())}};T.scrollrunning||(T.triggerScrollStart(i,r,e,o,l),T.scrollrunning=!0,T.timer=u(c))},this.cancelScroll=function(){return T.timer&&h(T.timer),T.timer=0,T.bzscroll=!1,T.scrollrunning=!1,T};else this.doScrollLeft=function(e,o){var t=T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>T.page.maxw?T.page.maxw:e;r<0&&(r=0);var i=o>T.page.maxh?T.page.maxh:o;i<0&&(i=0),T.synched("scroll",function(){T.setScrollTop(i),T.setScrollLeft(r)})},this.cancelScroll=function(){};this.doScrollBy=function(e,o){z(0,e)},this.doScrollLeftBy=function(e,o){z(e,0)},this.doScrollTo=function(e,o){var t=o?Math.round(e*T.scrollratio.y):e;t<0?t=0:t>T.page.maxh&&(t=T.page.maxh),T.cursorfreezed=!1,T.doScrollTop(e)},this.checkContentSize=function(){var e=T.getContentSize();e.h==T.page.h&&e.w==T.page.w||T.resize(!1,e)},T.onscroll=function(e){T.rail.drag||T.cursorfreezed||T.synched("scroll",function(){T.scroll.y=Math.round(T.getScrollTop()/T.scrollratio.y),T.railh&&(T.scroll.x=Math.round(T.getScrollLeft()/T.scrollratio.x)),T.noticeCursor()})},T.bind(T.docscroll,"scroll",T.onscroll),this.doZoomIn=function(e){if(!T.zoomactive){T.zoomactive=!0,T.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=T.win[0].style;for(var r in o){var i=o[r];T.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}T.zoomrestore.style.width=T.win.css("width"),T.zoomrestore.style.height=T.win.css("height"),T.zoomrestore.padding={w:T.win.outerWidth()-T.win.width(),h:T.win.outerHeight()-T.win.height()},P.isios4&&(T.zoomrestore.scrollTop=c.scrollTop(),c.scrollTop(0)),T.win.css({position:P.isios4?"absolute":"fixed",top:0,left:0,zIndex:s+100,margin:0});var n=T.win.css("backgroundColor");return(""===n||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n))&&T.win.css("backgroundColor","#fff"),T.rail.css({zIndex:s+101}),T.zoom.css({zIndex:s+102}),T.zoom.css("backgroundPosition","0 -18px"),T.resizeZoom(),T.onzoomin&&T.onzoomin.call(T),T.cancelEvent(e)}},this.doZoomOut=function(e){if(T.zoomactive)return T.zoomactive=!1,T.win.css("margin",""),T.win.css(T.zoomrestore.style),P.isios4&&c.scrollTop(T.zoomrestore.scrollTop),T.rail.css({"z-index":T.zindex}),T.zoom.css({"z-index":T.zindex}),T.zoomrestore=!1,T.zoom.css("backgroundPosition","0 0"),T.onResize(),T.onzoomout&&T.onzoomout.call(T),T.cancelEvent(e)},this.doZoom=function(e){return T.zoomactive?T.doZoomOut(e):T.doZoomIn(e)},this.resizeZoom=function(){if(T.zoomactive){var e=T.getScrollTop();T.win.css({width:c.width()-T.zoomrestore.padding.w+"px",height:c.height()-T.zoomrestore.padding.h+"px"}),T.onResize(),T.setScrollTop(Math.min(T.page.maxh,e))}},this.init(),n.nicescroll.push(this)},y=function(e){var o=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,t){o.stop(),o.steptime=0,o.lasttime=f(),o.speedx=0,o.speedy=0,o.lastx=e,o.lasty=t,o.lastscrollx=-1,o.lastscrolly=-1},this.update=function(e,t){var r=f();o.steptime=r-o.lasttime,o.lasttime=r;var i=t-o.lasty,s=e-o.lastx,n=o.nc.getScrollTop()+i,l=o.nc.getScrollLeft()+s;o.snapx=l<0||l>o.nc.page.maxw,o.snapy=n<0||n>o.nc.page.maxh,o.speedx=s,o.speedy=i,o.lastx=e,o.lasty=t},this.stop=function(){o.nc.unsynched("domomentum2d"),o.timer&&clearTimeout(o.timer),o.timer=0,o.lastscrollx=-1,o.lastscrolly=-1},this.doSnapy=function(e,t){var r=!1;t<0?(t=0,r=!0):t>o.nc.page.maxh&&(t=o.nc.page.maxh,r=!0),e<0?(e=0,r=!0):e>o.nc.page.maxw&&(e=o.nc.page.maxw,r=!0),r?o.nc.doScrollPos(e,t,o.nc.opt.snapbackspeed):o.nc.triggerScrollEnd()},this.doMomentum=function(e){var t=f(),r=e?t+e:o.lasttime,i=o.nc.getScrollLeft(),s=o.nc.getScrollTop(),n=o.nc.page.maxh,l=o.nc.page.maxw;o.speedx=l>0?Math.min(60,o.speedx):0,o.speedy=n>0?Math.min(60,o.speedy):0;var a=r&&t-r<=60;(s<0||s>n||i<0||i>l)&&(a=!1);var c=!(!o.speedy||!a)&&o.speedy,d=!(!o.speedx||!a)&&o.speedx;if(c||d){var u=Math.max(16,o.steptime);if(u>50){var h=u/50;o.speedx*=h,o.speedy*=h,u=50}o.demulxy=0,o.lastscrollx=o.nc.getScrollLeft(),o.chkx=o.lastscrollx,o.lastscrolly=o.nc.getScrollTop(),o.chky=o.lastscrolly;var p=o.lastscrollx,m=o.lastscrolly,g=function(){var e=f()-t>600?.04:.02;o.speedx&&(p=Math.floor(o.lastscrollx-o.speedx*(1-o.demulxy)),o.lastscrollx=p,(p<0||p>l)&&(e=.1)),o.speedy&&(m=Math.floor(o.lastscrolly-o.speedy*(1-o.demulxy)),o.lastscrolly=m,(m<0||m>n)&&(e=.1)),o.demulxy=Math.min(1,o.demulxy+e),o.nc.synched("domomentum2d",function(){if(o.speedx){o.nc.getScrollLeft();o.chkx=p,o.nc.setScrollLeft(p)}if(o.speedy){o.nc.getScrollTop();o.chky=m,o.nc.setScrollTop(m)}o.timer||(o.nc.hideCursor(),o.doSnapy(p,m))}),o.demulxy<1?o.timer=setTimeout(g,u):(o.stop(),o.nc.hideCursor(),o.doSnapy(p,m))};g()}else o.doSnapy(o.nc.getScrollLeft(),o.nc.getScrollTop())}},x=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():x.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):x.call(e,o),this}},e.fn.scrollTop=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollTop():x.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollTop(parseInt(e)):x.call(n(this),e)})};var S=e.fn.scrollLeft;n.cssHooks.pageXOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():S.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):S.call(e,o),this}},e.fn.scrollLeft=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollLeft():S.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollLeft(parseInt(e)):S.call(n(this),e)})};var z=function(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return n.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=n.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this};!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(z.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new z(this):this[e]&&n.data(this[e],"__nicescroll")||!1},(e.expr.pseudos||e.expr[":"]).nicescroll=function(e){return void 0!==n.data(e,"__nicescroll")},n.fn.niceScroll=function(e,o){void 0!==o||"object"!=typeof e||"jquery"in e||(o=e,e=!1);var t=new z;return this.each(function(){var r=n(this),i=n.extend({},o);if(e){var s=n(e);i.doc=s.length>1?n(e,r):s,i.win=r}!("doc"in i)||"win"in i||(i.win=r);var l=r.data("__nicescroll")||!1;l||(i.doc=i.doc||r,l=new b(i,r),r.data("__nicescroll",l)),t.push(l)}),1===t.length?t[0]:t},a.NiceScroll={getjQuery:function(){return e}},n.nicescroll||(n.nicescroll=new z,n.nicescroll.options=g)});
1
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var E=!1,M=!1,L=0,C=2e3,N=0,P=e,R=document,_=window,I=P(_),O=[];var Y=_.requestAnimationFrame||_.webkitRequestAnimationFrame||_.mozRequestAnimationFrame||!1,H=_.cancelAnimationFrame||_.webkitCancelAnimationFrame||_.mozCancelAnimationFrame||!1;if(Y)_.cancelAnimationFrame||(H=function(e){});else{var s=0;Y=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-s)),i=_.setTimeout(function(){e(t+r)},r);return s=t+r,i},H=function(e){_.clearTimeout(e)}}function B(){if(i)return i;var e=R.createElement("DIV"),s=e.style,o=navigator.userAgent,t=navigator.platform,n={};return n.haspointerlock="pointerLockElement"in R||"webkitPointerLockElement"in R||"mozPointerLockElement"in R,n.isopera="opera"in _,n.isopera12=n.isopera&&"getUserMedia"in navigator,n.isoperamini="[object OperaMini]"===Object.prototype.toString.call(_.operamini),n.isie="all"in R&&"attachEvent"in e&&!n.isopera,n.isieold=n.isie&&!("msInterpolationMode"in s),n.isie7=n.isie&&!n.isieold&&(!("documentMode"in R)||7===R.documentMode),n.isie8=n.isie&&"documentMode"in R&&8===R.documentMode,n.isie9=n.isie&&"performance"in _&&9===R.documentMode,n.isie10=n.isie&&"performance"in _&&10===R.documentMode,n.isie11="msRequestFullscreen"in e&&11<=R.documentMode,n.ismsedge="msCredentials"in _,n.ismozilla="MozAppearance"in s,n.iswebkit=!n.ismsedge&&"WebkitAppearance"in s,n.ischrome=n.iswebkit&&"chrome"in _,n.ischrome38=n.ischrome&&"touchAction"in s,n.ischrome22=!n.ischrome38&&n.ischrome&&n.haspointerlock,n.ischrome26=!n.ischrome38&&n.ischrome&&"transition"in s,n.cantouch="ontouchstart"in R.documentElement||"ontouchstart"in _,n.hasw3ctouch=!!_.PointerEvent&&(0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints),n.hasmstouch=!n.hasw3ctouch&&(_.MSPointerEvent||!1),n.ismac=/^mac$/i.test(t),n.isios=n.cantouch&&/iphone|ipad|ipod/i.test(t),n.isios4=n.isios&&!("seal"in Object),n.isios7=n.isios&&"webkitHidden"in R,n.isios8=n.isios&&"hidden"in R,n.isios10=n.isios&&_.Proxy,n.isandroid=/android/i.test(o),n.haseventlistener="addEventListener"in e,n.trstyle=!1,n.hastransform=!1,n.hastranslate3d=!1,n.transitionstyle=!1,n.hastransition=!1,n.transitionend=!1,n.trstyle="transform",n.hastransform="transform"in s||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],o=0,t=e.length;o<t;o++)if(void 0!==s[e[o]]){n.trstyle=e[o];break}n.hastransform=!!n.trstyle}(),n.hastransform&&(s[n.trstyle]="translate3d(1px,2px,3px)",n.hastranslate3d=/translate3d/.test(s[n.trstyle])),n.transitionstyle="transition",n.prefixstyle="",n.transitionend="transitionend",n.hastransition="transition"in s||function(){n.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],o=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],t=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],r=0,i=e.length;r<i;r++)if(e[r]in s){n.transitionstyle=e[r],n.prefixstyle=o[r],n.transitionend=t[r];break}n.ischrome26&&(n.prefixstyle=o[1]),n.hastransition=n.transitionstyle}(),n.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(n.ischrome&&!n.ischrome38||n.isie)&&(e=[]);for(var o=0,t=e.length;o<t;o++){var r=e[o];if(s.cursor=r,s.cursor==r)return r}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),n.hasmousecapture="setCapture"in e,n.hasMutationObserver=!1!==X,e=null,i=n}function l(e,o){var b=this;this.version="3.7.6",this.name="nicescroll",this.me=o;var y=P("body"),x=this.opt={doc:y,win:!1};if(P.extend(x,A),x.snapbackspeed=80,e)for(var t in x)void 0!==e[t]&&(x[t]=e[t]);if(x.disablemutationobserver&&(X=!1),this.doc=x.doc,this.iddoc=this.doc&&this.doc[0]&&this.doc[0].id||"",this.ispage=/^BODY|HTML/.test(x.win?x.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==x.win,this.win=x.win||(this.ispage?I:this.doc),this.docscroll=this.ispage&&!this.haswrapper?I:this.win,this.body=y,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=x.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==x.rtlmode){var r=this.win[0]==_?this.body:this.win,i=r.css("writing-mode")||r.css("-webkit-writing-mode")||r.css("-ms-writing-mode")||r.css("-moz-writing-mode");"horizontal-tb"==i||"lr-tb"==i||""===i?(this.isrtlmode="rtl"==r.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==i||"tb"==i||"tb-rl"==i||"rl-tb"==i,this.isvertical="vertical-rl"==i||"tb"==i||"tb-rl"==i)}else this.isrtlmode=!0===x.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,(this.observerbody=!1)!==x.scrollbarid)this.id=x.scrollbarid;else for(;this.id="ascrail"+C++,R.getElementById(this.id););this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=x.overflowx,this.overflowy=x.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=B();var S=P.extend({},this.detected);function d(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=D(),this.df=o-e}function s(){var e=b.doc.css(S.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}if(this.canhwscroll=S.hastransform&&x.hwacceleration,this.ishwscroll=this.canhwscroll&&b.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(S.iswebkit||S.isie||S.isie11):this.hasreversehr=!(S.iswebkit||S.isie&&!S.isie10&&!S.isie11):this.hasreversehr=!1,this.istouchcapable=!1,(S.cantouch||!S.hasw3ctouch&&!S.hasmstouch)&&(!S.cantouch||S.isios||S.isandroid||!S.iswebkit&&!S.ismozilla)||(this.istouchcapable=!0),x.enablemouselockapi||(S.hasmousecapture=!1,S.haspointerlock=!1),this.debounced=function(e,o,t){b&&(b.delaylist[e]||!1||(b.delaylist[e]={h:Y(function(){b.delaylist[e].fn.call(b),b.delaylist[e]=!1},t)},o.call(b)),b.delaylist[e].fn=o)},this.synched=function(e,o){b.synclist[e]?b.synclist[e]=o:(b.synclist[e]=o,Y(function(){b&&(b.synclist[e]&&b.synclist[e].call(b),b.synclist[e]=null)}))},this.unsynched=function(e){b.synclist[e]&&(b.synclist[e]=!1)},this.css=function(e,o){for(var t in o)b.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?b.getScrollTop():b.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?b.getScrollLeft():b.setScrollLeft(e)},d.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(D()-this.ts)/this.spd},getNow:function(){var e=(D()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return 1<=e?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=D(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},S.hastranslate3d&&S.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=s();if(o)return 16==o.length?-o[13]:-o[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=s();if(o)return 16==o.length?-o[12]:-o[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x},this.notifyScrollEvent=function(e){var o=R.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,_,1),o.niceevent=!0,e.dispatchEvent(o)};var n=this.isrtlmode?1:-1;S.hastranslate3d&&x.enabletranslate3d?(this.setScrollTop=function(e,o){b.doc.translate.y=e,b.doc.translate.ty=-1*e+"px",b.doc.css(S.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)"),o||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(e,o){b.doc.translate.x=e,b.doc.translate.tx=e*n+"px",b.doc.css(S.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)"),o||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(e,o){b.doc.translate.y=e,b.doc.translate.ty=-1*e+"px",b.doc.css(S.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")"),o||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(e,o){b.doc.translate.x=e,b.doc.translate.tx=e*n+"px",b.doc.css(S.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")"),o||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=function(){return b.docscroll.scrollTop()},this.setScrollTop=function(e){b.docscroll.scrollTop(e)},this.getScrollLeft=function(){return b.hasreversehr?b.detected.ismozilla?b.page.maxw-Math.abs(b.docscroll.scrollLeft()):b.page.maxw-b.docscroll.scrollLeft():b.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(b)return b.hasreversehr&&(e=b.detected.ismozilla?-(b.page.maxw-e):b.page.maxw-e),b.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var l={thin:1,medium:3,thick:5};function a(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=l[r]||0)?t?b.win.outerHeight()-b.win.innerHeight():b.win.outerWidth()-b.win.innerWidth():1;return b.isie8&&i&&(i+=1),s?i:0}return i}this.getDocumentScrollOffset=function(){return{top:_.pageYOffset||R.documentElement.scrollTop,left:_.pageXOffset||R.documentElement.scrollLeft}},this.getOffset=function(){if(b.isfixed){var e=b.win.offset(),o=b.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=b.win.offset();if(!b.viewport)return t;var r=b.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()-(x.railpadding.top+x.railpadding.bottom)}),b.railh&&b.railh.css({width:b.win.innerWidth()-(x.railpadding.left+x.railpadding.right)});else{var r=b.getOffset();if((o={top:r.top,left:r.left-(x.railpadding.left+x.railpadding.right)}).top+=a(b.win,"border-top-width",!0),o.left+=b.rail.align?b.win.outerWidth()-a(b.win,"border-right-width")-b.rail.width:a(b.win,"border-left-width"),(t=x.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),b.railslocked||b.rail.css({top:o.top,left:o.left,height:(e?e.h:b.win.innerHeight())-(x.railpadding.top+x.railpadding.bottom)}),b.zoom&&b.zoom.css({top:o.top+1,left:1==b.rail.align?o.left-20:o.left+b.rail.width+4}),b.railh&&!b.railslocked){o={top:r.top,left:r.left},(t=x.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=b.railh.align?o.top+a(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:o.top+a(b.win,"border-top-width",!0),s=o.left+a(b.win,"border-left-width");b.railh.css({top:i-(x.railpadding.top+x.railpadding.bottom),left:s,width:b.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;b.railslocked||(b.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+R.documentElement.scrollLeft,e.pageY=e.clientY+R.documentElement.scrollTop),o?(r=t?b.doScrollLeft:b.doScrollTop,s=t?(e.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(e.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y,b.unsynched("relativexy"),r(0|s)):(r=t?b.doScrollLeftBy:b.doScrollBy,s=t?b.scroll.x:b.scroll.y,n=t?e.pageX-b.railh.offset().left:e.pageY-b.rail.offset().top,i=t?b.view.w:b.view.h,r(n<=s?i:-i)))},b.newscrolly=b.newscrollx=0,b.hasanimationframe="requestAnimationFrame"in _,b.hascancelanimationframe="cancelAnimationFrame"in _,b.hasborderbox=!1,this.init=function(){if(b.saved.css=[],S.isoperamini)return!0;if(S.isandroid&&!("hidden"in R))return!0;x.emulatetouch=x.emulatetouch||x.touchbehavior,b.hasborderbox=_.getComputedStyle&&"border-box"===_.getComputedStyle(R.body)["box-sizing"];var t={"overflow-y":"hidden"};if((S.isie11||S.isie10)&&(t["-ms-overflow-style"]="none"),b.ishwscroll&&(this.doc.css(S.transitionstyle,S.prefixstyle+"transform 0ms ease-out"),S.transitionend&&b.bind(b.doc,S.transitionend,b.onScrollTransitionEnd,!1)),b.zindex="auto",b.ispage||"auto"!=x.zindex?b.zindex=x.zindex:b.zindex=function(){var e=b.win;if("zIndex"in e)return e.zIndex();for(;0<e.length;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}()||"auto",!b.ispage&&"auto"!=b.zindex&&b.zindex>N&&(N=b.zindex),b.isie&&0===b.zindex&&"auto"==x.zindex&&(b.zindex="auto"),!b.ispage||!S.isieold){var e=b.docscroll;b.ispage&&(e=b.haswrapper?b.win:b.doc),b.css(e,t),b.ispage&&(S.isie11||S.isie)&&b.css(P("html"),t),!S.isios||b.ispage||b.haswrapper||b.css(y,{"-webkit-overflow-scrolling":"touch"});var o=P(R.createElement("div"));o.css({position:"relative",top:0,float:"right",width:x.cursorwidth,height:0,"background-color":x.cursorcolor,border:x.cursorborder,"background-clip":"padding-box","-webkit-border-radius":x.cursorborderradius,"-moz-border-radius":x.cursorborderradius,"border-radius":x.cursorborderradius}),o.addClass("nicescroll-cursors"),b.cursor=o;var r=P(R.createElement("div"));r.attr("id",b.id),r.addClass("nicescroll-rails nicescroll-rails-vr");var i,s,n=["left","right","top","bottom"];for(var l in n)s=n[l],(i=x.railpadding[s]||0)&&r.css("padding-"+s,i+"px");r.append(o),r.width=Math.max(parseFloat(x.cursorwidth),o.outerWidth()),r.css({width:r.width+"px",zIndex:b.zindex,background:x.background,cursor:"default"}),r.visibility=!0,r.scrollable=!0,r.align="left"==x.railalign?0:1,b.rail=r;var a,c=b.rail.drag=!1;if(!x.boxzoom||b.ispage||S.isieold||(c=R.createElement("div"),b.bind(c,"click",b.doZoom),b.bind(c,"mouseenter",function(){b.zoom.css("opacity",x.cursoropacitymax)}),b.bind(c,"mouseleave",function(){b.zoom.css("opacity",x.cursoropacitymin)}),b.zoom=P(c),b.zoom.css({cursor:"pointer",zIndex:b.zindex,backgroundImage:"url("+x.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),x.dblclickzoom&&b.bind(b.win,"dblclick",b.doZoom),S.cantouch&&x.gesturezoom&&(b.ongesturezoom=function(e){return 1.5<e.scale&&b.doZoomIn(e),e.scale<.8&&b.doZoomOut(e),b.cancelEvent(e)},b.bind(b.win,"gestureend",b.ongesturezoom))),b.railh=!1,x.horizrailenabled&&(b.css(e,{overflowX:"hidden"}),(o=P(R.createElement("div"))).css({position:"absolute",top:0,height:x.cursorwidth,width:0,backgroundColor:x.cursorcolor,border:x.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":x.cursorborderradius,"-moz-border-radius":x.cursorborderradius,"border-radius":x.cursorborderradius}),S.isieold&&o.css("overflow","hidden"),o.addClass("nicescroll-cursors"),b.cursorh=o,(a=P(R.createElement("div"))).attr("id",b.id+"-hr"),a.addClass("nicescroll-rails nicescroll-rails-hr"),a.height=Math.max(parseFloat(x.cursorwidth),o.outerHeight()),a.css({height:a.height+"px",zIndex:b.zindex,background:x.background}),a.append(o),a.visibility=!0,a.scrollable=!0,a.align="top"==x.railvalign?0:1,b.railh=a,b.railh.drag=!1),b.ispage)r.css({position:"fixed",top:0,height:"100%"}),r.css(r.align?{right:0}:{left:0}),b.body.append(r),b.railh&&(a.css({position:"fixed",left:0,width:"100%"}),a.css(a.align?{bottom:0}:{top:0}),b.body.append(a));else{if(b.ishwscroll){"static"==b.win.css("position")&&b.css(b.win,{position:"relative"});var d="HTML"==b.win[0].nodeName?b.body:b.win;P(d).scrollTop(0).scrollLeft(0),b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":r.width+4}),d.append(b.zoom)),r.css({position:"absolute",top:0}),r.css(r.align?{right:0}:{left:0}),d.append(r),a&&(a.css({position:"absolute",left:0,bottom:0}),a.css(a.align?{bottom:0}:{top:0}),d.append(a))}else{b.isfixed="fixed"==b.win.css("position");var u=b.isfixed?"fixed":"absolute";b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,/fixed|absolute/.test(b.viewport.css("position"))||b.css(b.viewport,{position:"relative"})),r.css({position:u}),b.zoom&&b.zoom.css({position:u}),b.updateScrollBar(),b.body.append(r),b.zoom&&b.body.append(b.zoom),b.railh&&(a.css({position:u}),b.body.append(a))}S.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),x.disableoutline&&(S.isie&&b.win.attr("hideFocus","true"),S.iswebkit&&b.win.css("outline","none"))}if(!1===x.autohidemode?(b.autohidedom=!1,b.rail.css({opacity:x.cursoropacitymax}),b.railh&&b.railh.css({opacity:x.cursoropacitymax})):!0===x.autohidemode||"leave"===x.autohidemode?(b.autohidedom=P().add(b.rail),S.isie8&&(b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&S.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"scroll"==x.autohidemode?(b.autohidedom=P().add(b.rail),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh))):"cursor"==x.autohidemode?(b.autohidedom=P().add(b.cursor),b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"hidden"==x.autohidemode&&(b.autohidedom=!1,b.hide(),b.railslocked=!1),S.cantouch||b.istouchcapable||x.emulatetouch||S.hasmstouch){b.scrollmom=new q(b);b.ontouchstart=function(e){if(b.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(b.hasmoving=!1,b.scrollmom.timer&&(b.triggerScrollEnd(),b.scrollmom.stop()),!b.railslocked){var o=b.getTarget(e);if(o)if(/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return b.stopPropagation(e);var t="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),b.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(b.rail.drag={x:e.clientX,y:e.clientY,sx:b.scroll.x,sy:b.scroll.y,st:b.getScrollTop(),sl:b.getScrollLeft(),pt:2,dl:!1,tg:o},b.ispage||!x.directionlockdeadzone)b.rail.drag.dl="f";else{var i=I.width(),s=I.height(),n=b.getContentSize(),l=n.h-s,a=n.w-i;b.rail.scrollable&&!b.railh.scrollable?b.rail.drag.ck=0<l&&"v":!b.rail.scrollable&&b.railh.scrollable?b.rail.drag.ck=0<a&&"h":b.rail.drag.ck=!1}if(x.emulatetouch&&b.isiframe&&S.isie){var c=b.win.position();b.rail.drag.x+=c.left,b.rail.drag.y+=c.top}if(b.hasmoving=!1,b.lastmouseup=!1,b.scrollmom.reset(e.clientX,e.clientY),o&&t){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return S.hasmousecapture&&o.setCapture(),x.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(b.hasmoving)return!1;o._onclick.call(this,e)}),b.cancelEvent(e)):b.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(P(o).attr("type"))&&(b.preventclick={tg:o,click:!1})}}},b.ontouchend=function(e){if(!b.rail.drag)return!0;if(2==b.rail.drag.pt){if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;b.rail.drag=!1;var o="mouseup"===e.type;if(b.hasmoving&&(b.scrollmom.doMomentum(),b.lastmouseup=!0,b.hideCursor(),S.hasmousecapture&&R.releaseCapture(),o))return b.cancelEvent(e)}else if(1==b.rail.drag.pt)return b.onmouseup(e)};var m=x.emulatetouch&&b.isiframe&&!S.hasmousecapture,f=.3*x.directionlockdeadzone|0;b.ontouchmove=function(e,o){if(!b.rail.drag)return!0;if(e.targetTouches&&x.preventmultitouchscrolling&&1<e.targetTouches.length)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2!=b.rail.drag.pt)return 1==b.rail.drag.pt?b.onmousemove(e):void 0;var t,r;if("changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),r=t=0,m&&!o){var i=b.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-b.rail.drag.y,l=e.clientX+r,a=l-b.rail.drag.x,c=b.rail.drag.st-n;if(b.ishwscroll&&x.bouncescroll)c<0?c=Math.round(c/2):c>b.page.maxh&&(c=b.page.maxh+Math.round((c-b.page.maxh)/2));else if(c<0?s=c=0:c>b.page.maxh&&(c=b.page.maxh,s=0),0===s&&!b.hasmoving)return b.ispage||(b.rail.drag=!1),!0;var d=b.getScrollLeft();if(b.railh&&b.railh.scrollable&&(d=b.isrtlmode?a-b.rail.drag.sl:b.rail.drag.sl-a,b.ishwscroll&&x.bouncescroll?d<0?d=Math.round(d/2):d>b.page.maxw&&(d=b.page.maxw+Math.round((d-b.page.maxw)/2)):(d<0&&(l=d=0),d>b.page.maxw&&(d=b.page.maxw,l=0))),!b.hasmoving){if(b.rail.drag.y===e.clientY&&b.rail.drag.x===e.clientX)return b.cancelEvent(e);var u=Math.abs(n),h=Math.abs(a),p=x.directionlockdeadzone;if(b.rail.drag.ck?"v"==b.rail.drag.ck?p<h&&u<=f?b.rail.drag=!1:p<u&&(b.rail.drag.dl="v"):"h"==b.rail.drag.ck&&(p<u&&h<=f?b.rail.drag=!1:p<h&&(b.rail.drag.dl="h")):p<u&&p<h?b.rail.drag.dl="f":p<u?b.rail.drag.dl=f<h?"f":"v":p<h&&(b.rail.drag.dl=f<u?"f":"h"),!b.rail.drag.dl)return b.cancelEvent(e);b.triggerScrollStart(e.clientX,e.clientY,0,0,0),b.hasmoving=!0}return b.preventclick&&!b.preventclick.click&&(b.preventclick.click=b.preventclick.tg.onclick||!1,b.preventclick.tg.onclick=b.onpreventclick),b.rail.drag.dl&&("v"==b.rail.drag.dl?d=b.rail.drag.sl:"h"==b.rail.drag.dl&&(c=b.rail.drag.st)),b.synched("touchmove",function(){b.rail.drag&&2==b.rail.drag.pt&&(b.prepareTransition&&b.resetTransition(),b.rail.scrollable&&b.setScrollTop(c),b.scrollmom.update(l,s),b.railh&&b.railh.scrollable?(b.setScrollLeft(d),b.showCursor(c,d)):b.showCursor(c),S.isie10&&R.selection.clear())}),b.cancelEvent(e)},b.ontouchstartCursor=function(e,o){if(!b.rail.drag||3==b.rail.drag.pt){if(b.locked)return b.cancelEvent(e);b.cancelScroll(),b.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:b.scroll.x,sy:b.scroll.y,pt:3,hr:!!o};var t=b.getTarget(e);return!b.ispage&&S.hasmousecapture&&t.setCapture(),b.isiframe&&!S.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"})),b.cancelEvent(e)}},b.ontouchendCursor=function(e){if(b.rail.drag){if(S.hasmousecapture&&R.releaseCapture(),b.isiframe&&!S.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),3!=b.rail.drag.pt)return;return b.rail.drag=!1,b.cancelEvent(e)}},b.ontouchmoveCursor=function(e){if(b.rail.drag){if(3!=b.rail.drag.pt)return;if(b.cursorfreezed=!0,b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(e.touches[0].clientX-b.rail.drag.x),b.scroll.x<0&&(b.scroll.x=0);var o=b.scrollvaluemaxw;b.scroll.x>o&&(b.scroll.x=o)}else{b.scroll.y=b.rail.drag.sy+(e.touches[0].clientY-b.rail.drag.y),b.scroll.y<0&&(b.scroll.y=0);var t=b.scrollvaluemax;b.scroll.y>t&&(b.scroll.y=t)}return b.synched("touchmove",function(){b.rail.drag&&3==b.rail.drag.pt&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*b.scrollratio.x),x.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y),x.cursordragspeed))}),b.cancelEvent(e)}}}if(b.onmousedown=function(e,o){if(!b.rail.drag||1==b.rail.drag.pt){if(b.railslocked)return b.cancelEvent(e);b.cancelScroll(),b.rail.drag={x:e.clientX,y:e.clientY,sx:b.scroll.x,sy:b.scroll.y,pt:1,hr:o||!1};var t=b.getTarget(e);return S.hasmousecapture&&t.setCapture(),b.isiframe&&!S.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"})),b.hasmoving=!1,b.cancelEvent(e)}},b.onmouseup=function(e){if(b.rail.drag)return 1!=b.rail.drag.pt||(S.hasmousecapture&&R.releaseCapture(),b.isiframe&&!S.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),b.rail.drag=!1,b.cursorfreezed=!1,b.hasmoving&&b.triggerScrollEnd(),b.cancelEvent(e))},b.onmousemove=function(e){if(b.rail.drag){if(1!==b.rail.drag.pt)return;if(S.ischrome&&0===e.which)return b.onmouseup(e);if(b.cursorfreezed=!0,b.hasmoving||b.triggerScrollStart(e.clientX,e.clientY,0,0,0),b.hasmoving=!0,b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(e.clientX-b.rail.drag.x),b.scroll.x<0&&(b.scroll.x=0);var o=b.scrollvaluemaxw;b.scroll.x>o&&(b.scroll.x=o)}else{b.scroll.y=b.rail.drag.sy+(e.clientY-b.rail.drag.y),b.scroll.y<0&&(b.scroll.y=0);var t=b.scrollvaluemax;b.scroll.y>t&&(b.scroll.y=t)}return b.synched("mousemove",function(){b.cursorfreezed&&(b.showCursor(),b.rail.drag.hr?b.scrollLeft(Math.round(b.scroll.x*b.scrollratio.x)):b.scrollTop(Math.round(b.scroll.y*b.scrollratio.y)))}),b.cancelEvent(e)}b.checkarea=0},S.cantouch||x.emulatetouch)b.onpreventclick=function(e){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(e)},b.onclick=!S.isios&&function(e){return!b.lastmouseup||(b.lastmouseup=!1,b.cancelEvent(e))},x.grabcursorenabled&&S.cursorgrabvalue&&(b.css(b.ispage?b.doc:b.win,{cursor:S.cursorgrabvalue}),b.css(b.rail,{cursor:S.cursorgrabvalue}));else{var h=function(e){if(b.selectiondrag){if(e){var o=b.win.outerHeight(),t=e.pageY-b.selectiondrag.top;0<t&&t<o&&(t=0),o<=t&&(t-=o),b.selectiondrag.df=t}if(0!==b.selectiondrag.df){var r=-2*b.selectiondrag.df/6|0;b.doScrollBy(r),b.debounced("doselectionscroll",function(){h()},50)}}};b.hasTextSelected="getSelection"in R?function(){return 0<R.getSelection().rangeCount}:"selection"in R?function(){return"None"!=R.selection.type}:function(){return!1},b.onselectionstart=function(e){b.ispage||(b.selectiondrag=b.win.offset())},b.onselectionend=function(e){b.selectiondrag=!1},b.onselectiondrag=function(e){b.selectiondrag&&b.hasTextSelected()&&b.debounced("selectionscroll",function(){h(e)},250)}}if(S.hasw3ctouch?(b.css(b.ispage?P("html"):b.win,{"touch-action":"none"}),b.css(b.rail,{"touch-action":"none"}),b.css(b.cursor,{"touch-action":"none"}),b.bind(b.win,"pointerdown",b.ontouchstart),b.bind(R,"pointerup",b.ontouchend),b.delegate(R,"pointermove",b.ontouchmove)):S.hasmstouch?(b.css(b.ispage?P("html"):b.win,{"-ms-touch-action":"none"}),b.css(b.rail,{"-ms-touch-action":"none"}),b.css(b.cursor,{"-ms-touch-action":"none"}),b.bind(b.win,"MSPointerDown",b.ontouchstart),b.bind(R,"MSPointerUp",b.ontouchend),b.delegate(R,"MSPointerMove",b.ontouchmove),b.bind(b.cursor,"MSGestureHold",function(e){e.preventDefault()}),b.bind(b.cursor,"contextmenu",function(e){e.preventDefault()})):S.cantouch&&(b.bind(b.win,"touchstart",b.ontouchstart,!1,!0),b.bind(R,"touchend",b.ontouchend,!1,!0),b.bind(R,"touchcancel",b.ontouchend,!1,!0),b.delegate(R,"touchmove",b.ontouchmove,!1,!0)),x.emulatetouch&&(b.bind(b.win,"mousedown",b.ontouchstart,!1,!0),b.bind(R,"mouseup",b.ontouchend,!1,!0),b.bind(R,"mousemove",b.ontouchmove,!1,!0)),!x.cursordragontouch&&(S.cantouch||x.emulatetouch)||(b.rail.css({cursor:"default"}),b.railh&&b.railh.css({cursor:"default"}),b.jqbind(b.rail,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor(),b.rail.active=!0}),b.jqbind(b.rail,"mouseleave",function(){b.rail.active=!1,b.rail.drag||b.hideCursor()}),x.sensitiverail&&(b.bind(b.rail,"click",function(e){b.doRailClick(e,!1,!1)}),b.bind(b.rail,"dblclick",function(e){b.doRailClick(e,!0,!1)}),b.bind(b.cursor,"click",function(e){b.cancelEvent(e)}),b.bind(b.cursor,"dblclick",function(e){b.cancelEvent(e)})),b.railh&&(b.jqbind(b.railh,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor(),b.rail.active=!0}),b.jqbind(b.railh,"mouseleave",function(){b.rail.active=!1,b.rail.drag||b.hideCursor()}),x.sensitiverail&&(b.bind(b.railh,"click",function(e){b.doRailClick(e,!1,!0)}),b.bind(b.railh,"dblclick",function(e){b.doRailClick(e,!0,!0)}),b.bind(b.cursorh,"click",function(e){b.cancelEvent(e)}),b.bind(b.cursorh,"dblclick",function(e){b.cancelEvent(e)})))),x.cursordragontouch&&(this.istouchcapable||S.cantouch)&&(b.bind(b.cursor,"touchstart",b.ontouchstartCursor),b.bind(b.cursor,"touchmove",b.ontouchmoveCursor),b.bind(b.cursor,"touchend",b.ontouchendCursor),b.cursorh&&b.bind(b.cursorh,"touchstart",function(e){b.ontouchstartCursor(e,!0)}),b.cursorh&&b.bind(b.cursorh,"touchmove",b.ontouchmoveCursor),b.cursorh&&b.bind(b.cursorh,"touchend",b.ontouchendCursor)),x.emulatetouch||S.isandroid||S.isios?(b.bind(S.hasmousecapture?b.win:R,"mouseup",b.ontouchend),b.onclick&&b.bind(R,"click",b.onclick),x.cursordragontouch?(b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.cursorh&&b.bind(b.cursorh,"mousedown",function(e){b.onmousedown(e,!0)}),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onmouseup)):(b.bind(b.rail,"mousedown",function(e){e.preventDefault()}),b.railh&&b.bind(b.railh,"mousedown",function(e){e.preventDefault()}))):(b.bind(S.hasmousecapture?b.win:R,"mouseup",b.onmouseup),b.bind(R,"mousemove",b.onmousemove),b.onclick&&b.bind(R,"click",b.onclick),b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.railh&&(b.bind(b.cursorh,"mousedown",function(e){b.onmousedown(e,!0)}),b.bind(b.cursorh,"mouseup",b.onmouseup)),!b.ispage&&x.enablescrollonselection&&(b.bind(b.win[0],"mousedown",b.onselectionstart),b.bind(R,"mouseup",b.onselectionend),b.bind(b.cursor,"mouseup",b.onselectionend),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onselectionend),b.bind(R,"mousemove",b.onselectiondrag)),b.zoom&&(b.jqbind(b.zoom,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor(),b.rail.active=!0}),b.jqbind(b.zoom,"mouseleave",function(){b.rail.active=!1,b.rail.drag||b.hideCursor()}))),x.enablemousewheel&&(b.isiframe||b.mousewheel(S.isie&&b.ispage?R:b.win,b.onmousewheel),b.mousewheel(b.rail,b.onmousewheel),b.railh&&b.mousewheel(b.railh,b.onmousewheelhr)),b.ispage||S.cantouch||/HTML|^BODY/.test(b.win[0].nodeName)||(b.win.attr("tabindex")||b.win.attr({tabindex:++L}),b.bind(b.win,"focus",function(e){E=b.getTarget(e).id||b.getTarget(e)||!1,b.hasfocus=!0,b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"blur",function(e){E=!1,b.hasfocus=!1}),b.bind(b.win,"mouseenter",function(e){M=b.getTarget(e).id||b.getTarget(e)||!1,b.hasmousefocus=!0,b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"mouseleave",function(e){M=!1,b.hasmousefocus=!1,b.rail.drag||b.hideCursor()})),b.onkeypress=function(e){if(b.railslocked&&0===b.page.maxh)return!0;e=e||_.event;var o=b.getTarget(e);if(o&&/INPUT|TEXTAREA|SELECT|OPTION/.test(o.nodeName)&&(!(o.getAttribute("type")||o.type||!1)||!/submit|button|cancel/i.tp))return!0;if(P(o).attr("contenteditable"))return!0;if(b.hasfocus||b.hasmousefocus&&!E||b.ispage&&!E&&!M){var t=e.keyCode;if(b.railslocked&&27!=t)return b.cancelEvent(e);var r=e.ctrlKey||!1,i=e.shiftKey||!1,s=!1;switch(t){case 38:case 63233:b.doScrollBy(72),s=!0;break;case 40:case 63235:b.doScrollBy(-72),s=!0;break;case 37:case 63232:b.railh&&(r?b.doScrollLeft(0):b.doScrollLeftBy(72),s=!0);break;case 39:case 63234:b.railh&&(r?b.doScrollLeft(b.page.maxw):b.doScrollLeftBy(-72),s=!0);break;case 33:case 63276:b.doScrollBy(b.view.h),s=!0;break;case 34:case 63277:b.doScrollBy(-b.view.h),s=!0;break;case 36:case 63273:b.railh&&r?b.doScrollPos(0,0):b.doScrollTo(0),s=!0;break;case 35:case 63275:b.railh&&r?b.doScrollPos(b.page.maxw,b.page.maxh):b.doScrollTo(b.page.maxh),s=!0;break;case 32:x.spacebarenabled&&(i?b.doScrollBy(b.view.h):b.doScrollBy(-b.view.h),s=!0);break;case 27:b.zoomactive&&(b.doZoom(),s=!0)}if(s)return b.cancelEvent(e)}},x.enablekeyboard&&b.bind(R,S.isopera&&!S.isopera12?"keypress":"keydown",b.onkeypress),b.bind(R,"keydown",function(e){!e.ctrlKey&&1||(b.wheelprevented=!0)}),b.bind(R,"keyup",function(e){e.ctrlKey||!1||(b.wheelprevented=!1)}),b.bind(_,"blur",function(e){b.wheelprevented=!1}),b.bind(_,"resize",b.onscreenresize),b.bind(_,"orientationchange",b.onscreenresize),b.bind(_,"load",b.lazyResize),S.ischrome&&!b.ispage&&!b.haswrapper){var p=b.win.attr("style"),g=parseFloat(b.win.css("width"))+1;b.win.css("width",g),b.synched("chromefix",function(){b.win.attr("style",p)})}if(b.onAttributeChange=function(e){b.lazyResize(b.isieold?250:30)},x.enableobserver&&(b.isie11||!1===X||(b.observerbody=new X(function(e){if(e.forEach(function(e){if("attributes"==e.type)return y.hasClass("modal-open")&&y.hasClass("modal-dialog")&&!P.contains(P(".modal-dialog")[0],b.doc[0])?b.hide():b.show()}),b.me.clientWidth!=b.page.width||b.me.clientHeight!=b.page.height)return b.lazyResize(30)}),b.observerbody.observe(R.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!b.ispage&&!b.haswrapper)){var v=b.win[0];!1!==X?(b.observer=new X(function(e){e.forEach(b.onAttributeChange)}),b.observer.observe(v,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),b.observerremover=new X(function(e){e.forEach(function(e){if(0<e.removedNodes.length)for(var o in e.removedNodes)if(b&&e.removedNodes[o]===v)return b.remove()})}),b.observerremover.observe(v.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(b.bind(v,S.isie&&!S.isie9?"propertychange":"DOMAttrModified",b.onAttributeChange),S.isie9&&v.attachEvent("onpropertychange",b.onAttributeChange),b.bind(v,"DOMNodeRemoved",function(e){e.target===v&&b.remove()}))}!b.ispage&&x.boxzoom&&b.bind(_,"resize",b.resizeZoom),b.istextarea&&(b.bind(b.win,"keydown",b.lazyResize),b.bind(b.win,"mouseup",b.lazyResize)),b.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var w=function(){var o;b.iframexd=!1;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){o=!(b.iframexd=!0)}if(b.iframexd)return"console"in _&&console.log("NiceScroll error: policy restriced iframe"),!0;if(b.forcescreen=!0,b.isiframe&&(b.iframe={doc:P(o),html:b.doc.contents().find("html")[0],body:b.doc.contents().find("body")[0]},b.getContentSize=function(){return{w:Math.max(b.iframe.html.scrollWidth,b.iframe.body.scrollWidth),h:Math.max(b.iframe.html.scrollHeight,b.iframe.body.scrollHeight)}},b.docscroll=P(b.iframe.body)),!S.isios&&x.iframeautoresize&&!b.isiframe){b.win.scrollTop(0),b.doc.height("");var e=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);b.doc.height(e)}b.lazyResize(30),b.css(P(b.iframe.body),t),S.isios&&b.haswrapper&&b.css(P(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?b.bind(this.contentWindow,"scroll",b.onscroll):b.bind(o,"scroll",b.onscroll),x.enablemousewheel&&b.mousewheel(o,b.onmousewheel),x.enablekeyboard&&b.bind(o,S.isopera?"keypress":"keydown",b.onkeypress),S.cantouch?(b.bind(o,"touchstart",b.ontouchstart),b.bind(o,"touchmove",b.ontouchmove)):x.emulatetouch&&(b.bind(o,"mousedown",b.ontouchstart),b.bind(o,"mousemove",function(e){return b.ontouchmove(e,!0)}),x.grabcursorenabled&&S.cursorgrabvalue&&b.css(P(o.body),{cursor:S.cursorgrabvalue})),b.bind(o,"mouseup",b.ontouchend),b.zoom&&(x.dblclickzoom&&b.bind(o,"dblclick",b.doZoom),b.ongesturezoom&&b.bind(o,"gestureend",b.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){w.call(b.doc[0],!1)},500),b.bind(this.doc,"load",w)}},this.showCursor=function(e,o){if(b.cursortimeout&&(clearTimeout(b.cursortimeout),b.cursortimeout=0),b.rail){if(b.autohidedom&&(b.autohidedom.stop().css({opacity:x.cursoropacitymax}),b.cursoractive=!0),b.rail.drag&&1==b.rail.drag.pt||(void 0!==e&&!1!==e&&(b.scroll.y=e/b.scrollratio.y|0),void 0!==o&&(b.scroll.x=o/b.scrollratio.x|0)),b.cursor.css({height:b.cursorheight,top:b.scroll.y}),b.cursorh){var t=b.hasreversehr?b.scrollvaluemaxw-b.scroll.x:b.scroll.x;b.cursorh.css({width:b.cursorwidth,left:!b.rail.align&&b.rail.visibility?t+b.rail.width:t}),b.cursoractive=!0}b.zoom&&b.zoom.stop().css({opacity:x.cursoropacitymax})}},this.hideCursor=function(e){b.cursortimeout||b.rail&&b.autohidedom&&(b.hasmousefocus&&"leave"===x.autohidemode||(b.cursortimeout=setTimeout(function(){b.rail.active&&b.showonmouseevent||(b.autohidedom.stop().animate({opacity:x.cursoropacitymin}),b.zoom&&b.zoom.stop().animate({opacity:x.cursoropacitymin}),b.cursoractive=!1),b.cursortimeout=0},e||x.hidecursordelay)))},this.noticeCursor=function(e,o,t){b.showCursor(o,t),b.rail.active||b.hideCursor(e)},this.getContentSize=b.ispage?function(){return{w:Math.max(R.body.scrollWidth,R.documentElement.scrollWidth),h:Math.max(R.body.scrollHeight,R.documentElement.scrollHeight)}}:b.haswrapper?function(){return{w:b.doc[0].offsetWidth,h:b.doc[0].offsetHeight}}:function(){return{w:b.docscroll[0].scrollWidth,h:b.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!b||!b.win)return!1;var t=b.page.maxh,r=b.page.maxw,i=b.view.h,s=b.view.w;if(b.view={w:b.ispage?b.win.width():b.win[0].clientWidth,h:b.ispage?b.win.height():b.win[0].clientHeight},b.page=o||b.getContentSize(),b.page.maxh=Math.max(0,b.page.h-b.view.h),b.page.maxw=Math.max(0,b.page.w-b.view.w),b.page.maxh==t&&b.page.maxw==r&&b.view.w==s&&b.view.h==i){if(b.ispage)return b;var n=b.win.offset();if(b.lastposition){var l=b.lastposition;if(l.top==n.top&&l.left==n.left)return b}b.lastposition=n}return 0===b.page.maxh?(b.hideRail(),b.scrollvaluemax=0,b.scroll.y=0,b.scrollratio.y=0,b.cursorheight=0,b.setScrollTop(0),b.rail&&(b.rail.scrollable=!1)):(b.page.maxh-=x.railpadding.top+x.railpadding.bottom,b.rail.scrollable=!0),0===b.page.maxw?(b.hideRailHr(),b.scrollvaluemaxw=0,b.scroll.x=0,b.scrollratio.x=0,b.cursorwidth=0,b.setScrollLeft(0),b.railh&&(b.railh.scrollable=!1)):(b.page.maxw-=x.railpadding.left+x.railpadding.right,b.railh&&(b.railh.scrollable=x.horizrailenabled)),b.railslocked=b.locked||0===b.page.maxh&&0===b.page.maxw,b.railslocked?(b.ispage||b.updateScrollBar(b.view),!1):(b.hidden||(b.rail.visibility||b.showRail(),b.railh&&!b.railh.visibility&&b.showRailHr()),b.istextarea&&b.win.css("resize")&&"none"!=b.win.css("resize")&&(b.view.h-=20),b.cursorheight=Math.min(b.view.h,Math.round(b.view.h*(b.view.h/b.page.h))),b.cursorheight=x.cursorfixedheight?x.cursorfixedheight:Math.max(x.cursorminheight,b.cursorheight),b.cursorwidth=Math.min(b.view.w,Math.round(b.view.w*(b.view.w/b.page.w))),b.cursorwidth=x.cursorfixedheight?x.cursorfixedheight:Math.max(x.cursorminheight,b.cursorwidth),b.scrollvaluemax=b.view.h-b.cursorheight-(x.railpadding.top+x.railpadding.bottom),b.hasborderbox||(b.scrollvaluemax-=b.cursor[0].offsetHeight-b.cursor[0].clientHeight),b.railh&&(b.railh.width=0<b.page.maxh?b.view.w-b.rail.width:b.view.w,b.scrollvaluemaxw=b.railh.width-b.cursorwidth-(x.railpadding.left+x.railpadding.right)),b.ispage||b.updateScrollBar(b.view),b.scrollratio={x:b.page.maxw/b.scrollvaluemaxw,y:b.page.maxh/b.scrollvaluemax},b.getScrollTop()>b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=b.getScrollTop()/b.scrollratio.y|0,b.scroll.x=b.getScrollLeft()/b.scrollratio.x|0,b.cursoractive&&b.noticeCursor()),b.scroll.y&&0===b.getScrollTop()&&b.doScrollTo(b.scroll.y*b.scrollratio.y|0),b)},this.resize=b.onResize;var c=0;function u(t,r,i,e){b._bind(t,r,function(e){var o={original:e=e||_.event,target:e.target||e.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==e.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return e.preventDefault?e.preventDefault():e.returnValue=!1,!1},stopImmediatePropagation:function(){e.stopImmediatePropagation?e.stopImmediatePropagation():e.cancelBubble=!0}};return"mousewheel"==r?(e.wheelDeltaX&&(o.deltaX=-.025*e.wheelDeltaX),e.wheelDeltaY&&(o.deltaY=-.025*e.wheelDeltaY),o.deltaY||o.deltaX||(o.deltaY=-.025*e.wheelDelta)):o.deltaY=e.detail,i.call(t,o)},e)}this.onscreenresize=function(e){clearTimeout(c);var o=!b.ispage&&!b.haswrapper;o&&b.hideRails(),c=setTimeout(function(){b&&(o&&b.showRails(),b.resize()),c=0},120)},this.lazyResize=function(e){return clearTimeout(c),e=isNaN(e)?240:e,c=setTimeout(function(){b&&b.resize(),c=0},e),b},this.jqbind=function(e,o,t){b.events.push({e:e,n:o,f:t,q:!0}),P(e).on(o,t)};var h=!(this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in R.createElement("div"))b._bind(r,"wheel",o,t||!1);else{var i=void 0!==R.onmousewheel?"mousewheel":"DOMMouseScroll";u(r,i,o,t||!1),"DOMMouseScroll"==i&&u(r,"MozMousePixelScroll",o,t||!1)}});if(S.haseventlistener){try{var p=Object.defineProperty({},"passive",{get:function(){h=!0}});_.addEventListener("test",null,p)}catch(e){}this.stopPropagation=function(e){return e&&(e=e.original?e.original:e).stopPropagation(),!1},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},_.constructor.prototype.addEventListener=R.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},_.constructor.prototype.removeEventListener=R.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||_.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||_.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=O[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;0<=r;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},b.bind(e,o,s.f,r,i),O[o]=s),b.ispage?(s.a=[b.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(b.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=O[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n<l;n++)s.a[n]===b.id&&(s.a.splice(n),s.l.splice(n),0===s.a.length&&(b._unbind(e,o,s.l.f),O[o]=null))},this.bind=function(e,o,t,r,i){var s="jquery"in e?e[0]:e;b._bind(s,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){b.events.push({e:e,n:o,f:t,b:r,q:!1}),h&&(i||e==window.document||e==window.document.body||e==window)?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){O[o]?b.undelegate(e,o,t,r):e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<b.events.length;e++){var o=b.events[e];o.q?o.e.unbind(o.n,o.f):b._unbind(o.e,o.n,o.f,o.b)}},this.showRails=function(){return b.showRail().showRailHr()},this.showRail=function(){return 0===b.page.maxh||!b.ispage&&"none"==b.win.css("display")||(b.rail.visibility=!0,b.rail.css("display","block")),b},this.showRailHr=function(){return b.railh&&(0===b.page.maxw||!b.ispage&&"none"==b.win.css("display")||(b.railh.visibility=!0,b.railh.css("display","block"))),b},this.hideRails=function(){return b.hideRail().hideRailHr()},this.hideRail=function(){return b.rail.visibility=!1,b.rail.css("display","none"),b},this.hideRailHr=function(){return b.railh&&(b.railh.visibility=!1,b.railh.css("display","none")),b},this.show=function(){return b.hidden=!1,b.railslocked=!1,b.showRails()},this.hide=function(){return b.hidden=!0,b.railslocked=!0,b.hideRails()},this.toggle=function(){return b.hidden?b.show():b.hide()},this.remove=function(){for(var e in b.stop(),b.cursortimeout&&clearTimeout(b.cursortimeout),b.delaylist)b.delaylist[e]&&H(b.delaylist[e].h);b.doZoomOut(),b.unbindAll(),S.isie9&&b.win[0].detachEvent("onpropertychange",b.onAttributeChange),!1!==b.observer&&b.observer.disconnect(),!1!==b.observerremover&&b.observerremover.disconnect(),!1!==b.observerbody&&b.observerbody.disconnect(),b.events=null,b.cursor&&b.cursor.remove(),b.cursorh&&b.cursorh.remove(),b.rail&&b.rail.remove(),b.railh&&b.railh.remove(),b.zoom&&b.zoom.remove();for(var o=0;o<b.saved.css.length;o++){var t=b.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}b.saved=!1,b.me.data("__nicescroll","");var r=P.nicescroll;for(var i in r.each(function(e){if(this&&this.id===b.id){delete r[e];for(var o=++e;o<r.length;o++,e++)r[e]=r[o];r.length--,r.length&&delete r[r.length]}}),b)b[i]=null,delete b[i];b=null},this.scrollstart=function(e){return this.onscrollstart=e,b},this.scrollend=function(e){return this.onscrollend=e,b},this.scrollcancel=function(e){return this.onscrollcancel=e,b},this.zoomin=function(e){return this.onzoomin=e,b},this.zoomout=function(e){return this.onzoomout=e,b},this.isScrollable=function(e){var o=e.target?e.target:e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=P(o),r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r))return o.clientHeight!=o.scrollHeight;o=!!o.parentNode&&o.parentNode}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=P(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(0<t.getNiceScroll().length)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){if(b.onscrollstart){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:b.newscrollx,y:b.newscrolly},speed:i};b.onscrollstart.call(b,s)}},this.triggerScrollEnd=function(){if(b.onscrollend){var e=b.getScrollLeft(),o=b.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};b.onscrollend.call(b,t)}};var m=0,f=0,g=0,v=1;function w(e,o,t,r){b.scrollrunning||(b.newscrolly=b.getScrollTop(),b.newscrollx=b.getScrollLeft(),g=D());var i=D()-g;if(g=D(),350<i?v=1:v+=(2-v)/10,o=o*v|0,e=e*v|0){if(r)if(e<0){if(b.getScrollLeft()>=b.page.maxw)return!0}else if(b.getScrollLeft()<=0)return!0;var s=0<e?1:-1;f!==s&&(b.scrollmom&&b.scrollmom.stop(),b.newscrollx=b.getScrollLeft(),f=s),b.lastdeltax-=e}if(o){if(function(){var e=b.getScrollTop();if(o<0){if(e>=b.page.maxh)return!0}else if(e<=0)return!0}()){if(x.nativeparentscrolling&&t&&!b.ispage&&!b.zoomactive)return!0;var n=b.view.h>>1;o=b.newscrolly<-n?(b.newscrolly=-n,-1):b.newscrolly>b.page.maxh+n?(b.newscrolly=b.page.maxh+n,1):0}var l=0<o?1:-1;m!==l&&(b.scrollmom&&b.scrollmom.stop(),b.newscrolly=b.getScrollTop(),m=l),b.lastdeltay-=o}(o||e)&&b.synched("relativexy",function(){var e=b.lastdeltay+b.newscrolly;b.lastdeltay=0;var o=b.lastdeltax+b.newscrollx;b.lastdeltax=0,b.rail.drag||b.doScrollPos(o,e)})}var z=!1;function k(e,o,t){var r,i;if(!t&&z)return!0;0===e.deltaMode?(r=-e.deltaX*(x.mousescrollstep/54)|0,i=-e.deltaY*(x.mousescrollstep/54)|0):1===e.deltaMode&&(r=-e.deltaX*x.mousescrollstep*50/80|0,i=-e.deltaY*x.mousescrollstep*50/80|0),o&&x.oneaxismousemode&&0===r&&i&&(r=i,i=0,!t||(r<0?b.getScrollLeft()>=b.page.maxw:b.getScrollLeft()<=0)&&(i=r,r=0));if(b.isrtlmode&&(r=-r),!w(r,i,t,!0))return z=!1,e.stopImmediatePropagation(),e.preventDefault();t&&(z=!0)}if(this.onmousewheel=function(e){if(b.wheelprevented||b.locked)return!1;if(b.railslocked)return b.debounced("checkunlock",b.resize,250),!1;if(b.rail.drag)return b.cancelEvent(e);if("auto"===x.oneaxismousemode&&0!==e.deltaX&&(x.oneaxismousemode=!1),x.oneaxismousemode&&0===e.deltaX&&!b.rail.scrollable)return!b.railh||!b.railh.scrollable||b.onmousewheelhr(e);var o=D(),t=!1;if(x.preservenativescrolling&&b.checkarea+600<o&&(b.nativescrollingarea=b.isScrollable(e),t=!0),b.checkarea=o,b.nativescrollingarea)return!0;var r=k(e,!1,t);return r&&(b.checkarea=0),r},this.onmousewheelhr=function(e){if(!b.wheelprevented){if(b.railslocked||!b.railh.scrollable)return!0;if(b.rail.drag)return b.cancelEvent(e);var o=D(),t=!1;return x.preservenativescrolling&&b.checkarea+600<o&&(b.nativescrollingarea=b.isScrollable(e),t=!0),b.checkarea=o,!!b.nativescrollingarea||(b.railslocked?b.cancelEvent(e):k(e,!0,t))}},this.stop=function(){return b.cancelScroll(),b.scrollmon&&b.scrollmon.stop(),b.cursorfreezed=!1,b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y)),b.noticeCursor(),b},this.getTransitionSpeed=function(e){return 80+e/72*x.scrollspeed|0},x.smoothscroll)if(b.ishwscroll&&S.hastransition&&x.usetransition&&x.smoothscroll){var T="";this.resetTransition=function(){T="",b.doc.css(S.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(e,o){var t=o?e:b.getTransitionSpeed(e),r=t+"ms";return T!==r&&(T=r,b.doc.css(S.prefixstyle+"transition-duration",r)),t},this.doScrollLeft=function(e,o){var t=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(t,e,o)},this.cursorupdate={running:!1,start:function(){var e=this;if(!e.running){e.running=!0;var o=function(){e.running&&Y(o),b.showCursor(b.getScrollTop(),b.getScrollLeft()),b.notifyScrollEvent(b.win[0])};Y(o)}},stop:function(){this.running=!1}},this.doScrollPos=function(e,o,t){var r=b.getScrollTop(),i=b.getScrollLeft();if(((b.newscrolly-r)*(o-r)<0||(b.newscrollx-i)*(e-i)<0)&&b.cancelScroll(),x.bouncescroll?(o<0?o=o/2|0:o>b.page.maxh&&(o=b.page.maxh+(o-b.page.maxh)/2|0),e<0?e=e/2|0:e>b.page.maxw&&(e=b.page.maxw+(e-b.page.maxw)/2|0)):(o<0?o=0:o>b.page.maxh&&(o=b.page.maxh),e<0?e=0:e>b.page.maxw&&(e=b.page.maxw)),b.scrollrunning&&e==b.newscrollx&&o==b.newscrolly)return!1;b.newscrolly=o,b.newscrollx=e;var s=b.getScrollTop(),n=b.getScrollLeft(),l={};l.x=e-n,l.y=o-s;var a=0|Math.sqrt(l.x*l.x+l.y*l.y),c=b.prepareTransition(a);b.scrollrunning||(b.scrollrunning=!0,b.triggerScrollStart(n,s,e,o,c),b.cursorupdate.start()),b.scrollendtrapped=!0,S.transitionend||(b.scrollendtrapped&&clearTimeout(b.scrollendtrapped),b.scrollendtrapped=setTimeout(b.onScrollTransitionEnd,c)),b.setScrollTop(b.newscrolly),b.setScrollLeft(b.newscrollx)},this.cancelScroll=function(){if(!b.scrollendtrapped)return!0;var e=b.getScrollTop(),o=b.getScrollLeft();return b.scrollrunning=!1,S.transitionend||clearTimeout(S.transitionend),b.scrollendtrapped=!1,b.resetTransition(),b.setScrollTop(e),b.railh&&b.setScrollLeft(o),b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm),b.timerscroll=!1,b.cursorfreezed=!1,b.cursorupdate.stop(),b.showCursor(e,o),b},this.onScrollTransitionEnd=function(){if(b.scrollendtrapped){var e=b.getScrollTop(),o=b.getScrollLeft();if(e<0?e=0:e>b.page.maxh&&(e=b.page.maxh),o<0?o=0:o>b.page.maxw&&(o=b.page.maxw),e!=b.newscrolly||o!=b.newscrollx)return b.doScrollPos(o,e,x.snapbackspeed);b.scrollrunning&&b.triggerScrollEnd(),b.scrollrunning=!1,b.scrollendtrapped=!1,b.resetTransition(),b.timerscroll=!1,b.setScrollTop(e),b.railh&&b.setScrollLeft(o),b.cursorupdate.stop(),b.noticeCursor(!1,e,o),b.cursorfreezed=!1}}}else this.doScrollLeft=function(e,o){var t=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=b.getScrollTop(),i=b.getScrollLeft();((b.newscrolly-r)*(o-r)<0||(b.newscrollx-i)*(e-i)<0)&&b.cancelScroll();var s=!1;if(b.bouncescroll&&b.rail.visibility||(o<0?s=!(o=0):o>b.page.maxh&&(o=b.page.maxh,s=!0)),b.bouncescroll&&b.railh.visibility||(e<0?s=!(e=0):e>b.page.maxw&&(e=b.page.maxw,s=!0)),b.scrollrunning&&b.newscrolly===o&&b.newscrollx===e)return!0;b.newscrolly=o,b.newscrollx=e,b.dst={},b.dst.x=e-i,b.dst.y=o-r,b.dst.px=i,b.dst.py=r;var n=0|Math.sqrt(b.dst.x*b.dst.x+b.dst.y*b.dst.y),l=b.getTransitionSpeed(n);b.bzscroll={};var a=s?1:.58;b.bzscroll.x=new d(i,b.newscrollx,l,0,0,a,1),b.bzscroll.y=new d(r,b.newscrolly,l,0,0,a,1);D();var c=function(){if(b.scrollrunning){var e=b.bzscroll.y.getPos();b.setScrollLeft(b.bzscroll.x.getNow()),b.setScrollTop(b.bzscroll.y.getNow()),e<=1?b.timer=Y(c):(b.scrollrunning=!1,b.timer=0,b.triggerScrollEnd())}};b.scrollrunning||(b.triggerScrollStart(i,r,e,o,l),b.scrollrunning=!0,b.timer=Y(c))},this.cancelScroll=function(){return b.timer&&H(b.timer),b.timer=0,b.bzscroll=!1,b.scrollrunning=!1,b};else this.doScrollLeft=function(e,o){var t=b.getScrollTop();b.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=b.getScrollLeft();b.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>b.page.maxw?b.page.maxw:e;r<0&&(r=0);var i=o>b.page.maxh?b.page.maxh:o;i<0&&(i=0),b.synched("scroll",function(){b.setScrollTop(i),b.setScrollLeft(r)})},this.cancelScroll=function(){};this.doScrollBy=function(e,o){w(0,e)},this.doScrollLeftBy=function(e,o){w(e,0)},this.doScrollTo=function(e,o){var t=o?Math.round(e*b.scrollratio.y):e;t<0?t=0:t>b.page.maxh&&(t=b.page.maxh),b.cursorfreezed=!1,b.doScrollTop(e)},this.checkContentSize=function(){var e=b.getContentSize();e.h==b.page.h&&e.w==b.page.w||b.resize(!1,e)},b.onscroll=function(e){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()/b.scrollratio.y),b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()/b.scrollratio.x)),b.noticeCursor()})},b.bind(b.docscroll,"scroll",b.onscroll),this.doZoomIn=function(e){if(!b.zoomactive){b.zoomactive=!0,b.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=b.win[0].style;for(var r in o){var i=o[r];b.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}b.zoomrestore.style.width=b.win.css("width"),b.zoomrestore.style.height=b.win.css("height"),b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-b.win.height()},S.isios4&&(b.zoomrestore.scrollTop=I.scrollTop(),I.scrollTop(0)),b.win.css({position:S.isios4?"absolute":"fixed",top:0,left:0,zIndex:N+100,margin:0});var s=b.win.css("backgroundColor");return""!==s&&!/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(s)||b.win.css("backgroundColor","#fff"),b.rail.css({zIndex:N+101}),b.zoom.css({zIndex:N+102}),b.zoom.css("backgroundPosition","0 -18px"),b.resizeZoom(),b.onzoomin&&b.onzoomin.call(b),b.cancelEvent(e)}},this.doZoomOut=function(e){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style),S.isios4&&I.scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0 0"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(e)},this.doZoom=function(e){return b.zoomactive?b.doZoomOut(e):b.doZoomIn(e)},this.resizeZoom=function(){if(b.zoomactive){var e=b.getScrollTop();b.win.css({width:I.width()-b.zoomrestore.padding.w+"px",height:I.height()-b.zoomrestore.padding.h+"px"}),b.onResize(),b.setScrollTop(Math.min(b.page.maxh,e))}},this.init(),P.nicescroll.push(this)}var o,t,r,X=_.MutationObserver||_.WebKitMutationObserver||!1,D=Date.now||function(){return(new Date).getTime()},A={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:(t=R.currentScript||!!(o=R.getElementsByTagName("script")).length&&o[o.length-1],0<(r=t?t.src.split("?")[0]:"").split("/").length?r.split("/").slice(0,-1).join("/")+"/":""),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},i=!1,q=function(e){var f=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,o){f.stop(),f.steptime=0,f.lasttime=D(),f.speedx=0,f.speedy=0,f.lastx=e,f.lasty=o,f.lastscrollx=-1,f.lastscrolly=-1},this.update=function(e,o){var t=D();f.steptime=t-f.lasttime,f.lasttime=t;var r=o-f.lasty,i=e-f.lastx,s=f.nc.getScrollTop()+r,n=f.nc.getScrollLeft()+i;f.snapx=n<0||n>f.nc.page.maxw,f.snapy=s<0||s>f.nc.page.maxh,f.speedx=i,f.speedy=r,f.lastx=e,f.lasty=o},this.stop=function(){f.nc.unsynched("domomentum2d"),f.timer&&clearTimeout(f.timer),f.timer=0,f.lastscrollx=-1,f.lastscrolly=-1},this.doSnapy=function(e,o){var t=!1;o<0?t=!(o=0):o>f.nc.page.maxh&&(o=f.nc.page.maxh,t=!0),e<0?t=!(e=0):e>f.nc.page.maxw&&(e=f.nc.page.maxw,t=!0),t?f.nc.doScrollPos(e,o,f.nc.opt.snapbackspeed):f.nc.triggerScrollEnd()},this.doMomentum=function(e){var o=D(),t=e?o+e:f.lasttime,r=f.nc.getScrollLeft(),i=f.nc.getScrollTop(),s=f.nc.page.maxh,n=f.nc.page.maxw;f.speedx=0<n?Math.min(60,f.speedx):0,f.speedy=0<s?Math.min(60,f.speedy):0;var l=t&&o-t<=60;(i<0||s<i||r<0||n<r)&&(l=!1);var a=!(!f.speedy||!l)&&f.speedy,c=!(!f.speedx||!l)&&f.speedx;if(a||c){var d=Math.max(16,f.steptime);if(50<d){var u=d/50;f.speedx*=u,f.speedy*=u,d=50}f.demulxy=0,f.lastscrollx=f.nc.getScrollLeft(),f.chkx=f.lastscrollx,f.lastscrolly=f.nc.getScrollTop(),f.chky=f.lastscrolly;var h=f.lastscrollx,p=f.lastscrolly,m=function(){var e=600<D()-o?.04:.02;f.speedx&&(h=Math.floor(f.lastscrollx-f.speedx*(1-f.demulxy)),((f.lastscrollx=h)<0||n<h)&&(e=.1)),f.speedy&&(p=Math.floor(f.lastscrolly-f.speedy*(1-f.demulxy)),((f.lastscrolly=p)<0||s<p)&&(e=.1)),f.demulxy=Math.min(1,f.demulxy+e),f.nc.synched("domomentum2d",function(){if(f.speedx){f.nc.getScrollLeft();f.chkx=h,f.nc.setScrollLeft(h)}if(f.speedy){f.nc.getScrollTop();f.chky=p,f.nc.setScrollTop(p)}f.timer||(f.nc.hideCursor(),f.doSnapy(h,p))}),f.demulxy<1?f.timer=setTimeout(m,d):(f.stop(),f.nc.hideCursor(),f.doSnapy(h,p))};m()}else f.doSnapy(f.nc.getScrollLeft(),f.nc.getScrollTop())}},n=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=P.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():n.call(e)},set:function(e,o){var t=P.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):n.call(e,o),this}},e.fn.scrollTop=function(o){if(void 0!==o)return this.each(function(){var e=P.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollTop(parseInt(o)):n.call(P(this),o)});var e=this[0]&&P.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollTop():n.call(this)};var a=e.fn.scrollLeft;P.cssHooks.pageXOffset={get:function(e,o,t){var r=P.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():a.call(e)},set:function(e,o){var t=P.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):a.call(e,o),this}},e.fn.scrollLeft=function(o){if(void 0!==o)return this.each(function(){var e=P.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollLeft(parseInt(o)):a.call(P(this),o)});var e=this[0]&&P.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollLeft():a.call(this)};function c(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return P.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=P.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this}!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(c.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new c(this):this[e]&&P.data(this[e],"__nicescroll")||!1},(e.expr.pseudos||e.expr[":"]).nicescroll=function(e){return void 0!==P.data(e,"__nicescroll")},P.fn.niceScroll=function(i,s){void 0!==s||"object"!=typeof i||"jquery"in i||(s=i,i=!1);var n=new c;return this.each(function(){var e=P(this),o=P.extend({},s);if(i){var t=P(i);o.doc=1<t.length?P(i,e):t,o.win=e}!("doc"in o)||"win"in o||(o.win=e);var r=e.data("__nicescroll")||!1;r||(o.doc=o.doc||e,r=new l(o,e),e.data("__nicescroll",r)),n.push(r)}),1===n.length?n[0]:n},_.NiceScroll={getjQuery:function(){return e}},P.nicescroll||(P.nicescroll=new c,P.nicescroll.options=A)});
 
wppa-comment-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all comments
6
- * Version 7.3.00
7
  *
8
  */
9
 
@@ -84,12 +84,12 @@ class WPPA_Comment_table extends WP_List_Table {
84
  $result =
85
  '<img' .
86
  ' src="' . $src . '"' .
87
- ' style="width:100px;"' .
88
  ' title="' . $title . '"' .
89
  ' />' .
90
  '<br />' .
91
- '#' . $item['id'] . ' ' .
92
- __( 'Photo', 'wp-photo-album-plus' ) . ' #' . $item['photo'];
93
 
94
  return $result;
95
  }
@@ -385,10 +385,10 @@ function _wppa_comment_admin() {
385
  </script>
386
  <style type="text/css" >
387
  .column-photo {
388
- width:110px;
389
  }
390
  .column-user, .column-email, .column-timestamp {
391
- width:160px;
392
  }
393
  .column-status {
394
  width:100px;
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all comments
6
+ * Version 7.3.01
7
  *
8
  */
9
 
84
  $result =
85
  '<img' .
86
  ' src="' . $src . '"' .
87
+ ' style="width:170px;"' .
88
  ' title="' . $title . '"' .
89
  ' />' .
90
  '<br />' .
91
+ $item['id'] . ' ' .
92
+ __( 'Photo', 'wp-photo-album-plus' ) . ': ' . $item['photo'];
93
 
94
  return $result;
95
  }
385
  </script>
386
  <style type="text/css" >
387
  .column-photo {
388
+ width:180px;
389
  }
390
  .column-user, .column-email, .column-timestamp {
391
+ width:180px;
392
  }
393
  .column-status {
394
  width:100px;
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
- * Version 7.3.00
7
  *
8
  */
9
 
@@ -200,6 +200,7 @@ horizrailenabled:false,";
200
  'wppa_navigation_type' => 'icons', // 0
201
  'wppa_show_startstop_navigation' => 'yes', // 1
202
  'wppa_show_startstop_filmonly' => 'no',
 
203
  'wppa_show_browse_navigation' => 'yes', // 2
204
  'wppa_filmstrip' => 'yes', // 3
205
  'wppa_film_show_glue' => 'yes', // 4
@@ -564,6 +565,7 @@ horizrailenabled:false,";
564
  'wppa_slideshow_page_allow_ajax' => 'yes',
565
  'wppa_filmonly_continuous' => 'no',
566
  'wppa_filmonly_random' => 'no',
 
567
 
568
  // C Thumbnail
569
  'wppa_list_photos_by' => '0',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
+ * Version 7.3.01
7
  *
8
  */
9
 
200
  'wppa_navigation_type' => 'icons', // 0
201
  'wppa_show_startstop_navigation' => 'yes', // 1
202
  'wppa_show_startstop_filmonly' => 'no',
203
+ 'wppa_show_renew_filmonly' => 'no',
204
  'wppa_show_browse_navigation' => 'yes', // 2
205
  'wppa_filmstrip' => 'yes', // 3
206
  'wppa_film_show_glue' => 'yes', // 4
565
  'wppa_slideshow_page_allow_ajax' => 'yes',
566
  'wppa_filmonly_continuous' => 'no',
567
  'wppa_filmonly_random' => 'no',
568
+ 'wppa_no_animate_on_mobile' => 'no',
569
 
570
  // C Thumbnail
571
  'wppa_list_photos_by' => '0',
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.3.00
7
  *
8
  */
9
 
@@ -223,6 +223,13 @@ global $wppa_session;
223
 
224
  // 3. The filter supplied the data
225
  else {
 
 
 
 
 
 
 
226
  if ( wppa( 'is_admins_choice' ) ) {
227
  $args = wppa( 'admins_choice_users' );
228
  wppa_admins_choice_box( $args );
@@ -3646,6 +3653,11 @@ global $blog_id;
3646
  wppa_out( wppa_js( "\n" . 'wppaLightboxSingle[' . wppa( 'mocc' ) . '] = ' . ( wppa_opt( 'slideshow_linktype' ) == 'lightboxsingle' ? 'true': 'false' ) . ';' ) );
3647
  }
3648
  wppa_out( wppa_js( "\n" . 'wppaSearchBoxSelItems[' . wppa( 'mocc' ) . '] = ' . ( ( wppa_switch( 'search_catbox' ) ? 1 : 0 ) + wppa_opt( 'search_selboxes' ) + 1 ) . ';' ) );
 
 
 
 
 
3649
  wppa_out( wppa_js( "\n" . '</script>' ) );
3650
 
3651
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.3.01
7
  *
8
  */
9
 
223
 
224
  // 3. The filter supplied the data
225
  else {
226
+ if ( wppa_get_get( 'filmonly' ) ) {
227
+ wppa( 'is_slideonly', '1' );
228
+ wppa( 'is_filmonly', '1' );
229
+ wppa( 'film_on', '1' );
230
+ wppa( 'start_album', wppa_get_get( 'album' ) );
231
+ wppa( 'start_photo', wppa_get_get( 'photo' ) );
232
+ }
233
  if ( wppa( 'is_admins_choice' ) ) {
234
  $args = wppa( 'admins_choice_users' );
235
  wppa_admins_choice_box( $args );
3653
  wppa_out( wppa_js( "\n" . 'wppaLightboxSingle[' . wppa( 'mocc' ) . '] = ' . ( wppa_opt( 'slideshow_linktype' ) == 'lightboxsingle' ? 'true': 'false' ) . ';' ) );
3654
  }
3655
  wppa_out( wppa_js( "\n" . 'wppaSearchBoxSelItems[' . wppa( 'mocc' ) . '] = ' . ( ( wppa_switch( 'search_catbox' ) ? 1 : 0 ) + wppa_opt( 'search_selboxes' ) + 1 ) . ';' ) );
3656
+
3657
+ wppa_out( wppa_js( "\n" . 'wppaFilmInit[' . wppa( 'mocc' ) . '] = false;' ) );
3658
+ if ( wppa( 'is_filmonly' ) ) {
3659
+ wppa_out( wppa_js( "\n" . '_wppaCurIdx['.wppa( 'mocc' ).'] = 0;' ) );
3660
+ }
3661
  wppa_out( wppa_js( "\n" . '</script>' ) );
3662
 
3663
  }
wppa-import.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
- * Version 7.3.00
7
  *
8
  */
9
 
@@ -2176,7 +2176,7 @@ global $wppa_session;
2176
  }
2177
  }
2178
  else {
2179
- wppa_error_message( sprintf( __( 'Error inserting photo %s, unknown or non existent album.', 'wp-photo-album-plus'), hmlentities( basename( $file ) ) ) );
2180
  }
2181
  } // Insert
2182
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
+ * Version 7.3.01
7
  *
8
  */
9
 
2176
  }
2177
  }
2178
  else {
2179
+ wppa_error_message( sprintf( __( 'Error inserting photo %s, unknown or non existent album.', 'wp-photo-album-plus'), htmlentities( basename( $file ) ) ) );
2180
  }
2181
  } // Insert
2182
  }
wppa-non-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
- * Version 7.3.00
7
  *
8
  */
9
 
@@ -335,24 +335,10 @@ global $wppa_opt;
335
 
336
  // Nicescroller
337
  if ( wppa_switch( 'nicescroll' ) || wppa_switch( 'nicescroll_window' ) || wppa_switch( 'load_nicescroller' ) ) {
338
-
339
- // jQuery Easing
340
- $easing_url = 'https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.js';
341
- $easing_cdn = wp_remote_get( $easing_url );
342
- if( (int) wp_remote_retrieve_response_code( $easing_cdn ) !== 200 ) {
343
-
344
- $easing_url = WPPA_URL . '/vendor/jquery-easing/jquery.easing.min.js';
345
- }
346
- wp_enqueue_script( 'nicescrollr-easing-min-js', $easing_url, array( 'jquery' ), 'all' );
347
-
348
- // Nicescroll Library
349
- $nice_url = 'https://cdnjs.cloudflare.com/ajax/libs/jquery.nicescroll/3.7.6/jquery.nicescroll.min.js';
350
- $nice_cdn = wp_remote_get( $nice_url );
351
- if( (int) wp_remote_retrieve_response_code( $nice_cdn ) !== 200 ) {
352
-
353
- $nice_url = WPPA_URL . '/vendor/nicescroll/jquery.nicescroll.min.js';
354
- }
355
  wp_enqueue_script( 'nicescrollr-inc-nicescroll-min-js', $nice_url, array( 'jquery', 'nicescrollr-easing-min-js' ), 'all' );
 
 
356
  }
357
 
358
  // Panorama
@@ -1012,7 +998,8 @@ wppaResponseSpeed = ' . wppa_opt( 'response_speed' ) . ';
1012
  wppaExtendedResizeCount = ' . wppa_opt( 'extended_resize_count' ) . ';
1013
  wppaExtendedResizeDelay = ' . wppa_opt( 'extended_resize_delay' ) . ';
1014
  wppaCoverSpacing = ' . wppa_opt( 'cover_spacing' ) . ';
1015
- wppaFilmonlyContinuous = ' . ( wppa_switch( 'filmonly_continuous' ) ? 'true' : 'false' ) . ';';
 
1016
 
1017
  // Thumbnail aspect (for real calendar)
1018
  $aspect = 1;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 7.3.01
7
  *
8
  */
9
 
335
 
336
  // Nicescroller
337
  if ( wppa_switch( 'nicescroll' ) || wppa_switch( 'nicescroll_window' ) || wppa_switch( 'load_nicescroller' ) ) {
338
+ $nice_url = WPPA_URL . '/vendor/nicescroll/jquery.nicescroll.min.js';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  wp_enqueue_script( 'nicescrollr-inc-nicescroll-min-js', $nice_url, array( 'jquery', 'nicescrollr-easing-min-js' ), 'all' );
340
+ $easing_url = WPPA_URL . '/vendor/jquery-easing/jquery.easing.min.js';
341
+ wp_enqueue_script( 'nicescrollr-easing-min-js', $easing_url, array( 'jquery' ), 'all' );
342
  }
343
 
344
  // Panorama
998
  wppaExtendedResizeCount = ' . wppa_opt( 'extended_resize_count' ) . ';
999
  wppaExtendedResizeDelay = ' . wppa_opt( 'extended_resize_delay' ) . ';
1000
  wppaCoverSpacing = ' . wppa_opt( 'cover_spacing' ) . ';
1001
+ wppaFilmonlyContinuous = ' . ( wppa_switch( 'filmonly_continuous' ) ? 'true' : 'false' ) . ';
1002
+ wppaNoAnimateOnMobile = ' . ( wppa_switch( 'no_animate_on_mobile' ) ? 'true' : 'false' ) . '';
1003
 
1004
  // Thumbnail aspect (for real calendar)
1005
  $aspect = 1;
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 7.3.00
7
  *
8
  */
9
 
@@ -2059,6 +2059,15 @@ global $wppa_supported_camara_brands;
2059
  $tags = 'slide,navi';
2060
  wppa_setting($slug, '1.1', $name, $desc, $html, $help, $clas, $tags);
2061
 
 
 
 
 
 
 
 
 
 
2062
  $name = __('Browse bar', 'wp-photo-album-plus');
2063
  $desc = __('Show Browse photos bar.', 'wp-photo-album-plus');
2064
  $help = (__('If checked: display the preveous/next navigation bar under the full-size images and slideshow', 'wp-photo-album-plus'));
@@ -4519,16 +4528,16 @@ global $wppa_supported_camara_brands;
4519
  $options = array( __('Fade out and in simultaneous', 'wp-photo-album-plus'),
4520
  __('Fade in after fade out', 'wp-photo-album-plus'),
4521
  __('Shift adjacent', 'wp-photo-album-plus'),
4522
- __('Stack on', 'wp-photo-album-plus'),
4523
- __('Stack off', 'wp-photo-album-plus'),
4524
- __('Turn over', 'wp-photo-album-plus')
4525
  );
4526
  $values = array( 'fadeover',
4527
  'fadeafter',
4528
  'swipe',
4529
- 'stackon',
4530
- 'stackoff',
4531
- 'turnover'
4532
  );
4533
  $html = wppa_select($slug, $options, $values);
4534
  $clas = '';
@@ -4654,7 +4663,7 @@ global $wppa_supported_camara_brands;
4654
  $clas = '';
4655
  $tags = 'slide,system';
4656
  wppa_setting($slug, '16', $name, $desc, $html, $help, $clas, $tags);
4657
-
4658
  $name = __('Filmonly random', 'wp-photo-album-plus');
4659
  $desc = __('Set sequence in filmonly to random');
4660
  $help = __('Every pageload the sequence will be different', 'wp-photo-album-plus');
@@ -4664,6 +4673,15 @@ global $wppa_supported_camara_brands;
4664
  $tags = 'slide,system';
4665
  wppa_setting($slug, '17', $name, $desc, $html, $help, $clas, $tags);
4666
 
 
 
 
 
 
 
 
 
 
4667
  }
4668
  wppa_setting_subheader( 'C', '1', __( 'Thumbnail related settings' , 'wp-photo-album-plus') );
4669
  {
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 7.3.01
7
  *
8
  */
9
 
2059
  $tags = 'slide,navi';
2060
  wppa_setting($slug, '1.1', $name, $desc, $html, $help, $clas, $tags);
2061
 
2062
+ $name = __('Renew on Filmonly', 'wp-photo-album-plus');
2063
+ $desc = __('Show renew link on filmonly displays.', 'wp-photo-album-plus');
2064
+ $help = '';
2065
+ $slug = 'wppa_show_renew_filmonly';
2066
+ $html = wppa_checkbox($slug);
2067
+ $clas = '';
2068
+ $tags = 'slide,navi';
2069
+ wppa_setting($slug, '1.2', $name, $desc, $html, $help, $clas, $tags);
2070
+
2071
  $name = __('Browse bar', 'wp-photo-album-plus');
2072
  $desc = __('Show Browse photos bar.', 'wp-photo-album-plus');
2073
  $help = (__('If checked: display the preveous/next navigation bar under the full-size images and slideshow', 'wp-photo-album-plus'));
4528
  $options = array( __('Fade out and in simultaneous', 'wp-photo-album-plus'),
4529
  __('Fade in after fade out', 'wp-photo-album-plus'),
4530
  __('Shift adjacent', 'wp-photo-album-plus'),
4531
+ // __('Stack on', 'wp-photo-album-plus'),
4532
+ // __('Stack off', 'wp-photo-album-plus'),
4533
+ // __('Turn over', 'wp-photo-album-plus')
4534
  );
4535
  $values = array( 'fadeover',
4536
  'fadeafter',
4537
  'swipe',
4538
+ // 'stackon',
4539
+ // 'stackoff',
4540
+ // 'turnover'
4541
  );
4542
  $html = wppa_select($slug, $options, $values);
4543
  $clas = '';
4663
  $clas = '';
4664
  $tags = 'slide,system';
4665
  wppa_setting($slug, '16', $name, $desc, $html, $help, $clas, $tags);
4666
+
4667
  $name = __('Filmonly random', 'wp-photo-album-plus');
4668
  $desc = __('Set sequence in filmonly to random');
4669
  $help = __('Every pageload the sequence will be different', 'wp-photo-album-plus');
4673
  $tags = 'slide,system';
4674
  wppa_setting($slug, '17', $name, $desc, $html, $help, $clas, $tags);
4675
 
4676
+ $name = __('No animate on mobile', 'wp-photo-album-plus');
4677
+ $desc = __('Suppress slideshow animations on mobile devices.', 'wp-photo-album-plus');
4678
+ $help = '';
4679
+ $slug = 'wppa_no_animate_on_mobile';
4680
+ $html = wppa_checkbox($slug);
4681
+ $clas = '';
4682
+ $tags = 'slide,system';
4683
+ wppa_setting($slug, '18', $name, $desc, $html, $help, $clas, $tags);
4684
+
4685
  }
4686
  wppa_setting_subheader( 'C', '1', __( 'Thumbnail related settings' , 'wp-photo-album-plus') );
4687
  {
wppa-slideshow.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
- * Version 7.3.00
7
  *
8
  */
9
 
@@ -298,8 +298,24 @@ function wppa_start_stop_icons( $opt = '' ) {
298
  ) .
299
  ' >' .
300
  wppa_get_svghtml( 'Eagle-1', $iconsize ) .
301
- '</span>' .
302
- '</div>' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  }
304
  }
305
  function wppa_start_stop_text( $opt = '' ) {
@@ -368,8 +384,23 @@ function wppa_start_stop_text( $opt = '' ) {
368
  ) .
369
  ' >' .
370
  __('Faster', 'wp-photo-album-plus') .
371
- '</a>' .
372
- '</div>' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  }
374
  }
375
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
+ * Version 7.3.01
7
  *
8
  */
9
 
298
  ) .
299
  ' >' .
300
  wppa_get_svghtml( 'Eagle-1', $iconsize ) .
301
+ '</span>' );
302
+
303
+ // Renew link on slidonly?
304
+ if ( wppa( 'is_filmonly' ) && wppa_switch( 'show_renew_filmonly' ) ) {
305
+ $ajax_url = wppa_get_ajaxlink();
306
+ wppa_out(
307
+ '<span
308
+ id="renew-'.wppa( 'mocc' ).'"
309
+ class="wppa-nav-text renew"
310
+ style="'.wppa_wcs('wppa-nav-text').' float:right;"
311
+ title="' . esc_attr( __('Renew', 'wp-photo-album-plus') ) . '"
312
+ onclick="_wppaStop('.wppa('mocc').');wppaDoAjaxRender('.wppa('mocc').', \''.$ajax_url.'wppa-slide=1&amp;wppa-filmonly=1&amp;wppa-album='.wppa('start_album').'&amp\', \'\' )"
313
+ >' .
314
+ wppa_get_svghtml( 'Redo', $iconsize ) . '
315
+ </span>' );
316
+ }
317
+
318
+ wppa_out( '</div>' );
319
  }
320
  }
321
  function wppa_start_stop_text( $opt = '' ) {
384
  ) .
385
  ' >' .
386
  __('Faster', 'wp-photo-album-plus') .
387
+ '</a>' );
388
+
389
+ // Renew link on slidonly?
390
+ if ( wppa( 'is_filmonly' ) && wppa_switch( 'show_renew_filmonly' ) ) {
391
+ $ajax_url = wppa_get_ajaxlink();
392
+ wppa_out(
393
+ '<a
394
+ id="renew-'.wppa( 'mocc' ).'"
395
+ class="wppa-nav-text renew"
396
+ style="'.wppa_wcs('wppa-nav-text').' float:right;"
397
+ onclick="wppaDoAjaxRender('.wppa('mocc').', \''.$ajax_url.'wppa-slide=1&amp;wppa-filmonly=1&amp;wppa-album='.wppa('start_album').'&amp\', \'\' )"
398
+ >' .
399
+ __('Renew', 'wp-photo-album-plus') . '
400
+ </a>' );
401
+ }
402
+
403
+ wppa_out( '</div>' );
404
  }
405
  }
406
 
wppa-thumbnails.php CHANGED
@@ -255,7 +255,7 @@ global $wpdb;
255
  ' width="' . $imgwidth . '"' .
256
  ' height="' . $imgheight . '"' .
257
  ' style="' . $imgstyle . ' cursor:pointer;"' .
258
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
259
  ' ' . $events .
260
  ' />';
261
  }
@@ -293,7 +293,7 @@ global $wpdb;
293
  ' id="i-' . $xid . '-' . $mocc . '"' .
294
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '" ' . $imgalt .
295
  ( $title ? ' title="' . $title . '"' : '' ) .
296
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
297
  ' width="' . $imgwidth . '"' .
298
  ' height="' . $imgheight . '"' .
299
  ' style="' . $imgstyle . ' cursor:pointer;"' .
@@ -352,7 +352,7 @@ global $wpdb;
352
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
353
  ' ' . $imgalt .
354
  ( $title ? ' title="' . $title . '"' : '' ) .
355
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
356
  ' width="' . $imgwidth . '"' .
357
  ' height="' . $imgheight . '"' .
358
  ' style="' . $imgstyle . $cursor . '"' .
@@ -394,7 +394,7 @@ global $wpdb;
394
  ' width="' . $imgwidth . '"' .
395
  ' height="' . $imgheight . '"' .
396
  ' style="' . $imgstyle . ' cursor:pointer;"' .
397
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
398
  ' ' . $events .
399
  ' />';
400
  }
@@ -436,7 +436,7 @@ global $wpdb;
436
  ' width="' . $imgwidth . '"' .
437
  ' height="' . $imgheight . '"' .
438
  ' style="' . $imgstyle . '"' .
439
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
440
  ' ' . $events .
441
  ' />';
442
  }
@@ -470,7 +470,7 @@ global $wpdb;
470
  ' width="' . $imgwidth . '"' .
471
  ' height="' . $imgheight . '"' .
472
  ' style="' . $imgstyle . '"' .
473
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
474
  ' ' . $events . ' />';
475
  }
476
  }
@@ -973,7 +973,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
973
  $result .= '<img' .
974
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $src . '"' .
975
  ' ' . wppa_get_imgalt( $id ) .
976
- ' class="image wppa-img ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
977
  ' width="' . $imgwidth . '"' .
978
  ' height="' . $imgheight . '"' .
979
  ' style="' . wppa_wcs( 'wppa-img' ) . $imgattr . $cursor . '"' .
@@ -1012,7 +1012,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
1012
  $result .= '<img' .
1013
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $src . '"' .
1014
  ' ' . wppa_get_imgalt( $id ) .
1015
- ' class="image wppa-img ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
1016
  ' width="' . $imgwidth . '"' .
1017
  ' height="' . $imgheight . '"' .
1018
  ' style="' . wppa_wcs( 'wppa-img' ) . $imgattr . '"' .
@@ -1045,7 +1045,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
1045
  $result .= '<img' .
1046
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $src . '"' .
1047
  ' ' . wppa_get_imgalt( $id ) .
1048
- ' class="image wppa-img wppa-lazy"' .
1049
  ' width="' . $imgwidth . '"' .
1050
  ' height="' . $imgheight . '"' .
1051
  ' style="' . wppa_wcs( 'wppa-img' ) . $imgattr . '"' .
@@ -1191,7 +1191,7 @@ global $wpdb;
1191
  ' ' . $imgalt .
1192
  ( $title ? ' title="' . $title . '"' : '' ) .
1193
  ' style="'.$style.'"' .
1194
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1195
  ' />' .
1196
  '</a>';
1197
  return;
@@ -1286,7 +1286,7 @@ global $wpdb;
1286
  ' ' . $imgalt .
1287
  ( $title ? ' title="' . $title . '"' : '' ) .
1288
  ' style="' . $imgstyle . ' cursor:pointer;"' .
1289
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1290
  ' ' . $events .
1291
  ' />';
1292
  }
@@ -1323,7 +1323,7 @@ global $wpdb;
1323
  ' ' . $imgalt .
1324
  ( $title ? ' title="' . $title . '"' : '' ) .
1325
  ' style="' . $imgstyle . 'cursor:pointer;"' .
1326
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1327
  ' ' . $events .
1328
  ' />';
1329
  }
@@ -1383,7 +1383,7 @@ global $wpdb;
1383
  ' ' . $imgalt .
1384
  ( $title ? ' title="' . $title . '"' : '' ) .
1385
  ' style="' . $imgstyle . $cursor . '"' .
1386
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1387
  ' ' . $events .
1388
  ' />';
1389
  }
@@ -1426,7 +1426,7 @@ global $wpdb;
1426
  ' ' . $imgalt .
1427
  ( $title ? ' title="' . $title . '"' : '' ) .
1428
  ' style="' . $imgstyle . 'cursor:pointer;"' .
1429
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1430
  ' ' . $events .
1431
  ' />';
1432
  }
@@ -1471,7 +1471,7 @@ global $wpdb;
1471
  ' width="' . $imgwidth . '"' .
1472
  ' height="' . $imgheight . '"' .
1473
  ' style="' . $imgstyle . '"' .
1474
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1475
  ' ' . $events .
1476
  ' />';
1477
  }
@@ -1508,7 +1508,7 @@ global $wpdb;
1508
  ' width="' . $imgwidth . '"' .
1509
  ' height="' . $imgheight . '"' .
1510
  ' style="' . $imgstyle . '" ' . $events .
1511
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1512
  ' />';
1513
  }
1514
  }
@@ -1656,7 +1656,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1656
  ' style="' . $imgstyle_a['style'] . ' cursor:pointer;"' .
1657
  ' ' . $imgevents .
1658
  ' ' . wppa_get_imgalt( $id ) .
1659
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1660
  ' />';
1661
  }
1662
  }
@@ -1711,7 +1711,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1711
  ' style="' . $imgstyle_a['style'] . '"' .
1712
  ' ' . $imgevents .
1713
  ' ' . wppa_get_imgalt( $id ) .
1714
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1715
  ' />';
1716
  }
1717
  }
@@ -1749,7 +1749,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1749
  ' ' . $imgevents .
1750
  ' onclick="' . $link['url'] . '"' .
1751
  ' ' . wppa_get_imgalt( $id ) .
1752
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1753
  ' />';
1754
  }
1755
  }
@@ -1790,7 +1790,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1790
  ' style="' . $imgstyle_a['style'] . '"' .
1791
  ' ' . $imgevents .
1792
  ' ' . wppa_get_imgalt( $id ) .
1793
- ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
1794
  ' />';
1795
  }
1796
  }
@@ -1845,7 +1845,7 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1845
  $events .= ' onclick="wppaGotoKeepState( '.$mocc.', '.$idx.' )"';
1846
  $events .= ' ondblclick="wppaStartStop( '.$mocc.', -1 )"';
1847
  }
1848
-
1849
  // pre-ambule images transfer click to their originals on lightbox link
1850
  elseif ( ! $do_for_feed ) {
1851
  $events .= ' onclick="jQuery(\'#wppa-film-' . $idx . '-' . $mocc . '\').trigger(\'click\');"';
@@ -1915,8 +1915,8 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1915
  else {
1916
  $result .= '<img' .
1917
  ' id="wppa-' . $tmp . '-' . $idx . '-' . $mocc . '"' .
1918
- ' class="wppa-'.$tmp.'-'.$mocc.' ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
1919
- ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $url . '"' .
1920
  ' ' . $imgalt .
1921
  ' style="' . $imgstyle . $cursor . '"' .
1922
  ' ' . $events .
255
  ' width="' . $imgwidth . '"' .
256
  ' height="' . $imgheight . '"' .
257
  ' style="' . $imgstyle . ' cursor:pointer;"' .
258
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
259
  ' ' . $events .
260
  ' />';
261
  }
293
  ' id="i-' . $xid . '-' . $mocc . '"' .
294
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '" ' . $imgalt .
295
  ( $title ? ' title="' . $title . '"' : '' ) .
296
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
297
  ' width="' . $imgwidth . '"' .
298
  ' height="' . $imgheight . '"' .
299
  ' style="' . $imgstyle . ' cursor:pointer;"' .
352
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
353
  ' ' . $imgalt .
354
  ( $title ? ' title="' . $title . '"' : '' ) .
355
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
356
  ' width="' . $imgwidth . '"' .
357
  ' height="' . $imgheight . '"' .
358
  ' style="' . $imgstyle . $cursor . '"' .
394
  ' width="' . $imgwidth . '"' .
395
  ' height="' . $imgheight . '"' .
396
  ' style="' . $imgstyle . ' cursor:pointer;"' .
397
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
398
  ' ' . $events .
399
  ' />';
400
  }
436
  ' width="' . $imgwidth . '"' .
437
  ' height="' . $imgheight . '"' .
438
  ' style="' . $imgstyle . '"' .
439
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
440
  ' ' . $events .
441
  ' />';
442
  }
470
  ' width="' . $imgwidth . '"' .
471
  ' height="' . $imgheight . '"' .
472
  ' style="' . $imgstyle . '"' .
473
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
474
  ' ' . $events . ' />';
475
  }
476
  }
973
  $result .= '<img' .
974
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $src . '"' .
975
  ' ' . wppa_get_imgalt( $id ) .
976
+ ' class="image wppa-img ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy wppa-lazy-'.$mocc : '' ) . '"' .
977
  ' width="' . $imgwidth . '"' .
978
  ' height="' . $imgheight . '"' .
979
  ' style="' . wppa_wcs( 'wppa-img' ) . $imgattr . $cursor . '"' .
1012
  $result .= '<img' .
1013
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $src . '"' .
1014
  ' ' . wppa_get_imgalt( $id ) .
1015
+ ' class="image wppa-img ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy wppa-lazy-'.$mocc : '' ) . '"' .
1016
  ' width="' . $imgwidth . '"' .
1017
  ' height="' . $imgheight . '"' .
1018
  ' style="' . wppa_wcs( 'wppa-img' ) . $imgattr . '"' .
1045
  $result .= '<img' .
1046
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $src . '"' .
1047
  ' ' . wppa_get_imgalt( $id ) .
1048
+ ' class="image wppa-img wppa-lazy wppa-lazy-'.$mocc.'"' .
1049
  ' width="' . $imgwidth . '"' .
1050
  ' height="' . $imgheight . '"' .
1051
  ' style="' . wppa_wcs( 'wppa-img' ) . $imgattr . '"' .
1191
  ' ' . $imgalt .
1192
  ( $title ? ' title="' . $title . '"' : '' ) .
1193
  ' style="'.$style.'"' .
1194
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1195
  ' />' .
1196
  '</a>';
1197
  return;
1286
  ' ' . $imgalt .
1287
  ( $title ? ' title="' . $title . '"' : '' ) .
1288
  ' style="' . $imgstyle . ' cursor:pointer;"' .
1289
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1290
  ' ' . $events .
1291
  ' />';
1292
  }
1323
  ' ' . $imgalt .
1324
  ( $title ? ' title="' . $title . '"' : '' ) .
1325
  ' style="' . $imgstyle . 'cursor:pointer;"' .
1326
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1327
  ' ' . $events .
1328
  ' />';
1329
  }
1383
  ' ' . $imgalt .
1384
  ( $title ? ' title="' . $title . '"' : '' ) .
1385
  ' style="' . $imgstyle . $cursor . '"' .
1386
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1387
  ' ' . $events .
1388
  ' />';
1389
  }
1426
  ' ' . $imgalt .
1427
  ( $title ? ' title="' . $title . '"' : '' ) .
1428
  ' style="' . $imgstyle . 'cursor:pointer;"' .
1429
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1430
  ' ' . $events .
1431
  ' />';
1432
  }
1471
  ' width="' . $imgwidth . '"' .
1472
  ' height="' . $imgheight . '"' .
1473
  ' style="' . $imgstyle . '"' .
1474
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1475
  ' ' . $events .
1476
  ' />';
1477
  }
1508
  ' width="' . $imgwidth . '"' .
1509
  ' height="' . $imgheight . '"' .
1510
  ' style="' . $imgstyle . '" ' . $events .
1511
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1512
  ' />';
1513
  }
1514
  }
1656
  ' style="' . $imgstyle_a['style'] . ' cursor:pointer;"' .
1657
  ' ' . $imgevents .
1658
  ' ' . wppa_get_imgalt( $id ) .
1659
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1660
  ' />';
1661
  }
1662
  }
1711
  ' style="' . $imgstyle_a['style'] . '"' .
1712
  ' ' . $imgevents .
1713
  ' ' . wppa_get_imgalt( $id ) .
1714
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1715
  ' />';
1716
  }
1717
  }
1749
  ' ' . $imgevents .
1750
  ' onclick="' . $link['url'] . '"' .
1751
  ' ' . wppa_get_imgalt( $id ) .
1752
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1753
  ' />';
1754
  }
1755
  }
1790
  ' style="' . $imgstyle_a['style'] . '"' .
1791
  ' ' . $imgevents .
1792
  ' ' . wppa_get_imgalt( $id ) .
1793
+ ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy wppa-lazy-'.$mocc.'"' : '' ) .
1794
  ' />';
1795
  }
1796
  }
1845
  $events .= ' onclick="wppaGotoKeepState( '.$mocc.', '.$idx.' )"';
1846
  $events .= ' ondblclick="wppaStartStop( '.$mocc.', -1 )"';
1847
  }
1848
+
1849
  // pre-ambule images transfer click to their originals on lightbox link
1850
  elseif ( ! $do_for_feed ) {
1851
  $events .= ' onclick="jQuery(\'#wppa-film-' . $idx . '-' . $mocc . '\').trigger(\'click\');"';
1915
  else {
1916
  $result .= '<img' .
1917
  ' id="wppa-' . $tmp . '-' . $idx . '-' . $mocc . '"' .
1918
+ ' class="wppa-'.$tmp.'-'.$mocc.' ' . ( ( wppa_switch( 'lazy' ) && $tmp == 'film' ) ? 'wppa-lazy wppa-lazy-'.$mocc : '' ) . '"' .
1919
+ ' ' . ( ( wppa_switch( 'lazy' ) && $tmp == 'film' ) ? 'data-' : '' ) . 'src="' . $url . '"' .
1920
  ' ' . $imgalt .
1921
  ' style="' . $imgstyle . $cursor . '"' .
1922
  ' ' . $events .
wppa-utils.php CHANGED
@@ -3434,6 +3434,7 @@ $border = false; // debug
3434
  'Down-4',
3435
  'ZoomIn',
3436
  'ZoomOut',
 
3437
 
3438
  ) ) ) {
3439
 
@@ -3625,6 +3626,11 @@ $border = false; // debug
3625
  '"' .
3626
  '/>';
3627
  break;
 
 
 
 
 
3628
  default:
3629
  break;
3630
  }
3434
  'Down-4',
3435
  'ZoomIn',
3436
  'ZoomOut',
3437
+ 'Redo',
3438
 
3439
  ) ) ) {
3440
 
3626
  '"' .
3627
  '/>';
3628
  break;
3629
+ case 'Redo':
3630
+ $result .= '<path d="M29.8,12.6l-14-9c-0.2-0.1-0.4-0.1-0.5,0C15.1,3.7,15,3.8,15,4v5.5C5,9.8,0.1,19.4,0,26l0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0.1
3631
+ v0v0l0,0c0,0.2,0.2,0.4,0.5,0.4c0,0,0,0,0,0C0.8,26.5,1,26.3,1,26c0.1-1.5,6.7-8.2,14-8.5V23c0,0.2,0.1,0.4,0.3,0.4
3632
+ c0.2,0.1,0.4,0.1,0.5,0l14-10c0.1-0.1,0.2-0.3,0.2-0.4S29.9,12.7,29.8,12.6z"/>';
3633
+ break;
3634
  default:
3635
  break;
3636
  }
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 7.3.00.004
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -23,8 +23,8 @@ global $wpdb;
23
  global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
- global $wppa_revno; $wppa_revno = '7300'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.3.00.004'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 7.3.01.007
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
23
  global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
+ global $wppa_revno; $wppa_revno = '7301'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.3.01.007'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';