common.js
3.04 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/* common */
$(document).ready(function() {
if($('.mask').length>0) {
$(".mask").mask("8 (999) 999-99-99");
}
//$('input, select').styler();
var ff;
$('input[type=text]').focus(function() {
if($(this).attr('data-place')==$(this).val()) {
$(this).val('');
}
$(this).addClass('ac');
});
$('input[type=text]').blur(function() {
if($(this).val()=='') {
$(this).val($(this).attr('data-place'));
}
$(this).removeClass('ac');
});
$('textarea').focus(function() {
if($(this).attr('data-place')==$(this).val()) {
$(this).val('');
}
$(this).addClass('ac');
});
$('textarea').blur(function() {
ff=$(this).attr('data-place');
if($(this).val().length==0) {
$(this).val(ff);
}
$(this).removeClass('ac');
});
function ress() {
$('.sl-con').width($('.ct').width()+30);
if($(window).width()<651) {
$('.sl-con').width($('.ct').width()+16);
}
else if($(window).width()<961) {
$('.sl-con').width($('.ct').width()+24);
}
}
ress();
$(window).resize(function() {
ress();
});
$(window).load(function() {
ress();
});
$(window).load(function() {
$('input[type=text]').each(function() {
$(this).attr('data-place',$(this).val());
});
$('textarea').each(function() {
$(this).attr('data-place',$(this).val());
});
});
$('.sl1').slick({
arrows: false,
slidesToShow: 4,
draggable: false,
responsive: [
{
breakpoint: 652,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
draggable: true,
dots: true,
adaptiveHeight: true
}
}
]
});
$('.sl2').slick({
arrows: false,
dots: true,
adaptiveHeight: true
});
$('.sl3').slick({
arrows: false,
dots: true,
adaptiveHeight: true
});
$('.sl-con .item-poss a').fancybox({
helpers : {
overlay: {
locked: false
},
media : {},
buttons : {}
}
});
function test1() {
var mac = navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i) ? true : false;
if(mac){
$('.ord1,.ord2,.ord3,.form1 input[type=submit]').addClass('ac');
}
}
test1();
});
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: '100%',
width: '100%',
videoId: $('#player').attr('dt'),
events: {
'onReady': function() {
player.playVideo();
player.stopVideo();
}
}
});
}
$('.play1 span').click(function(e) {
e.preventDefault();
$(this).parent().fadeOut(200);
player.playVideo();
});
var overlay = $('#overlay');
$(overlay).click(function () {
closemodal('callback');
closemodal('bid');
});
$('.ord1').click(function(e){
e.preventDefault();
callmodal('callback');
});
$('.ord2, .ord3').click(function(e){
e.preventDefault();
callmodal('bid');
});
function callmodal(id){
overlay.removeClass('hidden');
// $('#'+id).css({
// 'top' :
// })
$('#'+id).removeClass('hidden');
}
function closemodal(id){
overlay.addClass('hidden');
$('#'+id).addClass('hidden');
}