1/* 2* Riva Slider 3*/ 4 5(function( $ ){ 6 $.fn.rivaSlider = function( options ) { 7 /* 8 * Vars 9 */ 10 var $this = this, 11 selector = options['selector'], 12 padding_left = options['padding_left'], 13 $elems = $this.find('.' + selector), 14 $controls = $this.find('.rivaslider-navigation'), 15 visible = options['visible'], 16 $wrapper, $inner, scrol, qty, offsetLeft, fixH = 0, steps, bodyWidth, current = 0, isReadry = 0; 17 /* 18 * Methods 19 */ 20 var methods = { 21 /* 22 * Constructor 23 */ 24 init : function() { 25 /* 26 * Wrap all selected elements into wrapper 27 */ 28 if (!isReadry) { 29 $elems.wrapAll('<div class="rivaslider-wrapper"></div>'); 30 $wrapper = $this.find('.rivaslider-wrapper'); 31 $wrapper.wrapInner('<div class="rivaslider-wrapper-inner"></div>'); 32 $inner = $this.find('.rivaslider-wrapper-inner'); 33 } 34 qty = $elems.length; 35 bodyWidth = $('body').width() 36 offsetLeft = parseInt($elems.eq(0).css('padding-left')); 37 if (bodyWidth > 768) { 38 steps = qty - visible -1; 39 scrol = $this.parents('[class*="col"]').width() / visible + offsetLeft / visible; 40// $wrapper.width(scrol * visible - offsetLeft); 41 $elems.width(scrol - offsetLeft); 42 } else { 43 steps = qty - 2; 44 scrol = $this.parents('[class*="col"]').width() + offsetLeft; 45// $wrapper.width(scrol - offsetLeft); 46 $elems.width(scrol - offsetLeft); 47 } 48 if (!isReadry) { 49 if ($this.hasClass('envor-section-projects')) { 50 fixH = scrol * 0.6; 51 } 52 } 53 $inner.css('margin-left', '-' + offsetLeft + 'px'); 54 $wrapper.height(function() { 55 var h = 0; 56 $elems.each(function() { 57 if ($(this).height() > h) 58 h = $(this).height(); 59 }); 60 return h + fixH; 61 }); 62 isReadry = 1; 63 }, 64 /* 65 * scroler 66 */ 67 scroler : function(direction) { 68 if (direction > 0) { 69 if (current <= steps) { 70 $this.find('.sl-navi a.back').removeClass('end'); 71 $inner.filter(':not(:animated)').animate({ 72 'left' : '-=' + scrol 73 }, 400, function() { current = current + 1; }); 74 } else { 75 $this.find('.sl-navi a.forward').removeClass('end'); 76 $inner.filter(':not(:animated)').animate({ 77 'left' : '0px' 78 }, 400, function() { current = 0; }); 79 } 80 } else { 81 var f; 82 if (bodyWidth > 768) { 83 f = visible; 84 } else { 85 f = 1; 86 } 87 if (current > 0) { 88 $this.find('.sl-navi a.forward').removeClass('end'); 89 $inner.filter(':not(:animated)').animate({ 90 'left' : '+=' + scrol 91 }, 400, function() { current = current - 1; }); 92 } else { 93 $this.find('.sl-navi a.forward').removeClass('end'); 94 $inner.filter(':not(:animated)').animate({ 95 'left' : '-=' + (scrol * (qty - f)) 96 }, 400, function() { current = qty - f; }); 97 } 98 } 99 } 100 } 101 return this.each( 102 function() 103 { 104 /* 105 * On init call 106 */ 107 methods.init(); 108 $('a.back', $controls).click(function(e) { 109 e.preventDefault(); 110 methods.scroler(-1); 111 }); 112 $('a.forward', $controls).click(function(e) { 113 e.preventDefault(); 114 methods.scroler(+1); 115 }); 116 /* 117 * On window resize 118 */ 119 $(window).resize(function() { 120 fixH = 0; 121 methods.init(); 122 $inner.css('left','0px'); 123// alert('reszize'); 124 }); 125 } 126 ); 127 } 128})( jQuery ); 129 130/* 131* Riva Carousel 132*/ 133 134(function( $ ){ 135 $.fn.rivaCarousel = function( options ) { 136 /* 137 * Vars 138 */ 139 var $this = this, 140 selector = options['selector'], 141 useoffest = options['useoffest'], 142 $elems = $this.find('.' + selector), 143 $controls = $this.find('.rivaslider-controls'), 144 same_height = options['same_height'], 145 visible = options['visible'], 146 mobile_visible = options['mobile_visible'], 147 $wrapper, $inner, scrol, qty, steps, offsetLeft, bodyWidth, current = 0, isReadry = 0, v, fixW; 148 /* 149 * Methods 150 */ 151 var methods = { 152 /* 153 * Constructor 154 */ 155 init : function() { 156 /* 157 * Wrap all selected elements into wrapper 158 */ 159 fixW = parseInt($elems.css('padding-left')) + parseInt($elems.css('padding-right')); 160 offsetLeft = parseInt($elems.eq(0).css('padding-left')); 161 qty = $elems.length; 162 bodyWidth = $('body').width() 163 if (bodyWidth > 768) { 164 steps = Math.ceil(qty / visible); 165 v = visible; 166 scrol = $this.parents('[class*="col"]').width() / visible + offsetLeft / visible; 167 } else { 168 if ('undefined' == mobile_visible) 169 mobile_visible = visible; 170 steps = Math.ceil(qty / mobile_visible); 171 v = mobile_visible; 172 scrol = $this.parents('[class*="col"]').width() / mobile_visible; 173 } 174 if (!isReadry) { 175 $elems.wrapAll('<div class="rivaslider-wrapper"></div>'); 176 $wrapper = $this.find('.rivaslider-wrapper'); 177 $wrapper.wrapInner('<div class="rivaslider-wrapper-inner"></div>'); 178 $inner = $this.find('.rivaslider-wrapper-inner'); 179 } 180 $wrapper.width($this.parents('[class*="col"]').width()); 181 $inner.css('margin-left', '-' + offsetLeft + 'px'); 182 $controls.find('span').remove().detach(); 183 for (var i = 0; i < steps; i++) { 184 $controls.append('<span></span>'); 185 } 186 $controls.find('span').first().addClass('active'); 187 $elems.css('width', (parseInt($wrapper.width()) / v) - fixW + offsetLeft); 188 189 190 if (bodyWidth > 768) { 191 $elems.width(scrol - offsetLeft); 192 } else { 193 scrol = $this.parents('[class*="col"]').width() + offsetLeft; 194 $elems.width(scrol - offsetLeft); 195 } 196 197 198 if (v == 1) { 199 $wrapper.height($elems.eq(current).height()); 200 } else { 201 $wrapper.height(function() { 202 var h = 0; 203 $elems.each(function() { 204 if ($(this).height() > h) 205 h = $(this).height(); 206 }); 207 return h; 208 }); 209 } 210 if (same_height) { 211 $elems.height($wrapper.height()); 212 } 213 isReadry = 1; 214 }, 215 /* 216 * scroler 217 */ 218 scroler : function(step) { 219 if (step != current) { 220 if (bodyWidth > 768) { 221 v = visible; 222 } else { 223 if ('undefined' == mobile_visible) 224 mobile_visible = visible 225 v = mobile_visible; 226 } 227 $inner.filter(':not(:animated)').animate({'left' : '-' + (scrol * v * step) + 'px'}, 400, function() { 228 current = step; 229 $controls.find('span').removeClass('active'); 230 $controls.find('span').eq(current).addClass('active'); 231 if (v == 1) 232 $wrapper.animate({'height':$elems.eq(current).height()}); 233 }); 234 } 235 } 236 } 237 return this.each(function() { 238 /* 239 * On init call 240 */ 241 methods.init(); 242 $controls.find('span').click(function(e) { 243 e.preventDefault(); 244 methods.scroler($(this).index()); 245 }); 246 /* 247 * On window resize 248 */ 249 $(window).resize(function() { 250 methods.init(); 251 $controls.find('span').click(function(e) { 252 e.preventDefault(); 253 methods.scroler($(this).index()); 254 }); 255 $inner.css('left','0px'); 256 }); 257 }); 258 } 259})( jQuery ); 260 261/* 262* Riva Countdown 263*/ 264 265(function( $ ){ 266 $.fn.rivaCountdown = function( options ) { 267 /* 268 * Vars 269 */ 270 var $this = this, 271 year = options['year'],
272 month = options['month'], 273 date = options['date'], 274 hour = options['hour'], 275 minute = options['minute'], 276 second = options['second'], 277 endDate, today, mils, 278 $daysValue = $this.find('#riva-countdown-days .value p'), 279 $hoursValue = $this.find('#riva-countdown-hours .value p'), 280 $minsValue = $this.find('#riva-countdown-minutes .value p'), 281 $secsValue = $this.find('#riva-countdown-seconds .value p'), 282 dividers = new Array(86400, 3600, 60, 1), rest, t, 283 values = new Array($daysValue, $hoursValue, $minsValue, $secsValue), 284 timer_is_on = 0; 285 endDate = new Date(year, month - 1, date, hour, minute, second); 286 if (!timer_is_on) { 287 timer_is_on = 1; 288 changeTime(); 289 } 290 function changeTime() { 291 today = new Date(); 292 rest = (endDate - today) / 1000; 293 for (var i = 0; i < dividers.length; i++) { 294 values[i].html(Math.floor(rest / dividers[i])); 295 rest = rest % dividers[i]; 296 } 297 t = setTimeout(changeTime,1000); 298 } 299 } 300})( jQuery ); 301 302(function( $ ){ 303 $.fn.envorInView = function(){ 304 var win = $(window); 305 obj = $(this); 306 var scrollPosition = win.scrollTop(); 307 var visibleArea = win.scrollTop() + win.height(); 308 var objEndPos = (obj.offset().top + obj.outerHeight()); 309 return(visibleArea >= objEndPos && scrollPosition <= objEndPos ? true : false) 310 }; 311})( jQuery ); 312 313(function( $ ){ 314 $.fn.envorAnimateObj = function(){ 315 var $obj = this, 316 animation = new Array(), 317 type = 0; 318 animation.push('bounce'); 319 animation.push('flash'); 320 animation.push('pulse'); 321 animation.push('rubberBand'); 322 animation.push('shake'); 323 animation.push('swing'); 324 animation.push('tada'); 325 animation.push('wobble'); 326 animation.push('bounceIn'); 327 animation.push('bounceInLeft'); 328 animation.push('bounceInRight'); 329 animation.push('bounceInUp'); 330 animation.push('fadeIn'); 331 animation.push('fadeInDown'); 332 animation.push('fadeInDownBig'); 333 animation.push('fadeInLeft'); 334 animation.push('fadeInLeftBig'); 335 animation.push('fadeInRight'); 336 animation.push('fadeInRightBig'); 337 animation.push('fadeInUp'); 338 animation.push('fadeInUpBig'); 339 animation.push('flip'); 340 animation.push('flipInX'); 341 animation.push('flipInY'); 342 animation.push('lightSpeedIn'); 343 animation.push('rotateIn'); 344 animation.push('rotateInDownLeft'); 345 animation.push('rotateInDownRight'); 346 animation.push('rotateInUpLeft'); 347 animation.push('rotateInUpRight'); 348 animation.push('slideInDown'); 349 animation.push('slideInLeft'); 350 animation.push('slideInRight'); 351 //animation.push('hinge'); 352 animation.push('rollIn'); 353 type = (Math.random()*animation.length)+1|0; 354 return this.each(function() { 355 $obj.fadeTo(0, 0); 356 $(window).scroll(function(){ 357 if ($obj.envorInView()) { 358 $obj.fadeTo(0,1).addClass('animated ' + animation[type]); 359 } 360 }); 361 }); 362 }; 363})( jQuery ); 364 365/* 366* Riva Sorting 367*/ 368 369(function( $ ){ 370 $.fn.rivaSorting = function( options ) { 371 var $this = this, 372 showAll = options['showAll'], 373 $filters = $this.find('.envor-sorting-filters'), 374 $elems = $this.find('.envor-sorting-item'); 375 if (showAll) { 376 $('<span data-value="*">All</span>').prependTo($filters); 377 $elems.show(); 378 } else { 379 $elems.hide().each(function() { 380 if ($(this).hasClass($filters.find('[data-value]').first().attr('data-value'))) 381 $(this).show(); 382 }); 383 } 384 $filters.find('span').click(function() { 385 var val = $(this).attr('data-value'); 386 $filters.find('span').removeClass('active'); 387 $(this).addClass('active'); 388 $elems.hide().each(function() { 389 if (val == '*') { 390 $elems.fadeIn(); 391 return; 392 } 393 if ($(this).hasClass(val)) { 394 $(this).fadeIn(); 395 return; 396 } 397 }); 398 }).first().addClass('active'); 399 } 400})( jQuery ); 401 402/* 403* Riva Toggle Tabs 404*/ 405 406(function( $ ){ 407 $.fn.rivaToggleTabs = function( options ) { 408 var $this = this, 409 $links = $this.find('li'), 410 $elems = $('.riva-toggle-tab'); 411 $elems.hide().first().show(); 412 $links.first().addClass('active'); 413 $links.click(function(e) { 414 e.preventDefault(); 415 $links.removeClass('active'); 416 $(this).addClass('active'); 417 $elems.hide().eq($(this).index()).fadeIn(); 418 }); 419 $elems.each(function() { 420 $(this).find('.riva-next-tab').click(function(e) { 421 e.preventDefault(); 422 var index = $(this).parents('.riva-toggle-tab').index(); 423 $elems.hide().eq(index + 1).show(); 424 $links.removeClass('active'); 425 $links.eq(index + 1).addClass('active'); 426 }); 427 $(this).find('.riva-prev-tab').click(function(e) { 428 e.preventDefault(); 429 var index = $(this).parents('.riva-toggle-tab').index(); 430 $elems.hide().eq(index - 1).show(); 431 $links.removeClass('active'); 432 $links.eq(index - 1).addClass('active'); 433 }); 434 }) 435 } 436}
436)( 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.