summaryrefslogtreecommitdiff
path: root/public/assets/js/app.js
blob: dd2a7e1fcc3920191ac7436c31c5bcac8bf00b51 (plain)
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
var is_iphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i));
var is_ipad = (navigator.userAgent.match(/iPad/i));
var is_android = (navigator.userAgent.match(/Android/i))
var is_mobile = is_iphone || is_ipad || is_android;
$(function() {
    if (is_mobile) {
        $("html").addClass("mobile");
    } else {
        $("html").addClass("desktop");
    }
});

$(".cell").css({ 'height': ($(".top").height() + 'px') });

$(window).resize(function() {
    $(".cell").css({ 'height': ($(".top").height() + 'px') });
});

$('.top').flickity({
    cellAlign: 'left',
    contain: true,
    pageDots: false,
    wrapAround: true,
    arrowShape: {
        x0: 10,
        x1: 35,
        y1: 25,
        x2: 40,
        y2: 25,
        x3: 15
    }
});

$('.index').click(function() {
    $('body').toggleClass('navopen');
});

$('.item').click(function() {
    $('body').removeClass('navopen');
});