1jQuery(document).ready(function($) { 2 "use strict"; 3 4 /* animate number */ 5 $('.dt-sc-counter').each(function(){ 6 7 var $posttext = $(this).find('.dt-sc-counter-number').attr('data-append'); 8 var $append = ''; 9 10 if (typeof $posttext === "undefined") { 11 $append = $.animateNumber.numberStepFactories.append(''); 12 } else { 13 $append = $.animateNumber.numberStepFactories.append($posttext); 14 } 15 16 $(this).one('inview', function (event, visible) { 17 if(visible === true) { 18 var val = $(this).find('.dt-sc-counter-number').attr('data-value'); 19 $(this).find('.dt-sc-counter-number').animateNumber({ number: val, numberStep: $append }, 2000); 20 } 21 }); 22 }); 23 24 /* accordion & toggle */ 25 $('.dt-sc-toggle').toggleClick(function(){ $(this).addClass('active'); },function(){ $(this).removeClass('active'); }); 26 $('.dt-sc-toggle').on('click',function(){ $(this).next('.dt-sc-toggle-content').slideToggle(); }); 27 28 $('.dt-sc-toggle-frame-set').each(function(){ 29 var $this = $(this), 30 $toggle = $this.find('.dt-sc-toggle-accordion'); 31 32 $toggle.on('click',function(){ 33 if( $(this).next().is(':hidden') ) { 34 $this.find('.dt-sc-toggle-accordion').removeClass('active').next().slideUp(); 35 $(this).toggleClass('active').next().slideDown(); 36 } 37 return false; 38 }); 39 40 // activate first item always 41 $this.find('.dt-sc-toggle-accordion:first').addClass("active"); 42 $this.find('.dt-sc-toggle-accordion:first').next().slideDown(); 43 }); 44 45 /* tooltip */ 46 if($(".dt-sc-tooltip-bottom").length){ 47 $(".dt-sc-tooltip-bottom").each(function(){ $(this).tipTip({maxWidth: "auto"}); }); 48 } 49 50 if($(".dt-sc-tooltip-top").length){ 51 $(".dt-sc-tooltip-top").each(function(){ $(this).tipTip({maxWidth: "auto",defaultPosition: "top"}); }); 52 } 53 54 if($(".dt-sc-tooltip-left").length){ 55 $(".dt-sc-tooltip-left").each(function(){ $(this).tipTip({maxWidth: "auto",defaultPosition: "left"}); }); 56 } 57 58 if($(".dt-sc-tooltip-right").length){ 59 $(".dt-sc-tooltip-right").each(function(){ $(this).tipTip({maxWidth: "auto",defaultPosition: "right"}); }); 60 } 61 62 /* horizontal tabs */ 63 if($('ul.dt-sc-tabs-horizontal').length > 0){ 64 $('ul.dt-sc-tabs-horizontal').each(function(){ 65 $(this).fpTabs('> .dt-sc-tabs-horizontal-content', { 66 effect: 'fade' 67 }); 68 }); 69 } 70 if($('ul.dt-sc-tabs-horizontal-frame').length > 0){ 71 $('ul.dt-sc-tabs-horizontal-frame').each(function(){ 72 $(this).fpTabs('> .dt-sc-tabs-horizontal-frame-content', { 73 effect: 'fade' 74 }); 75 }); 76 } 77 78 /* vertical tabs */ 79 if($('ul.dt-sc-tabs-vertical').length > 0){ 80 $('ul.dt-sc-tabs-vertical').each(function(){ 81 $(this).fpTabs('> .dt-sc-tabs-vertical-content', { 82 effect: 'fade' 83 }); 84 }); 85 86 $('.dt-sc-tabs-vertical').each(function(){ 87 $(this).find("li:first").addClass('first').addClass('current'); 88 $(this).find("li:last").addClass('last'); 89 }); 90 91 $('.dt-sc-tabs-vertical li').on('click',function(){ 92 $(this).parent().children().removeClass('current'); 93 $(this).addClass('current'); 94 }); 95 } 96 if($('ul.dt-sc-tabs-vertical-frame').length > 0){ 97 $('ul.dt-sc-tabs-vertical-frame').each(function(){ 98 $(this).fpTabs('> .dt-sc-tabs-vertical-frame-content', { 99 effect: 'fade' 100 }); 101 }); 102 103 $('.dt-sc-tabs-vertical-frame').each(function(){ 104 $(this).find("li:first").addClass('first').addClass('current'); 105 $(this).find("li:last").addClass('last'); 106 }); 107 108 $('.dt-sc-tabs-vertical-frame li').on('click',function(){ 109 $(this).parent().children().removeClass('current'); 110 $(this).addClass('current'); 111 }); 112 } 113 114 /* ajax mailchimp */ 115 $('form[name="frmsubscribe"]').each(function(){ 116 117 $(this).submit(function(){ 118 var $this = $(this); 119 var $mc_fname = $this.find("input[name='dt_mc_fname']").val(), 120 $mc_email = $this.find("input[name='dt_mc_emailid']").val(), 121 $mc_apikey = $this.find("input[name='dt_mc_apikey']").val(), 122 $mc_listid = $this.find("input[name='dt_mc_listid']").val(); 123 124 $.ajax({ 125 type: "post", 126 dataType : "html", 127 url: dttheme_urls.ajaxurl, 128 data: 129 { 130 action: 'dt_theme_mailchimp_subscribe', 131 mc_fname: $mc_fname, 132 mc_email: $mc_email, 133 mc_apikey: $mc_apikey, 134 mc_listid: $mc_listid 135 }, 136 success: function (response) { 137 $this.parent().find('.dt_ajax_subscribe_msg').html(response); 138 if (response.match('success') != null) { 139 $this.find("input[name='mc_submit']").attr('disabled', 'disabled'); 140 $this.find("input[name='mc_submit']").addClass('disabled'); 141 } 142 } 143 }); 144 return false; 145 }); 146 });
147 148 $(window).on('load',function(){ 149 150 /* testimonial carousel */ 151 if($(".carousel_items").length) { 152 $(".carousel_items .dt-sc-testimonial-carousel").each(function(){ 153 154 var $prev = $(this).parents(".carousel_items").find(".testimonial-prev"); 155 var $next = $(this).parents(".carousel_items").find(".testimonial-next"); 156 var $anim = $(this).parents(".carousel_items").attr("data-animation"); 157 158 $(this).carouFredSel({ 159 responsive: true, 160 auto: false, 161 width: '100%', 162 prev: $prev, 163 next: $next, 164 height: 'variable', 165 scroll: { easing: "linear", duration: 500, fx : $anim }, 166 items: { width: 1170, height: 'variable', visible: { min: 1, max: 1 } }, 167 swipe: { 168 onMouse: true, 169 onTouch: true 170 } 171 }); 172 }); 173 } 174 175 /* partners carousel */ 176 if($(".dt-sc-partners-carousel").length) { 177 $(".dt-sc-partners-carousel").each(function(){ 178 179 var $prev = $(this).parents(".dt-sc-partners-carousel-wrapper").find(".partners-prev"); 180 var $next = $(this).parents(".dt-sc-partners-carousel-wrapper").find(".partners-next"); 181 var $scroll = $(this).parents(".dt-sc-partners-carousel-wrapper").attr('data-scroll'); 182 var $visible = $(this).parents(".dt-sc-partners-carousel-wrapper").attr('data-visible'); 183 184 $(this).carouFredSel({ 185 responsive: true, 186 auto: false, 187 width: '100%', 188 height: 'variable', 189 prev: $prev, 190 next: $next, 191 scroll: parseInt($scroll), // The number of items to scroll at once 192 items: { 193 visible:{ 194 min: 1, 195 max: parseInt($visible) // The number of items to show at once 196 } 197 }, 198 swipe: { 199 onMouse: true, 200 onTouch: true 201 } 202 }); 203 }); 204 } 205 206 /* images carousel */ 207 if($(".dt-sc-images-carousel").length) { 208 $(".dt-sc-images-carousel").each(function(){ 209 210 var $prev = $(this).parents(".dt-sc-images-wrapper").find(".images-prev"); 211 var $next = $(this).parents(".dt-sc-images-wrapper").find(".images-next"); 212 213 $(this).carouFredSel({ 214 responsive: true, 215 auto: false, 216 width: '100%', 217 height: 'variable', 218 prev: $prev, 219 next: $next, 220 scroll: 1, 221 items: { 222 width:570, 223 height: 'variable', 224 visible: { min: 1, max: 1 } 225 }, 226 swipe: { 227 onMouse: true, 228 onTouch: true 229 } 230 }); 231 }); 232 } 233 234 /* twitter carousel */ 235 if($('.dt-sc-twitter-carousel-wrapper').length > 0) { 236 $('.dt-sc-twitter-carousel-wrapper .dt-sc-twitter-carousel').carouFredSel({ 237 width: 'auto', 238 height: 'auto', 239 scroll: 1, 240 direction: 'up', 241 items: { 242 height: 'auto', 243 visible: { min: 1, max: 1 } 244 } 245 }); 246 } 247 248 /* special testimonials */ 249 if($('.dt-sc-testimonial-special-wrapper').length > 0) { 250 $('.dt-sc-testimonial-special-wrapper .dt-sc-testimonial-special').carouFredSel({ 251 responsive: true, 252 auto: false, 253 width: '100%', 254 pagination: { 255 container: ".dt-sc-testimonial-images", 256 anchorBuilder: false 257 }, 258 height: 'auto', 259 scroll: { fx: "crossfade" }, 260 items: { visible: { min: 1, max: 1 } } 261 }); 262 } 263 264 /* donutchart */ 265 $(".dt-sc-donutchart").each(function(){ 266 var $this = $(this); 267 var $bgColor = ( $this.data("bgcolor") !== undefined ) ? $this.data("bgcolor") : "#5D18D6"; 268 var $fgColor = ( $this.data("fgcolor") !== undefined ) ? $this.data("fgcolor") : "#000000"; 269 var $size = ( $this.data("size") !== undefined ) ? $this.data("size") : "100"; 270 271 $this.donutchart({'size': $size, 'fgColor': $fgColor, 'bgColor': $bgColor , 'donutwidth' : 5 }); 272 $this.donutchart('animate'); 273 }); 274 275 //Carousel Items... 276 if($(".carousel_items").length) { 277 $(".carousel_items .dt_carousel").each(function(){ 278 279 var $min = parseInt($(this).attr('data-visible')); 280 var $scroll = parseInt($(this).attr('data-scroll')); 281 var $auto = false; 282 if($(this).attr('data-auto') == 'true') { 283 $auto = true; 284 } 285 var $animation = $(this).attr('data-animation'); 286 287 if($(window).width() <= 767) { $min = 1; } 288 289 var prv = $(this).parent('.carousel_items').find('.prev-arrow'); var nxt = $(this).parent('.carousel_items').find('.next-arrow'); 290 var pager = $(this).parent('.carousel_items').find('.dt-carousel-pagination'); 291 292 $(this).carouFredSel({ 293 responsive: true, 294 auto: $auto, 295 width: '100%', 296 prev: prv, 297 next: nxt, 298 pagination: pager, 299 height: 'variable', 300 scroll: { items: $scroll, fx: $animation }, 301 items: { width: parseInt( 1230 / $min ), height: 'variable', visible: { min: $min } }, 302 onCreate: function () { 303 $(window).on("resize", function() { 304 $(this).trigger('configuration', ['debug', false, true]); 305 }).trigger('resize'); 306 }, 307 swipe: { 308 onMouse: true, 309 onTouch: true 310 } 311 }); 312 }); 313 } 314 }); 315 316 /* parallax section */ 317 if($(".dt-sc-parallax-section").length) { 318 $('.dt-sc-parallax-section').each(function(){ 319 $(this).on('inview', function (event, visible) { 320 if(visible === true) { 321 $(this).parallax("50%", 0.5); 322 } else { 323 $(this).css('background-position', ''); 324 } 325 }); 326 }); 327 } 328 329 /* video manager */ 330 if($(".dt-sc-video-wrapper").length) { 331 332 if($(".dt-sc-video-item").length) { 333 334 $(".dt-sc-video-item").each(function(){ 335 $(this).on('click',function(){ 336 $('.video-overlay-inner a').attr('href', $(this).attr('data-link')); 337 $('.dt-sc-video-wrapper img').attr('src', $(this).find('.dt-sc-vitem-thumb img').attr('data-full'));
338 $('.video-overlay-inner h2').html($(this).find('h2').html()); 339 $('.video-overlay-inner p').html($(this).find('p').html()); 340 $(this).parent('div').children().removeClass('active'); 341 $(this).addClass('active'); 342 }); 343 }); 344 } 345 346 $(".video-overlay-inner a").prettyPhoto({animation_speed:'normal',theme:'light_square',slideshow:3000, autoplay_slideshow: false,social_tools: false,deeplinking:false}); 347 var video_scroll = $(".dt-sc-video-manager-right").niceScroll({ cursorcolor:"#ffffff", cursorwidth: "2px"}); 348 video_scroll.rail.addClass('dt-sc-skin'); 349 } 350 351 /* Load More Button */ 352 $('.dt-sc-infinite-portfolio-load-more').each(function(){ 353 354 var $this = $(this), 355 $x = $(this).prev('.dt-sc-infinite-portfolio-container').data('paged'), 356 $xstyle = $(this).data('style'); 357 358 if( $xstyle == 'lazy' ) { 359 $(window).scroll(function(){ 360 if($(window).scrollTop() == $(document).height() - $(window).height()){ 361 362 var $per_page = $this.data('per-page'), 363 $term = $this.data('term'), 364 $style = $this.data('style'), 365 $paged = $x, 366 $prev = $this.prev(); 367 368 $x++; 369 370 $.ajax({
371 type : "post", 372 dataType : "html", 373 url : dttheme_urls.ajaxurl, 374 data : { action: "dt_ajax_infinite_portfolios", per_page : $per_page, term : $term, style: $style , paged: $paged }, 375 success: function (data) { 376 if (data.length > 0) { 377 $prev.append( data ); 378 } else { 379 $prev.find(".message").removeClass("hidden"); 380 setTimeout(function(){ 381 $prev.find(".message").addClass('hidden'); 382 $this.addClass('disable'); 383 }, 5000); 384 } 385 }, 386 error: function (jqXHR, textStatus, errorThrown) { 387 } 388 }); 389 } 390 }); 391 } else if( $xstyle == 'load-more') { 392 393 $this.on('click',function(e){ 394 395 e.preventDefault(); 396 397 var $per_page = $(this).data('per-page'), 398 $term = $(this).data('term'), 399 $style = $(this).data('style'), 400 $paged = $x, 401 $prev = $(this).prev(); 402 403 $x++; 404 405 $.ajax({ 406 type : "post", 407 dataType : "html", 408 url : dttheme_urls.ajaxurl, 409 data : { action: "dt_ajax_infinite_portfolios", per_page : $per_page, term : $term, style: $style , paged: $paged }, 410 success: function (data) { 411 412 if (data.length > 0) { 413 $prev.append( data ); 414 } else { 415 $prev.find(".message").removeClass("hidden"); 416 //$this.addClass('hidden'); 417 418 setTimeout(function(){ 419 $prev.find(".message").addClass('hidden'); 420 $this.addClass('disable'); 421 }, 5000); 422 } 423 }, 424 error: function (jqXHR, textStatus, errorThrown) { 425 } 426 }); 427 }); 428 } 429 }); 430}); 431 432/* progress bar */ 433(function($){ 434 $(".dt-sc-progress").one('inview', function (event, visible) { 435 var $this = $(this), 436 pvalue = $this.find('.dt-sc-bar').attr('data-value'); 437 438 if (visible == true) { 439 $this.find('.dt-sc-bar').animate({width: pvalue + "%"},600,function(){ $this.find('.dt-sc-bar-text').fadeIn(400); }); 440 } 441 }); 442})(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.