1jQuery(document).ready(function($) { 2 // Owl Carousel 3 $(".carousel-default").owlCarousel({ 4 navigation : true, 5 slideSpeed : 300, 6 paginationSpeed : 400, 7 autoPlay : true, 8 addClassActive: true, 9 navigationText: ["",""], 10 singleItem:true 11 }); 12 13 // Owl Carousel - Content Blocks 14 $(".carousel-blocks").owlCarousel({ 15 slideSpeed: 300, 16 autoPlay: false, 17 navigation: true, 18 navigationText: ["",""], 19 pagination: false, 20 addClassActive: true, 21 items: 5, 22 itemsDesktop: [768,3], 23 itemsDesktopSmall: [480,1] 24 }); 25 26 $(".carousel-fade-transition").owlCarousel({ 27 navigation : true, 28 slideSpeed : 300, 29 paginationSpeed : 400, 30 autoPlay : true, 31 addClassActive: true, 32 navigationText: ["",""], 33 singleItem:true, 34 transitionStyle : "fade" 35 }); 36 37 // skillbar 38 $('.skillbar').bind('inview', function (event, visible) { 39 if (visible) { 40 $('.skillbar').each(function(){ 41 $(this).find('.skillbar-bar').animate({ 42 width:$(this).attr('data-percent') 43 },3000); 44 }); 45 46 } 47 }); 48 49 // countTo 50 $('.timer').bind('inview', function (event, visible) { 51 if (visible) { 52 $('.timer').countTo({ 53 speed: 1400, 54 refreshInterval: 10, 55 formatter: function (value, options) { 56 return value.toFixed(options.decimals); 57 }, 58 onUpdate: function (value) { 59 console.debug(this); 60 }, 61 onComplete: function (value) { 62 console.debug(this); 63 } 64 }); 65 $( this ).off( event ); 66 } 67 }); 68 function count(options) { 69 var $this = $(this); 70 options = $.extend({}, options || {}, $this.data('countToOptions') || {}); 71 $this.countTo(options); 72 } 73 // custom formatting example 74 $('#decimal').data('countToOptions', { 75 formatter: function (value, options) { 76 return value.toFixed(options.decimals).replace(/\B(?=(?:\d{3})+(?!\d))/g, ','); 77 } 78 }); 79 80 // Sticky Nav Bar 81 $(window).scroll(function() { 82 if ($(this).scrollTop() > 20){ 83 $('.sticky').addClass("fixed"); 84 } 85 else{ 86 $('.sticky').removeClass("fixed"); 87 } 88 }); 89 90 // Lightbox 91 $('a[data-rel^=lightcase]').lightcase({ 92 maxWidth: 1000, 93 maxHeight: 'auto', 94 transition: 'scrollHorizontal', 95 speedIn: 600, 96 speedOut: 600, 97 video: { 98 width: 1000, 99 height: 'auto', 100 loop: true 101 }, 102 }); 103 104 // Content Animation 105 $(window).scroll(function(d,h) { 106 $(".animated").each(function(i) { 107 a = $(this).offset().top + $(this).height(); 108 b = $(window).scrollTop() + $(window).height(); 109 if (a < b){ 110 $(this).addClass("animation"); 111 } 112 }); 113 }); 114}); 115 116 117// In view animation 118/** 119 * author Remy Sharp 120 * url http://remysharp.com/2009/01/26/element-in-view-event-plugin/ 121 */ 122(function ($) { 123 function getViewportHeight() { 124 var height = window.innerHeight; // Safari, Opera 125 var mode = document.compatMode; 126
127 if ( (mode || !$.support.boxModel) ) { // IE, Gecko 128 height = (mode == 'CSS1Compat') ? 129 document.documentElement.clientHeight : // Standards 130 document.body.clientHeight; // Quirks 131 } 132 133 return height; 134 } 135 136 $(window).scroll(function () { 137 var vpH = getViewportHeight(), 138 scrolltop = (document.documentElement.scrollTop ? 139 document.documentElement.scrollTop : 140 document.body.scrollTop), 141 elems = []; 142 143 // naughty, but this is how it knows which elements to check for 144 $.each($.cache, function () { 145 if (this.events && this.events.inview) { 146 elems.push(this.handle.elem); 147 } 148 }); 149 150 if (elems.length) { 151 $(elems).each(function () { 152 var $el = $(this), 153 top = $el.offset().top, 154 height = $el.height(), 155 inview = $el.data('inview') || false; 156 157 if (scrolltop > (top + height) || scrolltop + vpH < top) { 158 if (inview) { 159 $el.data('inview', false); 160 $el.trigger('inview', [ false ]); 161 } 162 } else if (scrolltop < (top + height)) { 163 if (!inview) { 164 $el.data('inview', true); 165 $el.trigger('inview', [ true ]); 166 } 167 } 168 }); 169 } 170 }); 171 172 // kick the event to pick up any elements already in view. 173 // note however, this only works if the plugin is included after the elements are bound to 'inview' 174 $(function () { 175 $(window).scroll(); 176 }); 177})(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.