-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbehavior.js
62 lines (54 loc) · 1.56 KB
/
behavior.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
// Generated by CoffeeScript 1.4.0
(function() {
var CAN_FLIP, contact_el, flip_el, initPigeonFarm, wwu_button;
if ($.browser.mozilla) {
$('#projects td').css({
opacity: 1
});
}
CAN_FLIP = (typeof Modernizr !== "undefined" && Modernizr !== null ? Modernizr.csstransforms3d : void 0) && Modernizr.csstransitions;
flip_el = $('#flip-container');
wwu_button = $('#work-with-us');
contact_el = $('#contact');
initPigeonFarm = function() {
var cancel_button;
contact_el.empty();
PigeonFarm({
server: 'http://pigeon-farm.appspot.com',
site: 'typeish.net',
key: '0f2eb1ac-c719-4bee-92bd-85c784220256',
container: '#contact',
email_label: '',
subject_label: ''
});
$('#pf-contact-subject').val('Message from typeish.net');
$('#pf-contact-body').attr({
placeholder: 'your message'
});
cancel_button = $('<button id="cancel-contact">cancel</button>');
$('#contact').append(cancel_button);
return cancel_button.click(function() {
flip_el.removeClass('flip').removeClass('show');
if (!CAN_FLIP) {
contact_el.hide();
}
return initPigeonFarm();
});
};
$(document).ready(function() {
if (CAN_FLIP) {
wwu_button.click(function() {
return flip_el.addClass('flip');
});
} else {
wwu_button.click(function() {
flip_el.addClass('show');
return contact_el.show();
});
contact_el.hide();
}
initPigeonFarm();
wwu_button.show();
return window['scrollTo'](0, 1);
});
}).call(this);