-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.js
67 lines (59 loc) · 1.29 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
$(function() {
!location.hash && setTimeout(function () {
if (!window.pageYOffset) window.scrollTo(0, 1);
}, 500);
if ($("#gallery").length) {
$("#gallery li a").attr('rel', 'gallery').fancybox({
openEffect: 'none',
closeEffect: 'none',
nextEffect: 'none',
prevEffect: 'none',
openSpeed: 0,
closeSpeed: 0,
nextSpeed: 0,
prevSpeed: 0,
helpers: {
overlay: {
speedOut: 0
},
title: null
}
});
}
if ($("#vidfeat").length) {
$(".feature, .inset").fitVids();
var iframe = $('#vidfeat')[0],
player = $f(iframe),
ready;
player.addEvent('ready', function() {
player.addEvent('play', function(data) {
$("#video_thumb").hide();
$("#vidfeat").parent().show();
});
if (ready === false) {
player.api('play');
}
ready = true;
});
$('#video_thumb').click(function() {
if (ready) {
player.api('play');
} else {
ready = false;
$("#video_thumb").hide();
$("#vidfeat").parent().show();
}
});
}
if ($(".flexslider").length && $(".flexslider .slides li").length > 1) {
$(".flexslider").flexslider({
animationSpeed: 250,
slideshowSpeed: 5000,
controlNav: false,
directionNav: false,
touch: false
});
} else if ($(".flexslider").length) {
$(".flexslider .slides li").show();
}
});