// source --> https://revista.vixicasei.com.br/wp-content/plugins/layered-popups/js/script.min.js?ver=6.07 var ulp_active_window_id=!1,ulp_active_campaign="",ulp_subscribing=!1,ulp_onload_displayed=!1,ulp_onexit_displayed=!1,ulp_onscroll_displayed=!1,ulp_onidle_displayed=!1,ulp_onabd_displayed=!1,ulp_no_preload_loading=!1,ulp_timeout,ulp_viewport,ulp_onidle_counter=0,ulp_onidle_timer,ulp_position_margin=16,ulp_forced_location="",ulp_recaptcha_queue=[],ulp_css3_animations_in="bounceIn bounceInUp bounceInDown bounceInLeft bounceInRight fadeIn fadeInUp fadeInDown fadeInLeft fadeInRight flipInX flipInY lightSpeedIn rotateIn rotateInDownLeft rotateInDownRight rotateInUpLeft rotateInUpRight rollIn zoomIn zoomInUp zoomInDown zoomInLeft zoomInRight".split(" "), ulp_css3_animations_out="bounceOut bounceOutUp bounceOutDown bounceOutLeft bounceOutRight fadeOut fadeOutUp fadeOutDown fadeOutLeft fadeOutRight flipOutX flipOutY lightSpeedOut rotateOut rotateOutDownLeft rotateOutDownRight rotateOutUpLeft rotateOutUpRight rollOut zoomOut zoomOutUp zoomOutDown zoomOutLeft zoomOutRight".split(" "),ulp_mobile=function(a){return/(android|bb\d+|meego).+mobile|android|ipad|playbook|silk|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))?!0:!1}(navigator.userAgent||navigator.vendor||window.opera);function ulp_popup_id(a){if(""==a)return"";var b=a.split("*");return 1==b.length?a:ulp_mobile?b[1]:b[0]}function ulp_prepare_ids(){ulp_onload_popup=ulp_popup_id(ulp_onload_popup);ulp_onexit_popup=ulp_popup_id(ulp_onexit_popup);ulp_onscroll_popup=ulp_popup_id(ulp_onscroll_popup);ulp_onidle_popup=ulp_popup_id(ulp_onidle_popup);ulp_onabd_popup=ulp_popup_id(ulp_onabd_popup)} function ulp_inline_open(a){jQuery(".ulp-inline-window").each(function(){var b=jQuery(this).attr("id");jQuery(this).attr("data-id");a||ulp_track(b,"layered-inline","show","");_ulp_inline_open(b,!0,a)})}function _ulp_inline_hide_confirmation(a){jQuery("#"+a).length&&(a=jQuery("#"+a).find(".ulp-content"),jQuery(a).find(".ulp-layer").each(function(){"on"==jQuery(this).attr("data-confirmation")&&jQuery(this).fadeOut(300)}))} function _ulp_inline_open(a,b,c){jQuery("#"+a).each(function(){viewport_width=Math.max(120,jQuery(this).parent().innerWidth());var a=parseInt(jQuery(this).attr("data-width"),10),h=parseInt(jQuery(this).attr("data-height"),10),e=viewport_width/a;1",d=""):h="";var e=jQuery("#"+a).find(".ulp-submit").attr("data-label"),f=jQuery("#"+a).find(".ulp-submit").attr("data-loading");h&&e&&(h+="  ");d&&f&&(d+="  ");jQuery("#"+a).find(".ulp-submit").html(d+f);var g={"ulp-popup":c, "ulp-campaign":"",action:b};jQuery("#"+a).find(".ulp-input-field").each(function(){var a=jQuery(this).attr("name");jQuery(this).is(":checked")?g[a]="on":g[a]=jQuery(this).val()});"on"==ulp_recaptcha_enable&&"undefined"!=typeof grecaptcha&&jQuery("#"+a).find(".ulp-recaptcha").each(function(){var a=jQuery(this).attr("data-widget");if("undefined"!=typeof a){var b=jQuery(this).attr("id");g[b]=grecaptcha.getResponse(a)}});jQuery.post(ulp_ajax_url,g,function(b){ulp_subscribing=!1;var d;jQuery("#"+a).find(".ulp-submit").html(h+ e);ulp_reset_recaptcha(a);try{d=jQuery.parseJSON(b);var g=d.status;if("OK"==g){b=180;"undefined"!=typeof d.cookie_lifetime&&(b=parseInt(d.cookie_lifetime,10));if(0",jQuery("body").append(a),"on"!=ulp_css3_enable?jQuery("#ulp-"+b+"-overlay").fadeIn(300):0<=ulp_css3_animations_in.indexOf(ulp_overlays[b][4])?(jQuery("#ulp-"+b+"-overlay").show(),jQuery("#ulp-"+b+"-overlay").attr("class","ulp-overlay ulp-animated ulp-"+ulp_overlays[b][4])): jQuery("#ulp-"+b+"-overlay").fadeIn(300));a='
';switch(ulp_overlays[b][5]){case "chasing-dots":a="
';break;case "circle":a="
'; break;case "double-bounce":a="
';break;case "fading-circle":a="
'; break;case "folding-cube":a="
';break;case "pulse":a="
';break;case "rotating-plane":a="
';break;case "three-bounce":a="
'; break;case "wandering-cubes":a="
';break;case "wave":a="
'}a= "
"+a+"
";jQuery("body").append(a);"on"==ulp_overlays[b][2]&&jQuery("#ulp-"+b+"-overlay").bind("click",function(a){ulp_no_preload_loading=!1;jQuery(".ulp-loader").hide();jQuery(".ulp-loader").remove();jQuery("#ulp-"+b).length?(jQuery("#ulp-"+b+"-overlay").unbind("click"),ulp_close(b)):(jQuery("#ulp-"+b+"-overlay").unbind("click"),"on"!=ulp_css3_enable?jQuery("#ulp-"+b+"-overlay").fadeOut(300): 0<=ulp_css3_animations_in.indexOf(ulp_overlays[b][4])?(a=ulp_css3_animations_out[ulp_css3_animations_in.indexOf(ulp_overlays[b][4])],jQuery("#ulp-"+b+"-overlay").attr("class","ulp-overlay ulp-animated ulp-"+a),setTimeout(function(){jQuery("#ulp-"+b+"-overlay").hide()},1E3)):jQuery("#ulp-"+b+"-overlay").hide())});jQuery.post(ulp_ajax_url,{"ulp-campaign":ulp_active_campaign,"ulp-popup":b,action:"ulp_loadpopup"},function(a){jQuery(".ulp-loader").hide();jQuery(".ulp-loader").remove();var c;try{c=jQuery.parseJSON(a); if("OK"==c.status){if(!ulp_no_preload_loading)return!1;jQuery("body").append(c.html);"undefined"!=typeof FB&&"undefined"!=FB.XFBML&&FB.XFBML.parse();"undefined"!=typeof twttr&&"undefined"!=typeof twttr.widgets&&twttr.widgets.load();"undefined"!=typeof gapi&&"undefined"!=typeof gapi.plusone&&gapi.plusone.go();"undefined"!=typeof IN&&"undefined"!=typeof IN.parse&&IN.parse();jQuery.post(ulp_ajax_url,{"ulp-campaign":ulp_active_campaign,"ulp-popup":b,action:"ulp_addimpression"});ulp_track(b,"layered-popup", "show","");_ulp_open(b,!0,!0);ulp_no_preload_loading=!1}return!1}catch(h){return!1}})}return!1}} function _ulp_open(a,b,c){clearTimeout(ulp_timeout);jQuery("#ulp-"+a).each(function(){"function"==typeof ulpext_open_before&&ulpext_open_before(a);ulp_active_window_id=a;b&&!c&&("on"!=ulp_css3_enable?jQuery("#ulp-"+a+"-overlay").fadeIn(300):0<=ulp_css3_animations_in.indexOf(ulp_overlays[a][4])?(jQuery("#ulp-"+a+"-overlay").show(),jQuery("#ulp-"+a+"-overlay").attr("class","ulp-overlay ulp-animated ulp-"+ulp_overlays[a][4])):jQuery("#ulp-"+a+"-overlay").fadeIn(300),"on"==jQuery(this).attr("data-close")&& jQuery("#ulp-"+a+"-overlay").bind("click",function(b){ulp_close(a)}));var d=Math.max(320,jQuery(window).width()),h=Math.max(320,jQuery(window).height()),e=parseInt(jQuery(this).attr("data-width"),10),f=parseInt(jQuery(this).attr("data-height"),10),g=Math.min((d-20)/e,h/f);1",c=""):d="";var h=jQuery("#ulp-"+ ulp_active_window_id).find(".ulp-submit").attr("data-label"),e=jQuery("#ulp-"+ulp_active_window_id).find(".ulp-submit").attr("data-loading");d&&h&&(d+="  ");c&&e&&(c+="  ");jQuery("#ulp-"+ulp_active_window_id).find(".ulp-submit").html(c+e);var f={"ulp-popup":ulp_active_window_id,"ulp-campaign":ulp_active_campaign,action:b};jQuery("#ulp-"+ulp_active_window_id).find(".ulp-input-field").each(function(){var a=jQuery(this).attr("name");jQuery(this).is(":checked")?f[a]="on":f[a]=jQuery(this).val()}); "on"==ulp_recaptcha_enable&&"undefined"!=typeof grecaptcha&&jQuery("#ulp-"+ulp_active_window_id).find(".ulp-recaptcha").each(function(){var a=jQuery(this).attr("data-widget");if("undefined"!=typeof a){var b=jQuery(this).attr("id");f[b]=grecaptcha.getResponse(a)}});jQuery.post(ulp_ajax_url,f,function(a){var b;jQuery("#ulp-"+ulp_active_window_id).find(".ulp-submit").html(d+h);ulp_reset_recaptcha("ulp-"+ulp_active_window_id);try{b=jQuery.parseJSON(a);var c=b.status;if("OK"==c){a=180;"undefined"!=typeof b.cookie_lifetime&& (a=parseInt(b.cookie_lifetime,10));if(0b&&(b=a.indexOf("#ulpx-"));if(0<=b&&(b=a.indexOf("#ulp-"),0<=b?a=a.substr(b+5):(b=a.indexOf("#ulpx-"),a=a.substr(b+6)),0=parseInt(ulp_onload_delay,10)?ulp_onload_open(ulp_onload_popup):setTimeout(function(){ulp_onload_open(ulp_onload_popup)},1E3*parseInt(ulp_onload_delay,10)));a=ulp_read_cookie("ulp-onexit-"+ulp_onexit_popup);""!=ulp_onexit_popup&&"none"!=ulp_onexit_mode&&a!=ulp_cookie_value&&jQuery(document).bind("mouseleave",function(a){a=parseInt(a.pageY-jQuery(window).scrollTop(),10);!ulp_active_window_id&& !ulp_no_preload_loading&&!ulp_onexit_displayed&&20>a&&("once-session"==ulp_onexit_mode?ulp_write_cookie("ulp-onexit-"+ulp_onexit_popup,ulp_cookie_value,0):"once-only"==ulp_onexit_mode?ulp_write_cookie("ulp-onexit-"+ulp_onexit_popup,ulp_cookie_value,180):"once-period"==ulp_onexit_mode&&ulp_write_cookie("ulp-onexit-"+ulp_onexit_popup,ulp_cookie_value,ulp_onexit_period),ulp_open(ulp_onexit_popup),ulp_onexit_displayed=!0)});a=ulp_read_cookie("ulp-onscroll-"+ulp_onscroll_popup);""!=ulp_onscroll_popup&& "none"!=ulp_onscroll_mode&&a!=ulp_cookie_value&&jQuery(window).scroll(function(a){if(!ulp_active_window_id&&!ulp_no_preload_loading&&!ulp_onscroll_displayed){a=jQuery(window).scrollTop();var b=parseInt(ulp_onscroll_offset,10);0b&&("once-session"==ulp_onscroll_mode?ulp_write_cookie("ulp-onscroll-"+ulp_onscroll_popup,ulp_cookie_value,0):"once-only"==ulp_onscroll_mode?ulp_write_cookie("ulp-onscroll-"+ ulp_onscroll_popup,ulp_cookie_value,180):"once-period"==ulp_onscroll_mode&&ulp_write_cookie("ulp-onscroll-"+ulp_onscroll_popup,ulp_cookie_value,ulp_onscroll_period),ulp_open(ulp_onscroll_popup),ulp_onscroll_displayed=!0)}});a=ulp_read_cookie("ulp-onidle-"+ulp_onidle_popup);""!=ulp_onidle_popup&&"none"!=ulp_onidle_mode&&a!=ulp_cookie_value&&(jQuery(window).mousemove(function(a){ulp_onidle_counter=0}),jQuery(window).click(function(a){ulp_onidle_counter=0}),jQuery(window).keypress(function(a){ulp_onidle_counter= 0}),jQuery(window).scroll(function(a){ulp_onidle_counter=0}),ulp_onidle_timer=setTimeout("ulp_onidle_counter_handler();",1E3))} function ulp_onidle_counter_handler(){ulp_onidle_counter>=ulp_onidle_delay?(ulp_active_window_id||ulp_no_preload_loading||ulp_onidle_displayed||("once-session"==ulp_onidle_mode?(ulp_write_cookie("ulp-onidle-"+ulp_onidle_popup,ulp_cookie_value,0),ulp_onidle_displayed=!0):"once-only"==ulp_onidle_mode?(ulp_write_cookie("ulp-onidle-"+ulp_onidle_popup,ulp_cookie_value,180),ulp_onidle_displayed=!0):"once-period"==ulp_onidle_mode&&(ulp_write_cookie("ulp-onidle-"+ulp_onidle_popup,ulp_cookie_value,ulp_onidle_period), ulp_onidle_displayed=!0),ulp_open(ulp_onidle_popup)),ulp_onidle_counter=0):ulp_onidle_counter+=1;ulp_onidle_timer=setTimeout("ulp_onidle_counter_handler();",1E3)}function ulp_read_cookie(a){for(var b=document.cookie.split("; "),c=0,d;d=b[c]&&b[c].split("=");c++)if(d[0]===a)return d[1]||"";return null}function ulp_write_cookie(a,b,c){if(c){var d=new Date;d.setTime(d.getTime()+864E5*c);c="; expires="+d.toGMTString()}else c="";document.cookie=a+"="+b+c+"; path=/"} jQuery(window).resize(function(){var a={width:Math.max(320,jQuery(window).width()),height:Math.max(320,jQuery(window).height())};ulp_viewport||(ulp_viewport=a);if(a.width!=ulp_viewport.width||a.height!=ulp_viewport.height)if(ulp_viewport=a,ulp_inline_open(!0),ulp_active_window_id){var a={width:Math.max(320,jQuery(window).width()),height:Math.max(320,jQuery(window).height())},b=parseInt(jQuery("#ulp-"+ulp_active_window_id).attr("data-width"),10),c=parseInt(jQuery("#ulp-"+ulp_active_window_id).attr("data-height"), 10),a=Math.min((a.width-20)/b,a.height/c);1b&&(b=a.indexOf("#ulpx-"));if(0<=b){b=a.indexOf("#ulp-");0<=b?a=a.substr(b+5):(b=a.indexOf("#ulpx-"), a=a.substr(b+6));b=a.indexOf(":");if(0d?b+=String.fromCharCode(d):(127d?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b} function ulp_encode64(a){var b="",c,d,h,e,f,g,k=0;for(a=ulp_utf8encode(a);k>2,c=(c&3)<<4|d>>4,f=(d&15)<<2|h>>6,g=h&63,isNaN(d)?f=g=64:isNaN(h)&&(g=64),b=b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g); return b}function ulp_utf8decode(a){var b="",c=0,d;for(c1=c2=0;cd?(b+=String.fromCharCode(d),c++):191d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b} function ulp_decode64(a){var b="",c,d,h,e,f,g=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");g>4,d=(d&15)<<4|e>> 2,h=(e&3)<<6|f,b+=String.fromCharCode(c),64!=e&&(b+=String.fromCharCode(d)),64!=f&&(b+=String.fromCharCode(h));return b=ulp_utf8decode(b)} function ulp_track(a,b,c,d){if("on"==ulp_km_tracking)try{d&&""!=d&&"object"==typeof _kmq&&_kmq.push(["identify",d])}catch(h){}if("on"==ulp_ga_tracking)try{d="","layered-popup"==b?0 https://revista.vixicasei.com.br/wp-content/plugins/reduce-bounce-rate/js/ga4wpjs.js?ver=e401f0e1fe7438350ef3bbbfc11ab94f var _gaq=_gaq||[];var stFailbackDefaults={trackScrolling:!0,stLogInterval:10,docTitle:window.document.title,cutOffTime:900,trackNoEvents:!1,trackNoMaxTime:!1};window.total_time=0;var stIntervalObj=null;var EventNONInteraction=!1;var Frequency=null;var Repentance=null;function TrackingLogTime(b){return b[0]==50?(parseInt(b[1])+1)+":00":(b[1]||"0")+":"+(parseInt(b[0])+10)}function stInitializeControlVars(){if(typeof window.trackScrolling=="undefined"){window.trackScrolling=window.stFailbackDefaults.trackScrolling}if(typeof window.stLogInterval=="undefined"){window.stLogInterval=window.stFailbackDefaults.stLogInterval*1000}if(typeof window.docTitle=="undefined"){window.docTitle=window.stFailbackDefaults.docTitle}if(typeof window.cutOffTime=="undefined"){window.cutOffTime=window.stFailbackDefaults.cutOffTime}if(typeof window.trackNoEvents=="undefined"){window.trackNoEvents=window.stFailbackDefaults.trackNoEvents}if(typeof window.trackNoMaxTime=="undefined"){window.trackNoMaxTime=window.stFailbackDefaults.trackNoMaxTime}if(window.trackScrolling===!0){setTimeout(function(){window.onscroll=function(){window.onscroll=null;__gaTracker("send","event","Scroll",window.docTitle,"scrolled")}},2000)}}if(window.trackNoEvents===!1){function startTimeTracking(b){stInitializeControlVars();window.stIntervalObj=window.setInterval(function(){total_time+=10;if(window.trackNoMaxTime===!0){total_time=1}if(window.total_time<=window.cutOffTime){b=TrackingLogTime(b.split(":").reverse());__gaTracker("send","event","Time","Log",b)}else{window.clearInterval(window.stIntervalObj)}},(window.stLogInterval))}jQuery(document).ready(function(){startTimeTracking("00")})}if(window.trackScrollingPercentage===!0){Frequency=ScrollingPercentageNumber;Repentance=100/ScrollingPercentageNumber;var ScrollMatrix=new Array();for(ix=0;ix=$(document).height()*ScrollMatrix[iz][0]/100)&&(ScrollMatrix[iz][1]=="false")){ScrollMatrix[iz][1]="true";__gaTracker("send","event","Percentage Page Scroll",window.docTitle,ScrollMatrix[iz][0]+"%",{nonInteraction:EventNONInteraction})}}})})}; // source --> https://revista.vixicasei.com.br/wp-includes/js/wp-embed.min.js?ver=e401f0e1fe7438350ef3bbbfc11ab94f !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); // source --> https://revista.vixicasei.com.br/wp-content/plugins/alpine-photo-tile-for-pinterest/js/AlpinePhotoTiles_script.js?ver=1.2.6 /* * Alpine PhotoTile : jQuery Tile Display Functions * By: Eric Burger, http://thealpinepress.com * Version: 1.0.4 * Updated: December 2013 * */ (function( w, s, d ) { s.fn.AlpinePhotoTilesPlugin = function( options ) { options = s.extend( {}, s.fn.AlpinePhotoTilesPlugin.options, options ); // IE 7 fallback /*if(!d.querySelector){ if('windows' != options.style){ options.style = 'rift'; } }*/ return this.each(function() { var parent = s(this), imageList = s(".AlpinePhotoTiles_image_list_class",parent), images = s('.AlpinePhotoTiles-image',imageList), allPerms = s('.AlpinePhotoTiles-link',imageList), width = parent.width(), currentRow,img,newDiv,newDivContainer,src,url,height,theClasses,theHeight,theWidth,perm,nextHeight,tempW,tempH, imageRow=[],row,currentImage,sumWidth=0,maxHeight=0,pos,normalWidth,normalHeight; if( 'square' == options.shape && 'windows' == options.style ){ s.each(images, function(i){ img = this; src = img.src; url = 'url("'+src+'")'; perm = allPerms[i]; if(i%3 == 0){ theClasses = "AlpinePhotoTiles-tile"; theWidth = (width-8); theHeight = theWidth; newRow( theHeight, i ); addDiv(i); }else if(i%3 == 1){ theClasses = "AlpinePhotoTiles-tile AlpinePhotoTiles-half-tile AlpinePhotoTiles-half-tile-first"; theWidth = (width/2-4-4/2); theHeight = theWidth; newRow( theHeight, i ); addDiv(i); }else if(i%3 == 2){ theClasses = "AlpinePhotoTiles-tile AlpinePhotoTiles-half-tile AlpinePhotoTiles-half-tile-last"; theWidth = (width/2-4-4/2); theHeight = theWidth; addDiv(i); } }); } else if( 'rectangle' == options.shape && 'windows' == options.style ){ s.each(images, function(i){ img = this; src = img.src; url = 'url("'+src+'")'; perm = allPerms[i]; if(i%3 == 0){ theWidth = (width-8); height = theWidth*img.naturalHeight/img.naturalWidth; height = (height?height:width); newRow( height, i ); theClasses = "AlpinePhotoTiles-tile AlpinePhotoTiles-tile-rectangle"; theHeight = (height); addDiv(i); }else if(i%3 == 1){ theWidth = (width/2-4-4/2); height = theWidth*img.naturalHeight/img.naturalWidth; height = (height?height:width); newRow( height, i ); theClasses = "AlpinePhotoTiles-tile AlpinePhotoTiles-half-tile AlpinePhotoTiles-half-tile-first AlpinePhotoTiles-tile-rectangle"; theHeight = (height); theWidth = (width/2-4-4/2); addDiv(i); }else if(i%3 == 2){ theWidth = (width/2-4-4/2); nextHeight = theWidth*img.naturalHeight/img.naturalWidth; nextHeight = (nextHeight?nextHeight:theWidth); if(nextHeight && nextHeight maxHeight ){ maxHeight = normalHeight; currentRow.css({'height':normalHeight+"px"}); } img = this.img; url = this.url; perm = this.perm; src = this.src; theClasses = "AlpinePhotoTiles-book"; theWidth = (normalWidth-4-4/options.perRow); theHeight = normalHeight; addDiv(i); newDivContainer.css({ 'left':pos+'px' }); pos += normalWidth; }); imageRow=[];sumWidth=0;maxHeight=0; } }); } else if( 'rift' == options.style ){ parent.css({'width':'100%'}); width = parent.width(); imageRow=[];sumWidth=0;maxHeight=0;row=0; s.each(images, function(i){ img = this; src = img.src; url = 'url("'+src+'")'; perm = allPerms[i]; tempW = (img.naturalWidth?img.naturalWidth:width); tempH = (img.naturalHeight?img.naturalHeight:width); currentImage = { "width":tempW, "height":tempH, "url":url, "perm":perm, "src":src, "img":img } sumWidth += tempW; imageRow[imageRow.length] = currentImage; if(i%options.perRow == (options.perRow -1) || (images.length-1)==i ){ if( (images.length-1)==i ){ sumWidth += (options.perRow - i%options.perRow -1)*imageRow[imageRow.length-1].width; } newRow( 10, i ); currentRow.addClass('AlpinePhotoTiles-riftline'); pos = 0; s.each(imageRow,function(){ normalWidth = this.width/sumWidth*width; normalHeight = normalWidth*this.height/this.width; if( normalHeight > maxHeight ){ maxHeight = normalHeight; currentRow.css({'height':normalHeight+"px"}); } img = this.img; url = this.url; perm = this.perm; src = this.src; theClasses = 'AlpinePhotoTiles-rift AlpinePhotoTiles-float-'+row; theWidth = (normalWidth-4-4/options.perRow); theHeight = normalHeight; addDiv(i); newDivContainer.css({ 'left':pos+'px' }); pos += normalWidth; }); imageRow=[];sumWidth=0;maxHeight=0,row=(row?0:1); } }); } else if( 'gallery' == options.style ){ parent.css({'width':'100%','opacity':0}); width = parent.width(); var originalImages = s('img.AlpinePhotoTiles-original-image',parent); var gallery,galleryContainer,galleryHeight; theWidth = (width/options.perRow-4-4/options.perRow); theHeight = (width/options.perRow); s.each(images, function(i){ img = this; src = img.src; url = 'url("'+src+'")'; perm = allPerms[i]; if( 0 == i ){ if( options.galleryHeight ){ // Keep for compatibility galleryHeight = width/options.perRow*options.galleryHeight; }else if( options.galRatioHeight && options.galRatioWidth ){ galleryHeight = width*options.galRatioHeight/options.galRatioWidth; }else{ galleryHeight = width*600/800; } newRow( galleryHeight, i ); galleryContainer = s(''); galleryContainer.css({ "height":galleryHeight+"px", "width":(width-8)+"px" }); currentRow.append(galleryContainer); if(options.imageBorder){ galleryContainer.addClass('AlpinePhotoTiles-border-div'); galleryContainer.width( galleryContainer.width()-10 ); galleryContainer.height( galleryContainer.height()-10 ); } if(options.imageShadow){ galleryContainer.addClass('AlpinePhotoTiles-shadow-div'); } if(options.imageCurve){ galleryContainer.addClass('AlpinePhotoTiles-curve-div'); } } if(i%options.perRow == 0){ newRow( width/options.perRow, i ); theClasses = "AlpinePhotoTiles-tile AlpinePhotoTiles-half-tile AlpinePhotoTiles-half-tile-first"; addDiv(i); }else if(i%options.perRow == (options.perRow -1) ){ theClasses = "AlpinePhotoTiles-tile AlpinePhotoTiles-half-tile AlpinePhotoTiles-half-tile-last"; addDiv(i); }else{ theClasses = "AlpinePhotoTiles-tile AlpinePhotoTiles-half-tile"; addDiv(i); } var storeUrl = url; if( originalImages[i] ){ if( originalImages[i].src ){ storeUrl = 'url("'+originalImages[i].src+'")'; } } gallery = s(''); gallery.css({ 'background-image':storeUrl }); if( 0 != i ){ gallery.hide(); } galleryContainer.append(gallery); // Prevent Right-Click if( img.oncontextmenu ){ gallery.attr("oncontextmenu","return false;"); } }); var allThumbs = s('.AlpinePhotoTiles-image-div',parent); var allGalleries = s('.AlpinePhotoTiles-image-gallery',parent); s.each(allThumbs,function(){ var theThumb = s(this); if( !theThumb.hasClass('AlpinePhotoTiles-image-gallery') ){ theThumb.hover(function() { allGalleries.hide(); s("#"+theThumb.attr('id')+"-gallery").show(); }); } }); parent.ready(function(){ parent.css({'opacity':1}); }); } // Lastly, call lighbox if applicable if(options.callback){ options.callback(); } function newRow(height,i){ if(!s.support.leadingWhitespace && !d.querySelector){ currentRow = s('
'); currentRow.css({'height':height+'px'}); parent.append(currentRow); }else{ currentRow = s('
'); currentRow.css({'height':height+'px'}); parent.append(currentRow); } } function addDiv(i){ if(!s.support.leadingWhitespace && !d.querySelector){ newDiv = s('
'); }else{ newDiv = s('
'); newDiv.css({ 'background-image':url }); } // Prevent Right-Click if( img.oncontextmenu ){ newDiv.attr("oncontextmenu","return false;"); } newDivContainer = s('
'); if(!s.support.leadingWhitespace && !d.querySelector){ newDivContainer.css({ "height":(theHeight*0.99)+"px", "width":(theWidth)+"px", "overflow":"hidden" }); }else{ newDivContainer.css({ "height":theHeight+"px", "width":theWidth+"px" }); } currentRow.append(newDivContainer); newDivContainer.append(newDiv); if(perm){ if(options.lightbox){ newDiv.wrap(''); s(perm).removeClass( 'AlpinePhotoTiles-lightbox' ); }else{ newDiv.wrap(''); } } /*if( img.title ){ newDivContainer.append('
'+img.title+'
'); }*/ if(options.imageBorder){ newDivContainer.addClass('AlpinePhotoTiles-border-div'); newDivContainer.width( newDivContainer.width()-10 ); newDivContainer.height( newDivContainer.height()-10 ); } if(options.imageHighlight){ if(!options.imageBorder){ newDivContainer.addClass('AlpinePhotoTiles-highlight-div'); newDivContainer.width( newDivContainer.width()-4 ); newDivContainer.height( newDivContainer.height()-4 ); } newDivContainer.hover(function(){ s(this).css({ "background": options.highlight }); },function(){ if( options.imageBorder ){ s(this).css({ 'background-color': '#fff' }); }else{ s(this).css({ 'background-color': '' }); } }); } if(options.imageShadow){ newDivContainer.addClass('AlpinePhotoTiles-shadow-div'); } if(options.imageCurve){ newDivContainer.addClass('AlpinePhotoTiles-curve-div'); } if(options.pinIt){ var media = s(img).attr('data-original'); media = (media?media:src); newDiv.addClass('AlpinePhotoTiles-pinterest-container'); var link = s('
'); newDiv.append(link); } } function updateHeight(aDiv,aHeight){ aDiv.height(aHeight); if(options.imageBorder){ aDiv.height( aDiv.height()-10 ); } } }); } s.fn.AlpinePhotoTilesPlugin.options = { id: 'AlpinePress', pinIt: false, lightbox:false } })( window, jQuery, document ); (function( w, s ) { s.fn.AlpineAdjustBordersPlugin = function( options ) { return this.each(function() { var parent = s(this),images = s('img',parent); s.each(images,function(){ var currentImg = s(this); var width = currentImg.parent().width(); var wBorder = false; // Remove and replace ! important classes if( currentImg.hasClass('AlpinePhotoTiles-img-border') ){ width -= 10; currentImg.removeClass('AlpinePhotoTiles-img-border'); currentImg.css({ 'max-width':(width)+'px', 'padding':'4px', 'margin-left': '1px', 'margin-right': '1px', 'background-color':'#fff' }); wBorder = true; }else if( currentImg.hasClass('AlpinePhotoTiles-img-noborder') ){ currentImg.removeClass('AlpinePhotoTiles-img-noborder'); currentImg.css({ 'max-width':(width)+'px', 'padding':'0px' }); } if( currentImg.hasClass('AlpinePhotoTiles-img-shadow') ){ width -= 2; currentImg.removeClass('AlpinePhotoTiles-img-shadow'); currentImg.css({ "box-shadow": "0 1px 3px rgba(34, 25, 25, 0.4)", "margin-left": "1px", "margin-right": "1px", 'max-width':(width)+'px' }); }else if( currentImg.hasClass('AlpinePhotoTiles-img-noshadow') ){ currentImg.removeClass('AlpinePhotoTiles-img-noshadow'); currentImg.css({ 'max-width':(width)+'px', "box-shadow":"none" }); } if( currentImg.hasClass('AlpinePhotoTiles-img-highlight') ){ currentImg.removeClass('AlpinePhotoTiles-img-highlight'); if( '4px' != currentImg.css('padding-right') ){ width -= 6; currentImg.css({ 'max-width':(width)+'px', 'padding':'2px', "margin-left": "1px", "margin-right": "1px" }); } currentImg.hover(function(){ s(this).css({ "background-color": options.highlight }); },function(){ if( wBorder ){ s(this).css({ 'background-color': '#fff' }); }else{ s(this).css({ 'background-color': '' }); } }); } }); }); } })( window, jQuery );