1(function($) { "use strict"; 2 3 // Add new div in menu 4 $('ul.menu-in-overlay li').addClass('cl-effect-11'); 5 6 // Add class for columns : 10, 11, 12 skeleton. 7 $('.rows').find('div').each(function(i, ojb) { 8 if ( $(this).hasClass('one columns2') ) { 9 $(this).removeClass('one columns2').addClass('twelve columns'); 10 } 11 12 if ( $(this).hasClass('one columns1') ) { 13 $(this).removeClass('one columns1').addClass('eleven columns'); 14 } 15 16 if ( $(this).hasClass('one columns0') ) { 17 $(this).removeClass('one columns0').addClass('ten columns'); 18 } 19 }); 20 21 //Navigation 22 $('ul.slimmenu').on('click',function(){"use strict"; 23 var width = $(window).width(); 24 if ((width <= 800)){ 25 $(this).slideToggle(); 26 } 27 }); 28 $('ul.slimmenu').slimmenu({ 29 resizeWidth: '800', 30 collapserTitle: '', 31 easingEffect:'easeInOutQuint', 32 animSpeed:'medium', 33 indentChildren: true, 34 childrenIndenter: '»' 35 }); 36 37 /* Scroll Too */ 38 $(window).load(function(){"use strict"; 39 /* Page Scroll to id fn call */ 40 $("ul.slimmenu li a,a[data-gal='m_PageScroll2id'], a.scroll").mPageScroll2id({ 41 highlightSelector:"ul.slimmenu li a", 42 offset: 75, 43 scrollSpeed:1000, 44 scrollEasing: "easeInOutCubic" 45 }); 46 }); 47 48 //Home fit screen 49 $(function(){"use strict"; 50 $('#home, #home-sec').css({'height':($(window).height())+'px'}); 51 $(window).resize(function(){ 52 $('#home, #home-sec').css({'height':($(window).height())+'px'}); 53 }); 54 }); 55 56 //text rotating 57 $('.flippy').flippy({ 58 interval: 4, 59 speed: 500, 60 stop: false, 61 distance: "100px" 62 }); 63 64 //Facts Counter 65 $('.counter').counterUp({ 66 delay: 100, 67 time: 3000 68 }); 69 70 //Scrolling 71 $("html").niceScroll(); 72 73 //Tooltip 74 $(".tipped").tipper(); 75 76 //Logos Carousel 77 $("#owl-logos").owlCarousel({ 78 itemsCustom : [ 79 [0, 2], 80 [450, 2], 81 [600, 2], 82 [700, 3], 83 [1000, 4], 84 [1200, 4], 85 [1400, 5], 86 [1600, 5] 87 ], 88 autoPlay : 4000, 89 pagination : false, 90 }); 91 92 /* Portfolio Sorting */ 93 jQuery(document).ready(function($){ 94 (function ($) { 95 var container = $('.portfolio-wrap'); 96 function getNumbColumns() { 97 var winWidth = $(window).width(), 98 columnNumb = 1; 99 if (winWidth > 1500) { 100 columnNumb = 4; 101 } else if (winWidth > 1200) { 102 columnNumb = 3; 103 } else if (winWidth > 900) { 104 columnNumb = 2; 105 } else if (winWidth > 600) { 106 columnNumb = 2; 107 } else if (winWidth > 300) { 108 columnNumb = 1; 109 } 110 return columnNumb; 111 112 } 113 function setColumnWidth() { 114 var winWidth = $(window).width(), 115 columnNumb = getNumbColumns(), 116 postWidth = Math.floor(winWidth / columnNumb); 117 } 118 $('#portfolio-filter #filter a').click(function () { 119 var selector = $(this).attr('data-filter'); 120 $(this).parent().parent().find('a').removeClass('current'); 121 $(this).addClass('current'); 122 container.isotope( { 123 filter : selector 124 }); 125 setTimeout(function () { 126 reArrangeProjects(); 127 }, 300); 128 return false; 129 }); 130 function reArrangeProjects() { 131 setColumnWidth(); 132 container.isotope('reLayout'); 133 } 134 container.imagesLoaded(function () { 135 setColumnWidth(); 136 container.isotope( { 137 itemSelector : '.portfolio-box', 138 layoutMode : 'masonry', 139 resizable : false 140 } ); 141 } ); 142 $(window).on('debouncedresize', function () { 143 reArrangeProjects(); 144 } ); 145 } )(jQuery); 146 147 }); 148 149 /* DebouncedResize Function */ 150 (function ($) { 151 var $event = $.event, 152 $special, 153 resizeTimeout; 154 $special = $event.special.debouncedresize = { 155 setup : function () { 156 $(this).on('resize', $special.handler); 157 }, 158 teardown : function () { 159 $(this).off('resize', $special.handler); 160 }, 161 handler : function (event, execAsap) { 162 var context = this, 163 args = arguments, 164 dispatch = function () { 165 event.type = 'debouncedresize';
166 $event.dispatch.apply(context, args); 167 }; 168 if (resizeTimeout) { 169 clearTimeout(resizeTimeout); 170 } 171 execAsap ? dispatch() : resizeTimeout = setTimeout(dispatch, $special.threshold); 172 }, 173 threshold : 150 174 }; 175 } )(jQuery); 176 177 178 // Portfolio Ajax 179 $(window).load(function() { 180 'use strict'; 181 var loader = $('.expander-wrap'); 182 if(typeof loader.html() == 'undefined'){ 183 $('<div class="expander-wrap"><div id="expander-wrap" class="container clearfix relative"><p class="cls-btn"><a class="close">X</a></p><div/></div></div>').css({opacity:0}).hide().insertAfter('.portfolio'); 184 loader = $('.expander-wrap'); 185 } 186 $('.expander').on('click', function(e){ 187 e.preventDefault(); 188 e.stopPropagation(); 189 var url = $(this).attr('href'); 190 loader.slideUp(function(){ 191 $('.page-overlay').show(); 192 $.get(url, function(data){ 193 var portfolioContainer = $('.portfolio'); 194 var topPosition = portfolioContainer.offset().top; 195 var bottomPosition = topPosition + portfolioContainer.height(); 196 $('html,body').delay(600).animate({ scrollTop: bottomPosition - -10}, 800); 197 var container = $('#expander-wrap>div', loader); 198 container.html(data); 199 $(".video").fitVids(); 200 201 $('.project').flexslider({ 202 animation: "fade", 203 selector: ".project-slides .slide", 204 controlNav: false, 205 directionNav: true , 206 slideshowSpeed: 5000, 207 }); 208 209 loader.slideDown(function(){ 210 $('.page-overlay').hide(); 211 if(typeof keepVideoRatio == 'function'){ 212 keepVideoRatio('.video > iframe'); 213 } 214 }).delay(1000).animate({opacity:1}, 200); 215 }); 216 }); 217 }); 218 219 $('.close', loader).on('click', function(){ 220 loader.delay(300).slideUp(function(){ 221 var container = $('#expander-wrap>div', loader); 222 container.html(''); 223 $(this).css({opacity:0}); 224 225 }); 226 var portfolioContainer = $('.portfolio'); 227 var topPosition = portfolioContainer.offset().top; 228 $('html,body').delay(0).animate({ scrollTop: topPosition - 70}, 500); 229 }); 230 }); 231 232 //Scroll on click 233 jQuery(document).ready(function() { 234 235 jQuery('.back-top').click(function(event) { 236 event.preventDefault(); 237 jQuery('html, body').animate({scrollTop: 0}, 500); 238 return false; 239 }); 240 241 }); 242 243 //Parallax effects 244 $('.parallax-about').parallax("50%", 0.3); 245 $('.parallax-blog').parallax("50%", 0.3); 246 $('.parallax-home').parallax("50%", 0.4); 247 248 //Home YouTube Video 249 $(".player").mb_YTPlayer(); 250 251 $('.image-link, .video-link').magnificPopup({ 252 callbacks: { 253 elementParse: function(item) { 254 // the class name 255 if(item.el.context.className == 'video-link') { 256 item.type = 'iframe'; 257 } else { 258 item.type = 'image'; 259 } 260 } 261 }, 262 gallery:{ 263 enabled:true 264 }, 265 type: 'image', 266 closeOnContentClick: false, 267 closeBtnInside: false, 268 mainClass: 'mfp-with-zoom mfp-img-mobile', 269 image: { 270 verticalFit: true, 271 titleSrc: function(item) { 272 return item.el.attr('title'); 273 //return item.el.attr('title') + ' · <a class="image-source-link" href="'+item.el.attr('data-source')+'" target="_blank">image source</a>'; 274 } 275 }, 276 }); 277 278})(jQuery); 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
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.