PageSourceSearch

https://www.cm-mesaofrio.pt/assets/wm-smile/javascripts/frontoffic…/jquery-9dd1307b83.aw-showcase.min.js

js cm-mesaofrio.pt collected 2026-10-02 10:10:58 UTC 15,698 bytes, 1 lines download raw bytes

1!function(t){t.fn.awShowcase=function(e){e=t.extend({content_width:700,content_height:470,fit_to_parent:!1,auto:!1,interval:3e3,continuous:!1,loading:!0,tooltip_width:200,tooltip_icon_width:32,tooltip_icon_height:32,tooltip_offsetx:18,tooltip_offsety:0,arrows:!0,buttons:!0,btn_numbers:!1,keybord_keys:!1,mousetrace:!1,pauseonover:!0,stoponclick:!0,transition:"hslide",transition_delay:300,transition_speed:500,show_caption:"onload",thumbnails:!1,thumbnails_position:"outside-last",thumbnails_direction:"vertical",thumbnails_slidex:0,dynamic_height:!1,speed_change:!1,viewline:!1,fullscreen_width_x:15,custom_function:null},e);var n=0,s=0,o=!1,a=!1,c=null,h=t(this),r=e.content_width,l=!1,d=1e4,p=0,u=0,f=0,m=t(document.createElement("div")).css("overflow","hidden").css("position","relative").addClass("showcase-content-container").prependTo(h);e.fit_to_parent&&(r=t(h).width()+e.fullscreen_width_x),e.viewline&&(e.thumbnails=!1,e.dynamic_height=!1,m.css("width",d),h.css("overflow","hidden"),$(".showcase-arrow-previous").hide());var w,_=[],v=[],b=0;h.children(".showcase-slide").each((function(){var i=t(this);if(b++,e.thumbnails){var n=i.find(".showcase-thumbnail");v.push(n),n.remove()}var s=i.find(".showcase-content").children().width(),o=i.find(".showcase-content").children().height();_.push(i.html()),i.remove();var a=E(b-1);(e.viewline||1===b)&&m.append(a),e.viewline&&(a.css("position","relative"),a.css("float","left"),a.css("width",s)),e.dynamic_height?(a.css("height",o),1===b&&m.css("height",o)):(a.css("height",e.content_height),1===b&&m.css("height",e.content_height)),(e.viewline||1===b)&&(D(a),B(a),"show"===e.show_caption&&t(a).find(".showcase-caption").show())}));var g=0,I=0;if(e.thumbnails){for(thumb_container=t("<div />"),thumb_restriction=t("<div />"),w=t("<div />"),i=v.length-1;i>=0;--i){var x=t(v[i]).css({overflow:"hidden"});x.attr("id","showcase-thumbnail-"+i),x.addClass(0===i?"active":""),x.click(function(t){return function(){c&&(a=!0,clearInterval(c)),j(t,"")}}(i)),w.prepend(x)}"outside-first"===e.thumbnails_position||"outside-last"===e.thumbnails_position?("horizontal"!==e.thumbnails_direction?(m.css("float","left"),m.css("width",e.content_width),thumb_container.css("float","left"),thumb_container.css("height",e.content_height)):t(w).find(".showcase-thumbnail").css("float","left"),"outside-last"===e.thumbnails_position?(h.append(thumb_container),"horizontal"!==e.thumbnails_direction&&h.append(t("<div />").addClass("clear"))):(h.prepend(thumb_container),"horizontal"!==e.thumbnails_direction&&h.append(t("<div />
1").addClass("clear")))):(thumb_container.css({position:"absolute","z-index":20}),"horizontal"===e.thumbnails_direction?(thumb_container.css({left:0,right:0}),t(w).find(".showcase-thumbnail").css("float","left"),t(w).append(t("<div />").addClass("clear")),"inside-first"===e.thumbnails_position?thumb_container.css("top",0):thumb_container.css("bottom",0)):(thumb_container.css({top:0,bottom:0}),"inside-first"===e.thumbnails_position?thumb_container.css("left",0):thumb_container.css("right",0)),m.prepend(thumb_container)),thumb_container.addClass("showcase-thumbnail-container"),thumb_container.css("overflow","hidden"),thumb_restriction.addClass("showcase-thumbnail-restriction"),thumb_restriction.css({overflow:"hidden",position:"relative"}),"horizontal"===e.thumbnails_direction&&thumb_restriction.css({float:"left"}),w.addClass("showcase-thumbnail-wrapper"),"horizontal"===e.thumbnails_direction?w.addClass("showcase-thumbnail-wrapper-horizontal"):w.addClass("showcase-thumbnail-wrapper-vertical"),w.css("position","relative"),thumb_restriction.append(w),thumb_container.append(thumb_restriction);var y=t('<div class="showcase-thumbnail-button-backward" />');"horizontal"!==e.thumbnails_direction?y.html('<span class="showcase-thumbnail-vertical"><span>Up</span></span>'):(y.css({float:"left"}),y.html('<span class="showcase-thumbnail-horizontal"><span>Left</span></span>')),y.click((function(){Y("backward",!1,!0)})),thumb_container.prepend(y);var k=t('<div class="showcase-thumbnail-button-forward" />');"horizontal"!==e.thumbnails_direction?k.html('<span class="showcase-thumbnail-vertical"><span>Down</span></span>'):(k.css({float:"left"}),k.html('<span class="showcase-thumbnail-horizontal"><span>Right</span></span>')),k.click((function(){Y("forward",!1,!0)})),thumb_container.append(k);var C=0;if("horizontal"!==e.thumbnails_direction)for(C=Q(w,!1),C+=Q(y)+Q(k);C<e.content_height;)C+=Q(t(v[0])),I++;else for(C=R(w,!1),C+=R(y)+R(k);C<r;)C+=R(t(v[0])),I++;if(I+1>v.length&&("horizontal"!==e.thumbnails_direction?thumb_restriction.css("margin-top",Q(y)):thumb_restriction.css("margin-left",R(y)),y.hide(),k.hide()),"horizontal"!==e.thumbnails_direction){var z=Q(y)+Q(k);thumb_restriction.css("height",e.content_height-z)}else{var F=R(y)+R(k);thumb_restriction.css("width",r-F)}"horizontal"===e.thumbnails_direction?(t(".showcase-thumbnail").each((function(){g+=R(t(this))})),w.css("width",g)):t(".showcase-thumbnail").each((function(){g+=Q(t(this))}))}if(e.thumbnails&&-1!==e.thumbnails_position.indexOf("outside")&&"horizontal"!==e.thumbnails_direction&&!e.viewline?h.css("width",r+R(w,!0,!1)):e.fit_to_parent||h.css("width",r),b>1&&e.auto&&(c=window.setInterval(O,e.interval)),e.auto&&e.pauseonover&&(h.mouseenter((function(){o=!0,clearInterval(c)})),h.mouseleave((function(){a||(o=!1,c=window.setInterval(O,e.interval))}))),e.arrows&&b>1&&(t(document.createElement("div")).addClass("showcase-arrow-previous").prependTo(h).click((function(){c&&(e.stoponclick&&(a=!0),clearInterval(c)),j(0===n?b-1:parseInt(n)-1,"previous")})),t(document.createElement("div")).addClass("showcase-arrow-next").prependTo(h).click((function(){c&&(e.stoponclick&&(a=!0),clearInterval(c)),j(n+1,"next")})),e.viewline&&$(".showcase-arrow-previous").hide()),e.buttons&&b>1)for(t(document.createElement("div")).css("clear","both").addClass("showcase-button-wrapper").appendTo(h),i=0;i<b;)t(document.createElement("span")).attr("id","showcase-navigation-button-"+i).addClass(0===i?"active":"").html(e.btn_numbers?parseInt(i)+1:"&#9679;").click(function(t){return function(){c&&(e.stoponclick&&(a=!0),clearInterval(c)),j(t,"")}}(i)).appendTo(t(h).find(".showcase-button-wrapper")),i++;function E(i){var n=t(document.createElement("div")).attr("id","showcase-content-"+i).css("overflow","hidden").css("position","absolute").addClass("showcase-content").html(_[i]);return e.viewline||n.css("width",e.content_width),e.fit_to_parent&&!e.viewline&&n.css("left",r/2-e.content_width/2),n}function O(){var t=parseInt(n)+1;t===b&&e.continuous?t=0:t!==b||e.continuous||(o=!0,clearInterval(c)),o||j(t,"next")}function j(i,o){if(n!==i&&!l){var w,_,v,g=0,I=e.fit_to_parent?r/2-e.content_width/2:0;if(i>n&&"previous"!==o||"next"===o)if(e.viewline){if(n<b-1){for(e.speed_change||(l=!0),A(),e.pauseonover&&window.clearInterval(c),f=0,v=n+1,len=b;v<len;++v)w=q[v],f+=w.find(".showcase-content").children().width();f>r?(u=p,p-=q[n].find(".showcase-content").children().width()):$(".
1showcase-arrow-next").is(":visible")&&(u=p,p=-(d-(f+(r-f))),$(".showcase-arrow-next").fadeOut(300)),m.animate({left:p+"px"},e.transition_speed,(function(){l=!1})),$(".showcase-arrow-next").is(":visible")&&n++,$(".showcase-arrow-previous").fadeIn(300)}}else e.speed_change||(l=!0),w=t(h).find("#showcase-content-"+parseInt(n)),_=E(i),m.append(_),e.dynamic_height?_.css("height",_.find(".showcase-content").children().height()):_.css("height",e.content_height),w.find(".showcase-content").children().height()>_.find(".showcase-content").children().height()&&e.dynamic_height&&(m.stop(!0,!0).animate({height:_.find(".showcase-content").children().height()},200),g=100),"hslide"===e.transition?t(w).delay(g).animate({left:-e.content_width},e.transition_speed+e.transition_delay,(function(){w.remove()})):"vslide"===e.transition?t(w).delay(g).animate({top:-e.content_height},e.transition_speed+e.transition_delay,(function(){w.remove()})):t(w).delay(g).fadeOut(e.transition_speed,(function(){w.remove()})),D(w,!0),B(w,!0),"hslide"===e.transition?(_.css("left",r),t(_).delay(g).animate({left:I},e.transition_speed,(function(){D(_),B(_),T(_)}))):"vslide"===e.transition?(_.css("top",h.height()),t(_).delay(g).animate({top:"0px"},e.transition_speed,(function(){D(_),B(_),T(_)}))):(_.css("left",I),_.css("display","none"),t(_).delay(g).fadeIn(e.transition_speed,(function(){D(_),B(_),T(_)})));else(i<n||"previous"===o)&&(e.viewline?(0!==n&&(e.speed_change||(l=!0),A(),e.pauseonover&&window.clearInterval(c),m.animate({left:u+"px"},e.transition_speed,(function(){l=!1})),p=u,0===--n&&$(".showcase-arrow-previous").fadeOut(300),old_id=n-1,sub_width=t(q[old_id]).width(),u+=sub_width),$(".showcase-arrow-next").fadeIn(300)):(e.speed_change||(l=!0),w=t(h).find("#showcase-content-"+parseInt(n)),_=E(i),m.append(_),e.dynamic_height?_.css("height",_.find(".showcase-content").children().height()):_.css("height",e.content_height),w.find(".showcase-content").children().height()>_.find(".showcase-content").children().height()&&e.dynamic_height&&(m.stop(!0,!0).animate({height:_.find(".showcase-content").children().height()},200),g=100),"hslide"===e.transition?t(w).delay(g).animate({left:r+"px"},e.transition_speed+e.transition_delay,(function(){D(w,!0),B(w,!0),w.remove()})):"vslide"===e.transition?t(w).delay(g).animate({top:e.content_height+"px"},e.transition_speed+e.transition_delay,(function(){D(w,!0),B(w,!0),w.remove()})):t(w).delay(g).fadeOut(e.transition_speed,(function(){D(w,!0),B(w,!0),w.remove()})),"hslide"===e.transition?(_.css("left","-"+e.content_width+"px"),t(_).delay(g).animate({left:I},e.transition_speed,(function(){D(_),B(_),T(_)}))):"vslide"===e.transition?(_.css("top","-"+h.height()+"px"),t(_).delay(g).animate({top:"0px"},e.transition_speed,(function(){D(_),B(_),T(_)}))):(_.css("left",I),_.css("display","none"),t(_).delay(g).fadeIn(e.transition_speed,(function(){D(_),B(_),T(_)}))),m.append(_)));e.viewline||(s=n,n=i,e.thumbnails&&(n>s&&"previous"!==o||"next"===o?Y("forward",!0):(n<s||"previous"===o)&&Y("backward",!0)),e.arrows&&(t(h).find(".showcase-arrow-previous").unbind("click").click((function(){c&&(e.stoponclick&&(a=!0),clearInterval(c)),j(0===n?b-1:parseInt(n)-1,"previous")})),t(h).find(".showcase-arrow-next").unbind("click").click((function(){c&&(e.stoponclick&&(a=!0),clearInterval(c)),j(n===b-1?0:parseInt(n)+1,"next")}))),e.thumbnails&&(v=0,h.find(".showcase-thumbnail").each((function(){var e=t(this);e.removeClass("active"),v===n&&e.addClass("active"),v++}))),"show"===e.show_caption&&t(_).find(".showcase-caption").show()),e.buttons&&(v=0,h.find(".showcase-button-wrapper span").each((function(){var e=t(this);e.removeClass("active"),v===n&&e.addClass("active"),v++}))),"function"==typeof e.custom_function&&e.custom_function()}}function T(t){e.dynamic_height&&m.stop(!0,!0).animate({height:t.find(".showcase-content").children().height()},200),l=!1}e.keybord_keys&&t(document).keydown((function(t){e.stoponclick&&(a=!0),c&&clearInterval(c),37===t.keyCode&&j(0===n?b-1:parseInt(n)-1,"previous"),39===t.keyCode&&j(n===b-1?0:parseInt(n)+1,"next")}));var X=0;function Y(i,s,o){var a=!0,c=Q(t(w).find(".showcase-thumbnail"));"horizontal"===e.thumbnails_direction&&(c=R(t(w).find(".showcase-thumbnail")));var h=1;if(0===e.thumbnails_slidex&&(e.thumbnails_slidex=I),s){for(var r=X,l=0;r<0;)"horizontal"===e.thumbnails_direction?r+=R(t(v[0])):r+=Q(t(v[0])),l++;var d,p=l,u=I+l-1;if(n>=p&&n<=u&&(a=!1),n-u>e.thumbnails_slidex)for(d=n-u;d>e.thumbnails_slidex;)d-=e.thumbnails_slidex,h++;else if(p-n>e.thumbnails_slidex)for(d=p-n;d>e.thumbnails_slidex;)d-=e.thumbnails_slidex,h++;else h=1}"forward"===i&&a?("vertical"===e.thumbnails_direction&&e.content_height<g+X||"horizontal"===e.thumbnails_direction&&e.content_width<g+X?X-=c*(e.thumbnails_slidex*h):0===n&&(o||(X=0)),"horizontal"===e.thumbnails_direction?w.animate({left:X},300):w.animate({top:X},300)):a&&(X<0?X+=c*(e.thumbnails_slidex*h):n===b-1?o||(X-=c*(e.thumbnails_slidex*h)):X=0,"horizontal"===e.thumbnails_direction?w.animate({left:X},300):w.animate({top:X},300))}function B(i,n){var s=i.find(".showcase-caption");n?s.stop(!0,!0).fadeOut(300):"onload"===e.show_caption?s.fadeIn(300):"onhover"===e.show_caption&&(t(i).mouseenter((function(){s.fadeIn(300)})),t(i).mouseleave((function(){s.stop(!0,!0).fadeOut(100)})))}function D(i,n){i.find(".showcase-tooltips a").each((function(){if(n)t(this).stop(!0,!0).fadeOut(300);else{var s=t(this).attr("coords");s=s.split(","),t(this).addClass("showcase-plus-anchor"),t(this).css("position","absolute"),t(this).css("display","none"),t(this).css("width",e.tooltip_icon_width),t(this).css("height",e.tooltip_icon_height),t(this).css("left",parseInt(s[0])-parseInt(e.tooltip_icon_width)/2),t(this).css("top",parseInt(s[1])-parseInt(e.tooltip_icon_height)/2);var o=t(this).html();t(this).mouseenter((function(){P(i,s[0],s[1],o)})),t(this).mouseleave((function(){P(i,s[0],s[1],o)})),t(this).html(""),t(this).fadeIn(300)}}))}var L=null;function P(i,n,s,o){if(null===L){L=t(document.createElement("div")).addClass("showcase-tooltip").css("display","none").css("position","absolute").css("max-width",e.tooltip_width).html(o),i.append(L);var a=2*parseInt(L.css("padding-right"))+2*parseInt(L.css("border-right-width")),c=2*parseInt(L.css("padding-bottom"))+2*parseInt(L.css("border-bottom-width"));lastx=parseInt(n)+L.width()+a,lasty=parseInt(s)+L.height()+c,lastx<e.content_width?L.css("left",parseInt(n)+parseInt(e.tooltip_offsetx)):L.css("left",parseInt(n)-parseInt(e.tooltip_offsetx)-(parseInt(L.width())+parseInt(e.tooltip_offsetx))),lasty<e.content_height?L.css("top",parseInt(s)+parseInt(e.tooltip_offsety)):L.css("top",parseInt(s)-parseInt(e.tooltip_offsety)-(parseInt(L.height())+parseInt(c))),L.fadeIn(400)}else L.fadeOut(400),L.remove(),L=null}function Q(e,i,n,s,o){n=void 0===n||n,s=void 0===s||s,o=void 0===o||o;var a=(i=void 0===i||i)?t(e).height():0;return a+=(n?parseFloat(t(e).css("margin-top"))+parseFloat(t(e).css("margin-bottom")):0)+(s?parseFloat(t(e).css("padding-top"))+parseFloat(t(e).css("padding-bottom")):0)+(o?parseFloat(t(e).css("border-top-width"))+parseFloat(t(e).css("border-bottom-width")):0)}function R(e,i,n,s,o){n=void 0===n||n,s=void 0===s||s,o=void 0===o||o;var a=(i=void 0===i||i)?t(e).width():0;return a+=(n?parseFloat(t(e).css("margin-left"))+parseFloat(t(e).css("margin-right")):0)+(s?parseFloat(t(e).css("padding-left"))+parseFloat(t(e).css("padding-right")):0)+(o?parseFloat(t(e).css("border-left-width"))+parseFloat(t(e).css("border-right-width")):0)}if(e.mousetrace){var S=t(document.createElement("div")).css("position","absolute").css("top","0").css("background-color","#fff").css("color","#000").css("padding","3px 5px").css("x-index","30").html("X: 0 Y: 0");h.append(S);var U=h.offset();m.mousemove((function(t){S.html("X: "+(t.pageX-U.left)+" Y: "+(t.pageY-U.top))}))}$("#awOnePageButton").click((function(){if($(".view-page").is(":visible")){var i=t(document.createElement("div"));i.addClass("showcase-onepage"),h.before(i),c&&(a=!0,clearInterval(c)),$(this).find(".view-page").hide(),$(this).find(".view-slide").show(),h.hide(),$.each(_,(function(t,n){obj=E(t),obj.css("position","relative"),i.append(obj),D(obj),B(obj),e.dynamic_height?obj.css("height",obj.find(".showcase-content").children().height()):obj.css("height",e.content_height)}));var n=t(document.createElement("div"));n.addClass("clear"),i.append(n)}else $(".showcase-onepage").remove(),$(this).find(".view-page").show(),$(this).find(".view-slide").hide(),h.show();return!1}));var q=[];function A(){d=0,m.children("div").each((function(){d+=$(this).find(".showcase-content").children().width(),q.push($(this))}))}h.removeClass("showcase-load")}}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.