/
public.js
82 lines (80 loc) · 1.97 KB
/
public.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
(function() {
$(function() {
var jRes, stickyPanelOptions;
$('.modal-btn').click(function(e) {
var modal;
e.preventDefault();
modal = $(this).attr('href');
return $(modal).modal('show');
});
if (!("placeholder" in document.createElement("input"))) {
$("input[placeholder]").each(function() {
var val;
val = $(this).attr("placeholder");
if (this.value === "") {
this.value = val;
}
return $(this).focus(function() {
if (this.value === val) {
return this.value = "";
}
}).blur(function() {
if ($.trim(this.value) === "") {
return this.value = val;
}
});
});
}
$("form").submit(function() {
return $(this).find("input[placeholder]").each(function() {
if (this.value === $(this).attr("placeholder")) {
return this.value = "";
}
});
});
stickyPanelOptions = {
afterDetachCSSClass: "attached",
savePanelSpace: true
};
$(".navbar").stickyPanel(stickyPanelOptions);
jRes = jRespond([
{
label: "handheld",
enter: 0,
exit: 767
}, {
label: "tablet",
enter: 768,
exit: 10000
}
]);
jRes.addFunc({
breakpoint: "handheld",
enter: function() {
$('.content-block h2').fitText(1.1);
return $('.modal-btn').unbind();
}
});
jRes.addFunc({
breakpoint: "tablet",
enter: function() {
$('.modal-btn').click(function(e) {
var modal;
modal = $(this).attr('href');
return $(modal).modal('show');
});
return $("body").pageScroller({
navigation: ".nav",
scrollOffset: -80
});
}
});
$('.header-content h1').fitText(.71);
return $(".footable").footable({
breakpoints: {
phone: 320,
tablet: 767
}
});
});
}).call(this);