news_reader 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/.vscode/settings.json +3 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +97 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/news-reader +6 -0
- data/bin/setup +8 -0
- data/fixtures/.DS_Store +0 -0
- data/fixtures/blog/index.html +200 -0
- data/fixtures/blog/index_files/Box.css +29 -0
- data/fixtures/blog/index_files/Java_Box.js +89 -0
- data/fixtures/blog/index_files/ModuleStyleSheets.css +1655 -0
- data/fixtures/blog/index_files/black.css +11 -0
- data/fixtures/blog/index_files/blog-jive.jpg +0 -0
- data/fixtures/blog/index_files/blog-musolfs.jpg +0 -0
- data/fixtures/blog/index_files/blog-poolpak.jpg +0 -0
- data/fixtures/blog/index_files/blog-portalaudit.png +0 -0
- data/fixtures/blog/index_files/blog-semicolon1.jpg +0 -0
- data/fixtures/blog/index_files/blog-semicolon2.jpg +0 -0
- data/fixtures/blog/index_files/blog-spa1.jpg +0 -0
- data/fixtures/blog/index_files/blog-spa2.jpg +0 -0
- data/fixtures/blog/index_files/blog-statera.jpg +0 -0
- data/fixtures/blog/index_files/blue.css +11 -0
- data/fixtures/blog/index_files/common.js +149 -0
- data/fixtures/blog/index_files/dark.css +31 -0
- data/fixtures/blog/index_files/featherlight.min.css +8 -0
- data/fixtures/blog/index_files/featherlight.min.js +8 -0
- data/fixtures/blog/index_files/font-awesome.min.css +4 -0
- data/fixtures/blog/index_files/green.css +11 -0
- data/fixtures/blog/index_files/isotope.css +64 -0
- data/fixtures/blog/index_files/jquery-ui.min.js +5 -0
- data/fixtures/blog/index_files/jquery.carouFredSel-6.2.1-packed.js +16 -0
- data/fixtures/blog/index_files/jquery.contentcarousel.js +137 -0
- data/fixtures/blog/index_files/jquery.easing.1.3.js +205 -0
- data/fixtures/blog/index_files/jquery.form.js +1121 -0
- data/fixtures/blog/index_files/jquery.hoverdir.js +220 -0
- data/fixtures/blog/index_files/jquery.inview.js +60 -0
- data/fixtures/blog/index_files/jquery.isotope.min.js +11 -0
- data/fixtures/blog/index_files/jquery.magnific-popup.js +2046 -0
- data/fixtures/blog/index_files/jquery.mb.YTPlayer.js +1041 -0
- data/fixtures/blog/index_files/jquery.min.js +5 -0
- data/fixtures/blog/index_files/jquery.nav.js +223 -0
- data/fixtures/blog/index_files/jquery.smoothwheel.js +153 -0
- data/fixtures/blog/index_files/jquery.sticky.js +129 -0
- data/fixtures/blog/index_files/jquery.superslides.js +656 -0
- data/fixtures/blog/index_files/jquery.validate.js +1231 -0
- data/fixtures/blog/index_files/jquery.vegas.css +34 -0
- data/fixtures/blog/index_files/js +201 -0
- data/fixtures/blog/index_files/loading.gif +0 -0
- data/fixtures/blog/index_files/magnific-popup.css +365 -0
- data/fixtures/blog/index_files/main.css +301 -0
- data/fixtures/blog/index_files/main.js +26 -0
- data/fixtures/blog/index_files/modernizr-2.6.2.min.js +4 -0
- data/fixtures/blog/index_files/normalize.css +533 -0
- data/fixtures/blog/index_files/ohp3fra.js +44 -0
- data/fixtures/blog/index_files/orange.css +11 -0
- data/fixtures/blog/index_files/paralax.js +525 -0
- data/fixtures/blog/index_files/paralaxNEW4.css +2730 -0
- data/fixtures/blog/index_files/plugins.js +221 -0
- data/fixtures/blog/index_files/portfolio.js +142 -0
- data/fixtures/blog/index_files/purple.css +11 -0
- data/fixtures/blog/index_files/red.css +11 -0
- data/fixtures/blog/index_files/responsive3.css +329 -0
- data/fixtures/blog/index_files/superslides.css +65 -0
- data/fixtures/blog/index_files/turquoise.css +11 -0
- data/fixtures/blog/index_files/util.js +287 -0
- data/fixtures/blog/index_files/yellow.css +11 -0
- data/lib/news_reader/article.rb +60 -0
- data/lib/news_reader/cli.rb +41 -0
- data/lib/news_reader/scraper.rb +17 -0
- data/lib/news_reader/version.rb +3 -0
- data/lib/news_reader.rb +4 -0
- data/news_reader.gemspec +40 -0
- metadata +209 -0
@@ -0,0 +1,525 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
$(document).ready(function(){
|
4
|
+
/*Validation*/
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
/* Services RollOver Info */
|
9
|
+
function loadServices(){
|
10
|
+
$(".sl-ico").mouseenter(function(){
|
11
|
+
$(this).parent().find(".s-roll").addClass('visible');
|
12
|
+
});
|
13
|
+
$(".sl-ico").mouseleave(function(){
|
14
|
+
$(this).parent().find(".s-roll").removeClass('visible');
|
15
|
+
});
|
16
|
+
}
|
17
|
+
|
18
|
+
/* Banner */
|
19
|
+
function loadTall(){
|
20
|
+
var altura = $(window).height();
|
21
|
+
$('#home').css('height',altura);
|
22
|
+
}
|
23
|
+
|
24
|
+
/* Jump Menu */
|
25
|
+
function loadJump(){
|
26
|
+
$('.jump-menu').click(function() {
|
27
|
+
if($('#nav2').hasClass('active')){
|
28
|
+
$('#nav2').removeClass('active');
|
29
|
+
}else{
|
30
|
+
$('#nav2').addClass('active');
|
31
|
+
}
|
32
|
+
})
|
33
|
+
|
34
|
+
$('#nav2 ul li a').click(function(){
|
35
|
+
$('#nav2').removeClass('active');
|
36
|
+
});
|
37
|
+
}
|
38
|
+
|
39
|
+
/* Scroll Up */
|
40
|
+
$('.scrollup').click(function(){
|
41
|
+
$("html, body").animate({ scrollTop: 0 }, 1000);
|
42
|
+
return false;
|
43
|
+
});
|
44
|
+
|
45
|
+
/* Parallax */
|
46
|
+
function Move(seccio){
|
47
|
+
$(seccio).each(function(){
|
48
|
+
if($(this).attr('class')==='parallax'){
|
49
|
+
$(this).css('background-position', '0 '+$(window).scrollTop()/3+'px');
|
50
|
+
}else{
|
51
|
+
$(this).css('background-position', '0 '+(($(window).scrollTop()+$(window).height()-$(this).attr('yPos'))/3+$(this).height())+'px');
|
52
|
+
}
|
53
|
+
});
|
54
|
+
}
|
55
|
+
|
56
|
+
/* Caroussel One Images & Two Queues */
|
57
|
+
function loadCarousel(){
|
58
|
+
|
59
|
+
/* Car One */
|
60
|
+
var amplecar = $(".caroussel-list-2 .car-img").length;
|
61
|
+
var ampleitem = $(".car-img img").width;
|
62
|
+
var amplelist = amplecar*ampleitem;
|
63
|
+
$('.caroussel-list-2').css('width','amplelist')
|
64
|
+
|
65
|
+
var itemscar=$('.caroussel-list-2 .car-img').length;
|
66
|
+
ampleitem=$('.caroussel-2').width();
|
67
|
+
amplelist = itemscar*ampleitem;
|
68
|
+
$('.caroussel-list-2').css('width', amplelist)
|
69
|
+
//alert(amplelist);
|
70
|
+
|
71
|
+
var fragment = document.createDocumentFragment(),
|
72
|
+
li = document.createElement('li');
|
73
|
+
while (itemscar--) {
|
74
|
+
fragment.appendChild(li.cloneNode(true));
|
75
|
+
}
|
76
|
+
$('.controller-2 ul').append(fragment);
|
77
|
+
|
78
|
+
var index = 0;
|
79
|
+
var pos = 1;
|
80
|
+
$('.controller-2 ul li:first-child').addClass('selected');
|
81
|
+
|
82
|
+
$(".controller-2 ul li").click(function(){
|
83
|
+
ampleitem=$('.caroussel-2').width();
|
84
|
+
index = $(this).index();
|
85
|
+
$(".caroussel-2").stop().animate({scrollLeft:ampleitem*index},'slow');
|
86
|
+
$('.controller-2 ul li').removeClass('selected');
|
87
|
+
$(this).addClass('selected');
|
88
|
+
//alert(ampleitem);
|
89
|
+
});
|
90
|
+
$(".car-next").click(function(){
|
91
|
+
if( index != $(".controller-2 ul li").size()-1){
|
92
|
+
index++;
|
93
|
+
$(".caroussel-2").stop().animate({scrollLeft:ampleitem*index},'slow');
|
94
|
+
pos++;
|
95
|
+
$('.controller-2 ul li.selected').removeClass('selected').next().addClass('selected');
|
96
|
+
}
|
97
|
+
});
|
98
|
+
$(".car-prev").click(function(){
|
99
|
+
if( index!=0 ){
|
100
|
+
index--;
|
101
|
+
$(".caroussel-2").stop().animate({scrollLeft:ampleitem*index},'slow');
|
102
|
+
pos--;
|
103
|
+
$('.controller-2 ul li.selected').removeClass('selected').prev().addClass('selected');
|
104
|
+
}
|
105
|
+
});
|
106
|
+
|
107
|
+
/* Car Two */
|
108
|
+
var amplecar2 = $(".caroussel-list-2 .car-quote").length;
|
109
|
+
var ampleitem2 = $(".car-quote").width;
|
110
|
+
var amplelist2 = amplecar2*ampleitem2;
|
111
|
+
//alert(amplelist2);
|
112
|
+
$('.caroussel-list-2').css('width','amplelist2')
|
113
|
+
|
114
|
+
|
115
|
+
function bullets2(){
|
116
|
+
var itemscar2=$('.caroussel-list-2 .car-quote').length;
|
117
|
+
ampleitem2=$('.caroussel-2').width();
|
118
|
+
amplelist2 = itemscar2*ampleitem2;
|
119
|
+
$('.caroussel-list-2').css('width', amplelist2)
|
120
|
+
//alert(amplelist);
|
121
|
+
|
122
|
+
var fragment = document.createDocumentFragment(),
|
123
|
+
li = document.createElement('li');
|
124
|
+
while (itemscar2--) {
|
125
|
+
fragment.appendChild(li.cloneNode(true));
|
126
|
+
}
|
127
|
+
$('.controller-2 ul').append(fragment);
|
128
|
+
}
|
129
|
+
bullets2();
|
130
|
+
|
131
|
+
var index2 = 0;
|
132
|
+
var pos2 = 1;
|
133
|
+
$('.controller-2 ul li:first-child').addClass('selected');
|
134
|
+
|
135
|
+
$(".controller-2 ul li").click(function(){
|
136
|
+
ampleitem2=$('.caroussel-2').width();
|
137
|
+
index2 = $(this).index();
|
138
|
+
$(".caroussel-2").stop().animate({scrollLeft:ampleitem2*index2},'slow');
|
139
|
+
$('.controller-2 ul li').removeClass('selected');
|
140
|
+
$(this).addClass('selected');
|
141
|
+
//alert(ampleitem);
|
142
|
+
});
|
143
|
+
$(".car-next-2").click(function(){
|
144
|
+
if( index2 != $(".controller-2 ul li").size()-1){
|
145
|
+
index2++;
|
146
|
+
$(".caroussel-2").stop().animate({scrollLeft:ampleitem2*index2},'slow');
|
147
|
+
pos2++;
|
148
|
+
$('.controller-2 ul li.selected').removeClass('selected').next().addClass('selected');
|
149
|
+
}
|
150
|
+
});
|
151
|
+
$(".car-prev-2").click(function(){
|
152
|
+
if( index2!=0 ){
|
153
|
+
index2--;
|
154
|
+
$(".caroussel-2").stop().animate({scrollLeft:ampleitem2*index2},'slow');
|
155
|
+
pos2--;
|
156
|
+
$('.controller-2 ul li.selected').removeClass('selected').prev().addClass('selected');
|
157
|
+
}
|
158
|
+
});
|
159
|
+
}
|
160
|
+
|
161
|
+
/* Arrow Animations */
|
162
|
+
function loadArrows(){
|
163
|
+
var fletxa=false;
|
164
|
+
/* Car One */
|
165
|
+
$('.car-prev').stop().animate({left:'-45px',opacity:'0'},"fast");
|
166
|
+
$('.car-next').stop().animate({right:'-45px',opacity:'0'},"fast");
|
167
|
+
$(".car-show-1 .show").mouseenter(function(){
|
168
|
+
$('.car-prev').stop().animate({left:'-40px',opacity:'1'},"fast");
|
169
|
+
$('.car-next').stop().animate({right:'-40px',opacity:'1'},"fast");
|
170
|
+
}).mouseleave(function(){
|
171
|
+
$('.car-prev').stop().animate({left:'-45px',opacity:'0'},"fast");
|
172
|
+
$('.car-next').stop().animate({right:'-45px',opacity:'0'},"fast");
|
173
|
+
});
|
174
|
+
/* Car Two */
|
175
|
+
$('.car-prev-2').stop().animate({left:'-45px',opacity:'0'},"fast");
|
176
|
+
$('.car-next-2').stop().animate({right:'-45px',opacity:'0'},"fast");
|
177
|
+
$(".car-show-2").mouseenter(function(){
|
178
|
+
$('.car-prev-2').stop().animate({left:'-40px',opacity:'1'},"fast");
|
179
|
+
$('.car-next-2').stop().animate({right:'-40px',opacity:'1'},"fast");
|
180
|
+
}).mouseleave(function(){
|
181
|
+
$('.car-prev-2').stop().animate({left:'-45px',opacity:'0'},"fast");
|
182
|
+
$('.car-next-2').stop().animate({right:'-45px',opacity:'0'},"fast");
|
183
|
+
});
|
184
|
+
}
|
185
|
+
|
186
|
+
/* Counter */
|
187
|
+
$.fn.countTo = function(options) {
|
188
|
+
// merge the default plugin settings with the custom options
|
189
|
+
options = $.extend({}, $.fn.countTo.defaults, options || {});
|
190
|
+
|
191
|
+
// how many times to update the value, and how much to increment the value on each update
|
192
|
+
var loops = Math.ceil(options.speed / options.refreshInterval),
|
193
|
+
increment = (options.to - options.from) / loops;
|
194
|
+
|
195
|
+
return $(this).each(function() {
|
196
|
+
var _this = this,
|
197
|
+
loopCount = 0,
|
198
|
+
value = options.from,
|
199
|
+
interval = setInterval(updateTimer, options.refreshInterval);
|
200
|
+
|
201
|
+
function updateTimer() {
|
202
|
+
value += increment;
|
203
|
+
loopCount++;
|
204
|
+
$(_this).html(value.toFixed(options.decimals));
|
205
|
+
|
206
|
+
if (typeof(options.onUpdate) == 'function') {
|
207
|
+
options.onUpdate.call(_this, value);
|
208
|
+
}
|
209
|
+
|
210
|
+
if (loopCount >= loops) {
|
211
|
+
clearInterval(interval);
|
212
|
+
value = options.to;
|
213
|
+
|
214
|
+
if (typeof(options.onComplete) == 'function') {
|
215
|
+
options.onComplete.call(_this, value);
|
216
|
+
}
|
217
|
+
}
|
218
|
+
}
|
219
|
+
})
|
220
|
+
};
|
221
|
+
|
222
|
+
/* Portfolio HoverDir Roll-Over */
|
223
|
+
function mosaicInit() {
|
224
|
+
$('.mosaic').mixitup({
|
225
|
+
targetSelector: '.mosaic__item',
|
226
|
+
filterSelector: '.mosaic__filter-item',
|
227
|
+
effects: ['fade','scale'],
|
228
|
+
easing: 'snap',
|
229
|
+
transitionSpeed: 850,
|
230
|
+
});
|
231
|
+
$('.mosaic__item .image_item-meta--portfolio .image_item-table').each(function() {
|
232
|
+
$(this).hoverdir();
|
233
|
+
});
|
234
|
+
}
|
235
|
+
|
236
|
+
/* Slider AutoChanging Title */
|
237
|
+
function loadTitleAnimated(){
|
238
|
+
var myInterval;
|
239
|
+
var contador = 1;
|
240
|
+
var myFunc = function() {
|
241
|
+
var cur = $('.main-title ul li').length;
|
242
|
+
//alert(contador);
|
243
|
+
if(cur == contador) {;
|
244
|
+
$('.main-title ul li.t-current').removeClass('t-current');
|
245
|
+
$('.main-title ul li').first().addClass('t-current');
|
246
|
+
contador = 1;
|
247
|
+
} else {
|
248
|
+
contador++;
|
249
|
+
$('.main-title ul li.t-current').removeClass('t-current').next().addClass('t-current');
|
250
|
+
}
|
251
|
+
};
|
252
|
+
myInterval = setInterval(myFunc, 5000); // Set Animation Interval in Miliseconds
|
253
|
+
}
|
254
|
+
|
255
|
+
/* Main Menu Section Selector */
|
256
|
+
function loadMenuSelector(){
|
257
|
+
$('#nav').onePageNav({
|
258
|
+
begin: function() {
|
259
|
+
console.log('start');
|
260
|
+
},
|
261
|
+
end: function() {
|
262
|
+
console.log('stop');
|
263
|
+
},
|
264
|
+
scrollOffset: 75 // header Height
|
265
|
+
});
|
266
|
+
}
|
267
|
+
|
268
|
+
|
269
|
+
/* Small Funtions */
|
270
|
+
function loadSmall(){
|
271
|
+
|
272
|
+
/* Portfolio Animate Show Project */
|
273
|
+
/*$('.ch-grid').click(function() {
|
274
|
+
$("html, body").animate({ scrollTop: $('#project-show').offset().top }, 1000);
|
275
|
+
});*/
|
276
|
+
|
277
|
+
/* Call LightBox Featured Works */
|
278
|
+
$('.image-link').magnificPopup({type:'image'});
|
279
|
+
$('.ca-wrapper').magnificPopup({
|
280
|
+
delegate: 'a', // child items selector, by clicking on it popup will open
|
281
|
+
type: 'image',
|
282
|
+
// other options
|
283
|
+
gallery:{
|
284
|
+
enabled:true
|
285
|
+
}
|
286
|
+
});
|
287
|
+
}
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
/* Isotope/ Portfolio Filter PlugIn */
|
292
|
+
var container = $('#i-portfolio');
|
293
|
+
container.isotope({
|
294
|
+
animationEngine : 'best-available',
|
295
|
+
animationOptions: {
|
296
|
+
duration: 200,
|
297
|
+
queue: false
|
298
|
+
},
|
299
|
+
layoutMode: 'fitRows'
|
300
|
+
});
|
301
|
+
// filter items when filter link is clicked
|
302
|
+
$('#filters a').click(function(){
|
303
|
+
$('#filters a').removeClass('active');
|
304
|
+
$(this).addClass('active');
|
305
|
+
var selector = $(this).attr('data-option-value');
|
306
|
+
container.isotope({ filter: selector });
|
307
|
+
setProjects();
|
308
|
+
return false;
|
309
|
+
});
|
310
|
+
|
311
|
+
function splitColumns() {
|
312
|
+
var winWidth = $(window).width(),
|
313
|
+
columnNumb = 1;
|
314
|
+
if (winWidth > 1200) {
|
315
|
+
columnNumb = 4;
|
316
|
+
} else if (winWidth > 600) {
|
317
|
+
columnNumb = 2;
|
318
|
+
} else if (winWidth > 300) {
|
319
|
+
columnNumb = 1;
|
320
|
+
}
|
321
|
+
return columnNumb;
|
322
|
+
}
|
323
|
+
|
324
|
+
function setColumns() {
|
325
|
+
var winWidth = $(window).width(),
|
326
|
+
columnNumb = splitColumns(),
|
327
|
+
postWidth = Math.floor(winWidth / columnNumb);
|
328
|
+
container.find('.element').each(function () {
|
329
|
+
$(this).css( {
|
330
|
+
width : postWidth + 'px'
|
331
|
+
});
|
332
|
+
|
333
|
+
var marhei = ($(this).find('div').height()/2)-49;
|
334
|
+
|
335
|
+
$(this).find('div > span').css( {
|
336
|
+
margin : marhei+'px 20px'
|
337
|
+
});
|
338
|
+
|
339
|
+
});
|
340
|
+
}
|
341
|
+
function setProjects() {
|
342
|
+
setColumns();
|
343
|
+
container.isotope('reLayout');
|
344
|
+
}
|
345
|
+
|
346
|
+
function loadIsotope(){
|
347
|
+
container.imagesLoaded(function () {setProjects();});
|
348
|
+
setProjects();
|
349
|
+
}
|
350
|
+
|
351
|
+
/* Call HoverDir Portfolio RollOver */
|
352
|
+
function loadHoverDir(){
|
353
|
+
$(' #i-portfolio > .ch-grid ').each( function() { $(this).hoverdir({
|
354
|
+
hoverDelay : 5
|
355
|
+
}); } );
|
356
|
+
}
|
357
|
+
|
358
|
+
/* Logos/Company Carousel */
|
359
|
+
function loadLogos(){
|
360
|
+
$('#logos').carouFredSel({
|
361
|
+
responsive: true,
|
362
|
+
width: '100%',
|
363
|
+
scroll: 1,
|
364
|
+
items: {
|
365
|
+
width: 400,
|
366
|
+
// height: '30%', // optionally resize item-height
|
367
|
+
visible: {
|
368
|
+
min: 1,
|
369
|
+
max: 6
|
370
|
+
}
|
371
|
+
}
|
372
|
+
});
|
373
|
+
}
|
374
|
+
|
375
|
+
/* Call Featured Carousel Container */
|
376
|
+
function loadContentCarousel(){
|
377
|
+
$('#ca-container').contentcarousel();
|
378
|
+
}
|
379
|
+
|
380
|
+
|
381
|
+
////////////////////////////////////////////
|
382
|
+
|
383
|
+
/* Scroll */
|
384
|
+
$(window).bind("scroll", function(){//when the user is scrolling...
|
385
|
+
|
386
|
+
/* Parallax */
|
387
|
+
Move('.paraOn'); //move the background images in relation to the movement of the scrollbar
|
388
|
+
|
389
|
+
/* Scroll Top Btn */
|
390
|
+
if ($(this).scrollTop() > $(window).height()-1) {
|
391
|
+
$('.scrollup').fadeIn();
|
392
|
+
} else {
|
393
|
+
$('.scrollup').fadeOut();
|
394
|
+
}
|
395
|
+
});
|
396
|
+
|
397
|
+
/* Resize */
|
398
|
+
function resizedw(){
|
399
|
+
// Haven't resized in 500ms!
|
400
|
+
setProjects();
|
401
|
+
loadTall();
|
402
|
+
}
|
403
|
+
|
404
|
+
var doit;
|
405
|
+
$(window).bind('resize', function () {
|
406
|
+
clearTimeout(doit);
|
407
|
+
doit = setTimeout(resizedw, 1000);
|
408
|
+
});
|
409
|
+
function loadsuperslides(){
|
410
|
+
$('#slides-1').superslides({
|
411
|
+
hashchange: false,
|
412
|
+
animation: 'fade',
|
413
|
+
play: 10000,
|
414
|
+
pagination: false
|
415
|
+
});
|
416
|
+
}
|
417
|
+
|
418
|
+
function loadbxSlider(){
|
419
|
+
$('.bxslider').bxSlider();
|
420
|
+
}
|
421
|
+
|
422
|
+
/* Inview */
|
423
|
+
function loadInview(){
|
424
|
+
/* Parallax */
|
425
|
+
$('.parallax').bind('inview', function (event, visible) {
|
426
|
+
if (visible === true) {
|
427
|
+
// element is now visible in the viewport
|
428
|
+
var offset = $(this).offset();
|
429
|
+
$(this).addClass('paraOn').attr('yPos',offset.top);
|
430
|
+
} else {
|
431
|
+
// element has gone out of viewport
|
432
|
+
$(this).removeClass('paraOn');
|
433
|
+
}
|
434
|
+
});
|
435
|
+
|
436
|
+
/* Fade In Elements */
|
437
|
+
$('.hideme').bind('inview', function (event, visible) {
|
438
|
+
if (visible === true) {
|
439
|
+
var offset = $(this).offset();
|
440
|
+
$(this).removeClass('hideme');
|
441
|
+
}
|
442
|
+
});
|
443
|
+
$('.p-image-02').bind('inview', function (event, visible) {
|
444
|
+
if (visible === true) {
|
445
|
+
$('.dontHide').removeClass('hideme-slide');
|
446
|
+
}
|
447
|
+
});
|
448
|
+
|
449
|
+
$('.newtr').bind('inview', function (event, visible) {
|
450
|
+
if (visible === true) {
|
451
|
+
$('.dontHide').removeClass('hideme-slide2');
|
452
|
+
}
|
453
|
+
});
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
/* Facts Counter */
|
458
|
+
var count=0;
|
459
|
+
var dataperc;
|
460
|
+
|
461
|
+
//mobile counter
|
462
|
+
|
463
|
+
$('.milestone-counter').bind('inview', function (event, visible) {
|
464
|
+
if (visible === true & count===0) {
|
465
|
+
// element is now visible in the viewport
|
466
|
+
count++;
|
467
|
+
$('.milestone-counter').each(function(){
|
468
|
+
dataperc = $(this).attr('data-perc'),
|
469
|
+
$(this).find('.milestone-count').delay(6000).countTo({
|
470
|
+
from: 0,
|
471
|
+
to: dataperc,
|
472
|
+
speed: 2500,
|
473
|
+
refreshInterval: 80
|
474
|
+
});
|
475
|
+
});
|
476
|
+
} else {
|
477
|
+
// element has gone out of viewport
|
478
|
+
}
|
479
|
+
});
|
480
|
+
|
481
|
+
/* Skills Animation */
|
482
|
+
var value;
|
483
|
+
$('.skill-in').bind('inview', function (event, visible) {
|
484
|
+
if (visible === true) {
|
485
|
+
// element is now visible in the viewport
|
486
|
+
$(this).each(function(){
|
487
|
+
value = $(this).attr('title');
|
488
|
+
$(this).animate({ "width": value+'%' }, 2000);
|
489
|
+
});
|
490
|
+
}
|
491
|
+
});
|
492
|
+
}
|
493
|
+
|
494
|
+
/* Load Functions */
|
495
|
+
loadServices();
|
496
|
+
//loadTall();
|
497
|
+
loadJump();
|
498
|
+
|
499
|
+
if($(window).width()>974){
|
500
|
+
loadInview();
|
501
|
+
}else{
|
502
|
+
$('.milestone-count.highlight').each(function(){
|
503
|
+
$(this).html($(this).parent().attr('data-perc'))
|
504
|
+
})
|
505
|
+
|
506
|
+
|
507
|
+
var value;
|
508
|
+
$('.skill-in').each(function(){
|
509
|
+
value = $(this).attr('title');
|
510
|
+
$(this).css("width", value+'%');
|
511
|
+
});
|
512
|
+
}
|
513
|
+
|
514
|
+
loadCarousel();
|
515
|
+
loadArrows();
|
516
|
+
loadSmall();
|
517
|
+
loadTitleAnimated();
|
518
|
+
loadMenuSelector();
|
519
|
+
loadIsotope();
|
520
|
+
loadHoverDir();
|
521
|
+
loadLogos();
|
522
|
+
loadContentCarousel();
|
523
|
+
//loadbxSlider();
|
524
|
+
loadsuperslides();
|
525
|
+
});
|