1(function($) { 2 3 var App = { 4 iniciaApp:{ 5 start : function(){ 6 // De acordo com a resolução adiciona breakpoits no body class para que seja possivel identificar ter uma classe com a resoluçnao atual 7 App.jsClassBreakPoints.addCss(); 8 9 // Liga a galeria de fotos default 10 App.conteudo.galeriaFotos(); 11 // Liga a galeria de videos default 12 App.conteudo.owlGaleriaVideos(); 13 // Liga a galeria de videos default 14 App.conteudo.owlGaleriaVideos_click(); 15 // Liga o slider carousel das internas 16 App.conteudo.owlSliderInterno(); 17 18 App.owlDepoimentos.start(); 19 App.owlDepoimentos.controleResolucao(); 20 21 // Leia mais depoimento 22 App.conteudo.readMoreDepoimento.start(); 23 }, 24 }, 25 26 conteudo:{ 27 galeriaFotos:function(){ 28 29 $('.royalSlider').royalSlider({ 30 fullscreen: { 31 enabled: true, 32 nativeFS: true 33 }, 34 controlNavigation: 'thumbnails', 35 autoScaleSlider: false, 36 autoScaleSliderWidth: 850, 37 autoScaleSliderHeight: 950, 38 loop: false, 39 imageAlignCenter: true, 40 imageScaleMode: 'fit', 41 navigateByClick: true, 42 numImagesToPreload:2, 43 arrowsNav:true, 44 arrowsNavAutoHide: true, 45 arrowsNavHideOnTouch: true, 46 keyboardNavEnabled: true, 47 fadeinLoadedSlide: true, 48 globalCaption: true, 49 globalCaptionInside: false, 50 thumbs: { 51 appendSpan: true, 52 spacing: 0, 53 firstMargin: false, 54 paddingBottom: 4 55 } 56 }); 57 58 /* Loop para aplicar o carousel em todos os itens identificados com as classes abaixo */ 59 jQuery('.royalSlider').each(function(index){ 60 if(jQuery(".royalSlider").eq(index).length) { 61 jQuery('.royalSlider').eq(index).royalSlider({ 62 fullscreen: { 63 enabled: true, 64 nativeFS: true 65 }, 66 controlNavigation: 'thumbnails', 67 autoScaleSlider: false, 68 autoScaleSliderWidth: 850, 69 autoScaleSliderHeight: 950, 70 loop: false, 71 imageAlignCenter: true, 72 imageScaleMode: 'fit', 73 navigateByClick: true, 74 numImagesToPreload:2, 75 arrowsNav:true, 76 arrowsNavAutoHide: true, 77 arrowsNavHideOnTouch: true, 78 keyboardNavEnabled: true, 79 fadeinLoadedSlide: true, 80 globalCaption: true, 81 globalCaptionInside: false, 82 thumbs: { 83 appendSpan: true, 84 spacing: 0, 85 firstMargin: false, 86 paddingBottom: 4 87 } 88 }); 89 90 var legenda = $(this).find(".rsGCaption"); 91 var container = $(this).find(".rsOverflow"); 92 93 $(legenda).insertAfter(container); 94 } 95 /* Loop para aplicar o carousel em todos os itens identificados com as classes abaixo */ 96 }); 97 }, 98 99 owlGaleriaVideos:function(){ 100 var owl_galeria_videos = $('.owl_galeria_videos').owlCarousel({ 101 margin:0, 102 nav:false, 103 autoplayHoverPause:true, 104 dots: false, 105 responsive:{ 106 0:{ 107 items:3, 108 dots:true 109 }, 110 600:{ 111 items:3, 112 dots:true 113 }, 114 1000:{ 115 items:5, 116 dots: true 117 } 118 } 119 }); 120 }, 121 122 owlGaleriaVideos_click:function(){ 123 124 $(".owl_galeria_videos a").click(function () { 125 var video = $(this).attr('data-url'); 126 127 $(this).parents('.out-gallery-videos').find('.preview-video').html(''); 128 var iframe = '<div class="embed-responsive embed-responsive-16by9"><iframe width="560" height="315" src="'+video+'" frameborder="0" allowfullscreen></iframe></div>'; 129 $(this).parents('.out-gallery-videos').find('.preview-video').append(iframe); 130 $(".out-gallery-videos").find('.ativo').removeClass('ativo'); 131 $(this).addClass('ativo'); 132 }); 133 }, 134 135 owlSliderInterno:function(){ 136 var carrouselInterno = $('#carrouselInterno').owlCarousel({ 137 margin:25, 138 nav:false, 139 items: 1, 140 autoplayHoverPause:true, 141 dots: true, 142 autoHeight: true, 143 autoplay: false, 144 autoplayTimeout: 5000, 145 loop: true 146 }); 147 }, 148 149 readMoreDepoimento:{ 150 start: function(){ 151 152 // $(".leiaMais").click(function(event) { 153 // event.preventDefault(); 154 // container = $(this).parent("div"); 155 156 // if(!container.hasClass('expandir')){ 157 // $(this).text("Ver Menos"); 158 // $(container).addClass('expandir'); 159 // }else{ 160 // $(this).text("Ver Mais"); 161 // $(container).removeClass('expandir'); 162 // } 163 // }); 164 165 $(".leiaMais").click(function(event) { 166 event.preventDefault(); 167 container = $(this).parent("div"); 168 nome = $(this).parent("div").find('.nome').html(); 169 imagem = $(this).parent("div").prev('.foto-depoimento').clone(); 170
171 $('#modalDepoimentos').find('.modal-body').html(container.html()).prepend(imagem[0]); 172 $('#modalDepoimentos').find('.modal-title').html("Depoimento de " + nome); 173 $('#modalDepoimentos').modal('show'); 174 }); 175 176 $(".single-depoimento").each(function(index, el) { 177 178 179 id = $(this).attr('id'); 180 181 Depoimento = $("#" + id + " .text-depoimento"); 182 ContainerDepoimento = $("#" + id + " .text-depoimento p"); 183 184 alturaDepoimento = $(Depoimento).height() - 20; 185 alturaContainerDepoimento = $(ContainerDepoimento).height(); 186 187 if(alturaContainerDepoimento > alturaDepoimento){ 188 $(Depoimento).addClass('maior'); 189 //console.log("Maior"); 190 }else{ 191 //console.log("Menor"); 192 } 193 }); 194 } 195 }, 196 }, 197 198 owlDepoimentos:{ 199 start:function(){ 200 container = $(".depoimentos-flexcontent"); 201 container.removeClass('owl-destroy'); 202 owl_depoimentos = container.owlCarousel({ 203 margin:10, 204 nav:false, 205 autoplayHoverPause:true, 206 207 responsive:{ 208 0:{ 209 items:1, 210 dots: true 211 }, 212 500:{ 213 items:2, 214 dots: true 215 }, 216 1000:{ 217 items:1 218 } 219 } 220 }); 221 }, 222 223 destroy:function(){ 224 owl_depoimentos.trigger('destroy.owl.carousel'); 225 container.addClass('owl-destroy'); 226 }, 227 228 controleResolucao:function(){ 229 if (resolucaoAtual == "lg" || resolucaoAtual == "md" || resolucaoAtual == "sm"){ 230 App.owlDepoimentos.destroy(); 231 }else if(resolucaoAtual == "xs"){ 232 App.owlDepoimentos.start(); 233 } 234 } 235 }, 236 237 jsClassBreakPoints:{ 238 addCss: function(){ 239 var windowL = $( window ).width(); 240 var classBreakPoint; 241 if (windowL >= 1185){ 242 classBreakPoint = "lg"; 243 }else if (windowL < 1185 && windowL >= 977){ 244 classBreakPoint = "md"; 245 }else if (windowL < 977 && windowL >= 753){ 246 classBreakPoint = "sm"; 247 }else if (windowL < 753){ 248 classBreakPoint = "xs"; 249 } 250 251 setTimeout(function(){ 252 $("body").removeClass('lg').removeClass('md').removeClass('sm').removeClass('xs').addClass(classBreakPoint); 253 }, 1000); 254 255 resolucaoAtual = classBreakPoint; 256 } 257 }, 258 }; 259 260 $(document).ready(function() { 261 App.iniciaApp.start(); 262 }); 263 264 $(document).resize(function(event) { 265 App.jsClassBreakPoints.addCss(); 266 App.owlDepoimentos.controleResolucao(); 267 }); 268 269})(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.