Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Тимофей Семененко
/
shold.dev5.ashmanov.com
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e4cc30fb
authored
Oct 11, 2017
by
Semenenko Timofey
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Полсдений пулл правок для keyup
1 parent
3153d33e
Pipeline
#3087
for
e4cc30fb
skipped
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
289 additions
and
280 deletions
js/index.js
local/templates/main/footer.php
js/index.js
View file @
e4cc30f
...
...
@@ -2,70 +2,73 @@
},
this
),
"play.owl.autoplay"
:
a
.
proxy
(
function
(
a
,
b
,
c
){
this
.
play
(
b
,
c
)},
this
),
"stop.owl.autoplay"
:
a
.
proxy
(
function
(){
this
.
stop
()},
this
),
"mouseover.owl.autoplay"
:
a
.
proxy
(
function
(){
this
.
core
.
settings
.
autoplayHoverPause
&&
this
.
pause
()},
this
),
"mouseleave.owl.autoplay"
:
a
.
proxy
(
function
(){
this
.
core
.
settings
.
autoplayHoverPause
&&
this
.
autoplay
()},
this
)},
this
.
core
.
$element
.
on
(
this
.
handlers
)};
d
.
Defaults
=
{
autoplay
:
!
1
,
autoplayTimeout
:
5
e3
,
autoplayHoverPause
:
!
1
,
autoplaySpeed
:
!
1
},
d
.
prototype
.
autoplay
=
function
(){
this
.
core
.
settings
.
autoplay
&&!
this
.
core
.
state
.
videoPlay
?(
b
.
clearInterval
(
this
.
interval
),
this
.
interval
=
b
.
setInterval
(
a
.
proxy
(
function
(){
this
.
play
()},
this
),
this
.
core
.
settings
.
autoplayTimeout
)):
b
.
clearInterval
(
this
.
interval
)},
d
.
prototype
.
play
=
function
(){
return
c
.
hidden
===!
0
||
this
.
core
.
state
.
isTouch
||
this
.
core
.
state
.
isScrolling
||
this
.
core
.
state
.
isSwiping
||
this
.
core
.
state
.
inMotion
?
void
0
:
this
.
core
.
settings
.
autoplay
===!
1
?
void
b
.
clearInterval
(
this
.
interval
):
void
this
.
core
.
next
(
this
.
core
.
settings
.
autoplaySpeed
)},
d
.
prototype
.
stop
=
function
(){
b
.
clearInterval
(
this
.
interval
)},
d
.
prototype
.
pause
=
function
(){
b
.
clearInterval
(
this
.
interval
)},
d
.
prototype
.
destroy
=
function
(){
var
a
,
c
;
b
.
clearInterval
(
this
.
interval
);
for
(
a
in
this
.
handlers
)
this
.
core
.
$element
.
off
(
a
,
this
.
handlers
[
a
]);
for
(
c
in
Object
.
getOwnPropertyNames
(
this
))
"function"
!=
typeof
this
[
c
]
&&
(
this
[
c
]
=
null
)},
a
.
fn
.
owlCarousel
.
Constructor
.
Plugins
.
autoplay
=
d
}(
window
.
Zepto
||
window
.
jQuery
,
window
,
document
),
function
(
a
){
"use strict"
;
var
b
=
function
(
c
){
this
.
_core
=
c
,
this
.
_initialized
=!
1
,
this
.
_pages
=
[],
this
.
_controls
=
{},
this
.
_templates
=
[],
this
.
$element
=
this
.
_core
.
$element
,
this
.
_overrides
=
{
next
:
this
.
_core
.
next
,
prev
:
this
.
_core
.
prev
,
to
:
this
.
_core
.
to
},
this
.
_handlers
=
{
"prepared.owl.carousel"
:
a
.
proxy
(
function
(
b
){
this
.
_core
.
settings
.
dotsData
&&
this
.
_templates
.
push
(
a
(
b
.
content
).
find
(
"[data-dot]"
).
andSelf
(
"[data-dot]"
).
attr
(
"data-dot"
))},
this
),
"add.owl.carousel"
:
a
.
proxy
(
function
(
b
){
this
.
_core
.
settings
.
dotsData
&&
this
.
_templates
.
splice
(
b
.
position
,
0
,
a
(
b
.
content
).
find
(
"[data-dot]"
).
andSelf
(
"[data-dot]"
).
attr
(
"data-dot"
))},
this
),
"remove.owl.carousel prepared.owl.carousel"
:
a
.
proxy
(
function
(
a
){
this
.
_core
.
settings
.
dotsData
&&
this
.
_templates
.
splice
(
a
.
position
,
1
)},
this
),
"change.owl.carousel"
:
a
.
proxy
(
function
(
a
){
if
(
"position"
==
a
.
property
.
name
&&!
this
.
_core
.
state
.
revert
&&!
this
.
_core
.
settings
.
loop
&&
this
.
_core
.
settings
.
navRewind
){
var
b
=
this
.
_core
.
current
(),
c
=
this
.
_core
.
maximum
(),
d
=
this
.
_core
.
minimum
();
a
.
data
=
a
.
property
.
value
>
c
?
b
>=
c
?
d
:
c
:
a
.
property
.
value
<
d
?
c
:
a
.
property
.
value
}},
this
),
"changed.owl.carousel"
:
a
.
proxy
(
function
(
a
){
"position"
==
a
.
property
.
name
&&
this
.
draw
()},
this
),
"refreshed.owl.carousel"
:
a
.
proxy
(
function
(){
this
.
_initialized
||
(
this
.
initialize
(),
this
.
_initialized
=!
0
),
this
.
_core
.
trigger
(
"refresh"
,
null
,
"navigation"
),
this
.
update
(),
this
.
draw
(),
this
.
_core
.
trigger
(
"refreshed"
,
null
,
"navigation"
)},
this
)},
this
.
_core
.
options
=
a
.
extend
({},
b
.
Defaults
,
this
.
_core
.
options
),
this
.
$element
.
on
(
this
.
_handlers
)};
b
.
Defaults
=
{
nav
:
!
1
,
navRewind
:
!
0
,
navText
:[
"prev"
,
"next"
],
navSpeed
:
!
1
,
navElement
:
"div"
,
navContainer
:
!
1
,
navContainerClass
:
"owl-nav"
,
navClass
:[
"owl-prev"
,
"owl-next"
],
slideBy
:
1
,
dotClass
:
"owl-dot"
,
dotsClass
:
"owl-dots"
,
dots
:
!
0
,
dotsEach
:
!
1
,
dotData
:
!
1
,
dotsSpeed
:
!
1
,
dotsContainer
:
!
1
,
controlsClass
:
"owl-controls"
},
b
.
prototype
.
initialize
=
function
(){
var
b
,
c
,
d
=
this
.
_core
.
settings
;
d
.
dotsData
||
(
this
.
_templates
=
[
a
(
"<div>"
).
addClass
(
d
.
dotClass
).
append
(
a
(
"<span>"
)).
prop
(
"outerHTML"
)]),
d
.
navContainer
&&
d
.
dotsContainer
||
(
this
.
_controls
.
$container
=
a
(
"<div>"
).
addClass
(
d
.
controlsClass
).
appendTo
(
this
.
$element
)),
this
.
_controls
.
$indicators
=
d
.
dotsContainer
?
a
(
d
.
dotsContainer
):
a
(
"<div>"
).
hide
().
addClass
(
d
.
dotsClass
).
appendTo
(
this
.
_controls
.
$container
),
this
.
_controls
.
$indicators
.
on
(
"click"
,
"div"
,
a
.
proxy
(
function
(
b
){
var
c
=
a
(
b
.
target
).
parent
().
is
(
this
.
_controls
.
$indicators
)?
a
(
b
.
target
).
index
():
a
(
b
.
target
).
parent
().
index
();
b
.
preventDefault
(),
this
.
to
(
c
,
d
.
dotsSpeed
)},
this
)),
b
=
d
.
navContainer
?
a
(
d
.
navContainer
):
a
(
"<div>"
).
addClass
(
d
.
navContainerClass
).
prependTo
(
this
.
_controls
.
$container
),
this
.
_controls
.
$next
=
a
(
"<"
+
d
.
navElement
+
">"
),
this
.
_controls
.
$previous
=
this
.
_controls
.
$next
.
clone
(),
this
.
_controls
.
$previous
.
addClass
(
d
.
navClass
[
0
]).
html
(
d
.
navText
[
0
]).
hide
().
prependTo
(
b
).
on
(
"click"
,
a
.
proxy
(
function
(){
this
.
prev
(
d
.
navSpeed
)},
this
)),
this
.
_controls
.
$next
.
addClass
(
d
.
navClass
[
1
]).
html
(
d
.
navText
[
1
]).
hide
().
appendTo
(
b
).
on
(
"click"
,
a
.
proxy
(
function
(){
this
.
next
(
d
.
navSpeed
)},
this
));
for
(
c
in
this
.
_overrides
)
this
.
_core
[
c
]
=
a
.
proxy
(
this
[
c
],
this
)},
b
.
prototype
.
destroy
=
function
(){
var
a
,
b
,
c
,
d
;
for
(
a
in
this
.
_handlers
)
this
.
$element
.
off
(
a
,
this
.
_handlers
[
a
]);
for
(
b
in
this
.
_controls
)
this
.
_controls
[
b
].
remove
();
for
(
d
in
this
.
overides
)
this
.
_core
[
d
]
=
this
.
_overrides
[
d
];
for
(
c
in
Object
.
getOwnPropertyNames
(
this
))
"function"
!=
typeof
this
[
c
]
&&
(
this
[
c
]
=
null
)},
b
.
prototype
.
update
=
function
(){
var
a
,
b
,
c
,
d
=
this
.
_core
.
settings
,
e
=
this
.
_core
.
clones
().
length
/
2
,
f
=
e
+
this
.
_core
.
items
().
length
,
g
=
d
.
center
||
d
.
autoWidth
||
d
.
dotData
?
1
:
d
.
dotsEach
||
d
.
items
;
if
(
"page"
!==
d
.
slideBy
&&
(
d
.
slideBy
=
Math
.
min
(
d
.
slideBy
,
d
.
items
)),
d
.
dots
||
"page"
==
d
.
slideBy
)
for
(
this
.
_pages
=
[],
a
=
e
,
b
=
0
,
c
=
0
;
f
>
a
;
a
++
)(
b
>=
g
||
0
===
b
)
&&
(
this
.
_pages
.
push
({
start
:
a
-
e
,
end
:
a
-
e
+
g
-
1
}),
b
=
0
,
++
c
),
b
+=
this
.
_core
.
mergers
(
this
.
_core
.
relative
(
a
))},
b
.
prototype
.
draw
=
function
(){
var
b
,
c
,
d
=
""
,
e
=
this
.
_core
.
settings
,
f
=
(
this
.
_core
.
$stage
.
children
(),
this
.
_core
.
relative
(
this
.
_core
.
current
()));
if
(
!
e
.
nav
||
e
.
loop
||
e
.
navRewind
||
(
this
.
_controls
.
$previous
.
toggleClass
(
"disabled"
,
0
>=
f
),
this
.
_controls
.
$next
.
toggleClass
(
"disabled"
,
f
>=
this
.
_core
.
maximum
())),
this
.
_controls
.
$previous
.
toggle
(
e
.
nav
),
this
.
_controls
.
$next
.
toggle
(
e
.
nav
),
e
.
dots
){
if
(
b
=
this
.
_pages
.
length
-
this
.
_controls
.
$indicators
.
children
().
length
,
e
.
dotData
&&
0
!==
b
){
for
(
c
=
0
;
c
<
this
.
_controls
.
$indicators
.
children
().
length
;
c
++
)
d
+=
this
.
_templates
[
this
.
_core
.
relative
(
c
)];
this
.
_controls
.
$indicators
.
html
(
d
)}
else
b
>
0
?(
d
=
new
Array
(
b
+
1
).
join
(
this
.
_templates
[
0
]),
this
.
_controls
.
$indicators
.
append
(
d
)):
0
>
b
&&
this
.
_controls
.
$indicators
.
children
().
slice
(
b
).
remove
();
this
.
_controls
.
$indicators
.
find
(
".active"
).
removeClass
(
"active"
),
this
.
_controls
.
$indicators
.
children
().
eq
(
a
.
inArray
(
this
.
current
(),
this
.
_pages
)).
addClass
(
"active"
)}
this
.
_controls
.
$indicators
.
toggle
(
e
.
dots
)},
b
.
prototype
.
onTrigger
=
function
(
b
){
var
c
=
this
.
_core
.
settings
;
b
.
page
=
{
index
:
a
.
inArray
(
this
.
current
(),
this
.
_pages
),
count
:
this
.
_pages
.
length
,
size
:
c
&&
(
c
.
center
||
c
.
autoWidth
||
c
.
dotData
?
1
:
c
.
dotsEach
||
c
.
items
)}},
b
.
prototype
.
current
=
function
(){
var
b
=
this
.
_core
.
relative
(
this
.
_core
.
current
());
return
a
.
grep
(
this
.
_pages
,
function
(
a
){
return
a
.
start
<=
b
&&
a
.
end
>=
b
}).
pop
()},
b
.
prototype
.
getPosition
=
function
(
b
){
var
c
,
d
,
e
=
this
.
_core
.
settings
;
return
"page"
==
e
.
slideBy
?(
c
=
a
.
inArray
(
this
.
current
(),
this
.
_pages
),
d
=
this
.
_pages
.
length
,
b
?
++
c
:
--
c
,
c
=
this
.
_pages
[(
c
%
d
+
d
)
%
d
].
start
):(
c
=
this
.
_core
.
relative
(
this
.
_core
.
current
()),
d
=
this
.
_core
.
items
().
length
,
b
?
c
+=
e
.
slideBy
:
c
-=
e
.
slideBy
),
c
},
b
.
prototype
.
next
=
function
(
b
){
a
.
proxy
(
this
.
_overrides
.
to
,
this
.
_core
)(
this
.
getPosition
(
!
0
),
b
)},
b
.
prototype
.
prev
=
function
(
b
){
a
.
proxy
(
this
.
_overrides
.
to
,
this
.
_core
)(
this
.
getPosition
(
!
1
),
b
)},
b
.
prototype
.
to
=
function
(
b
,
c
,
d
){
var
e
;
d
?
a
.
proxy
(
this
.
_overrides
.
to
,
this
.
_core
)(
b
,
c
):(
e
=
this
.
_pages
.
length
,
a
.
proxy
(
this
.
_overrides
.
to
,
this
.
_core
)(
this
.
_pages
[(
b
%
e
+
e
)
%
e
].
start
,
c
))},
a
.
fn
.
owlCarousel
.
Constructor
.
Plugins
.
Navigation
=
b
}(
window
.
Zepto
||
window
.
jQuery
,
window
,
document
),
function
(
a
,
b
){
"use strict"
;
var
c
=
function
(
d
){
this
.
_core
=
d
,
this
.
_hashes
=
{},
this
.
$element
=
this
.
_core
.
$element
,
this
.
_handlers
=
{
"initialized.owl.carousel"
:
a
.
proxy
(
function
(){
"URLHash"
==
this
.
_core
.
settings
.
startPosition
&&
a
(
b
).
trigger
(
"hashchange.owl.navigation"
)},
this
),
"prepared.owl.carousel"
:
a
.
proxy
(
function
(
b
){
var
c
=
a
(
b
.
content
).
find
(
"[data-hash]"
).
andSelf
(
"[data-hash]"
).
attr
(
"data-hash"
);
this
.
_hashes
[
c
]
=
b
.
content
},
this
)},
this
.
_core
.
options
=
a
.
extend
({},
c
.
Defaults
,
this
.
_core
.
options
),
this
.
$element
.
on
(
this
.
_handlers
),
a
(
b
).
on
(
"hashchange.owl.navigation"
,
a
.
proxy
(
function
(){
var
a
=
b
.
location
.
hash
.
substring
(
1
),
c
=
this
.
_core
.
$stage
.
children
(),
d
=
this
.
_hashes
[
a
]
&&
c
.
index
(
this
.
_hashes
[
a
])
||
0
;
return
a
?
void
this
.
_core
.
to
(
d
,
!
1
,
!
0
):
!
1
},
this
))};
c
.
Defaults
=
{
URLhashListener
:
!
1
},
c
.
prototype
.
destroy
=
function
(){
var
c
,
d
;
a
(
b
).
off
(
"hashchange.owl.navigation"
);
for
(
c
in
this
.
_handlers
)
this
.
_core
.
$element
.
off
(
c
,
this
.
_handlers
[
c
]);
for
(
d
in
Object
.
getOwnPropertyNames
(
this
))
"function"
!=
typeof
this
[
d
]
&&
(
this
[
d
]
=
null
)},
a
.
fn
.
owlCarousel
.
Constructor
.
Plugins
.
Hash
=
c
}(
window
.
Zepto
||
window
.
jQuery
,
window
,
document
);
(
function
(
e
){
e
.
fn
.
extend
({
slimScroll
:
function
(
g
){
var
a
=
e
.
extend
({
width
:
"auto"
,
height
:
"250px"
,
size
:
"7px"
,
color
:
"#000"
,
position
:
"right"
,
distance
:
"1px"
,
start
:
"top"
,
opacity
:.
4
,
alwaysVisible
:
!
1
,
disableFadeOut
:
!
1
,
railVisible
:
!
1
,
railColor
:
"#333"
,
railOpacity
:.
2
,
railDraggable
:
!
0
,
railClass
:
"slimScrollRail"
,
barClass
:
"slimScrollBar"
,
wrapperClass
:
"slimScrollDiv"
,
allowPageScroll
:
!
1
,
wheelStep
:
20
,
touchScrollStep
:
200
,
borderRadius
:
"7px"
,
railBorderRadius
:
"7px"
},
g
);
this
.
each
(
function
(){
function
v
(
d
){
if
(
r
){
d
=
d
||
window
.
event
;
var
c
=
0
;
d
.
wheelDelta
&&
(
c
=-
d
.
wheelDelta
/
120
);
d
.
detail
&&
(
c
=
d
.
detail
/
3
);
e
(
d
.
target
||
d
.
srcTarget
||
d
.
srcElement
).
closest
(
"."
+
a
.
wrapperClass
).
is
(
b
.
parent
())
&&
m
(
c
,
!
0
);
d
.
preventDefault
&&!
k
&&
d
.
preventDefault
();
k
||
(
d
.
returnValue
=!
1
)}}
function
m
(
d
,
e
,
g
){
k
=!
1
;
var
f
=
d
,
h
=
b
.
outerHeight
()
-
c
.
outerHeight
();
e
&&
(
f
=
parseInt
(
c
.
css
(
"top"
))
+
d
*
parseInt
(
a
.
wheelStep
)
/
100
*
c
.
outerHeight
(),
f
=
Math
.
min
(
Math
.
max
(
f
,
0
),
h
),
f
=
0
<
d
?
Math
.
ceil
(
f
):
Math
.
floor
(
f
),
c
.
css
({
top
:
f
+
"px"
}));
l
=
parseInt
(
c
.
css
(
"top"
))
/
(
b
.
outerHeight
()
-
c
.
outerHeight
());
f
=
l
*
(
b
[
0
].
scrollHeight
-
b
.
outerHeight
());
g
&&
(
f
=
d
,
d
=
f
/
b
[
0
].
scrollHeight
*
b
.
outerHeight
(),
d
=
Math
.
min
(
Math
.
max
(
d
,
0
),
h
),
c
.
css
({
top
:
d
+
"px"
}));
b
.
scrollTop
(
f
);
b
.
trigger
(
"slimscrolling"
,
~~
f
);
w
();
p
()}
function
x
(){
u
=
Math
.
max
(
b
.
outerHeight
()
/
b
[
0
].
scrollHeight
*
b
.
outerHeight
(),
30
);
c
.
css
({
height
:
u
+
"px"
});
var
a
=
u
==
b
.
outerHeight
()?
"none"
:
"block"
;
c
.
css
({
display
:
a
})}
function
w
(){
x
();
clearTimeout
(
B
);
l
==~~
l
?(
k
=
a
.
allowPageScroll
,
C
!=
l
&&
b
.
trigger
(
"slimscroll"
,
0
==~~
l
?
"top"
:
"bottom"
)):
k
=!
1
;
C
=
l
;
u
>=
b
.
outerHeight
()?
k
=!
0
:(
c
.
stop
(
!
0
,
!
0
).
fadeIn
(
"fast"
),
a
.
railVisible
&&
h
.
stop
(
!
0
,
!
0
).
fadeIn
(
"fast"
))}
function
p
(){
a
.
alwaysVisible
||
(
B
=
setTimeout
(
function
(){
a
.
disableFadeOut
&&
r
||
y
||
z
||
(
c
.
fadeOut
(
"slow"
),
h
.
fadeOut
(
"slow"
))},
1
E3
))}
var
r
,
y
,
z
,
B
,
A
,
u
,
l
,
C
,
k
=!
1
,
b
=
e
(
this
);
if
(
b
.
parent
().
hasClass
(
a
.
wrapperClass
)){
var
n
=
b
.
scrollTop
(),
c
=
b
.
closest
(
"."
+
a
.
barClass
),
h
=
b
.
closest
(
"."
+
a
.
railClass
);
x
();
if
(
e
.
isPlainObject
(
g
)){
if
(
"height"
in
g
&&
"auto"
==
g
.
height
){
b
.
parent
().
css
(
"height"
,
"auto"
);
b
.
css
(
"height"
,
"auto"
);
var
q
=
b
.
parent
().
parent
().
height
();
b
.
parent
().
css
(
"height"
,
q
);
b
.
css
(
"height"
,
q
)}
if
(
"scrollTo"
in
g
)
n
=
parseInt
(
a
.
scrollTo
);
else
if
(
"scrollBy"
in
g
)
n
+=
parseInt
(
a
.
scrollBy
);
else
if
(
"destroy"
in
g
){
c
.
remove
();
h
.
remove
();
b
.
unwrap
();
return
}
m
(
n
,
!
1
,
!
0
)}}
else
if
(
!
(
e
.
isPlainObject
(
g
)
&&
"destroy"
in
g
)){
a
.
height
=
"auto"
==
a
.
height
?
b
.
parent
().
height
():
a
.
height
;
n
=
e
(
"<div></div>"
).
addClass
(
a
.
wrapperClass
).
css
({
position
:
"relative"
,
overflow
:
"hidden"
,
width
:
a
.
width
,
height
:
a
.
height
});
b
.
css
({
overflow
:
"hidden"
,
width
:
a
.
width
,
height
:
a
.
height
});
var
h
=
e
(
"<div></div>"
).
addClass
(
a
.
railClass
).
css
({
width
:
a
.
size
,
height
:
"100%"
,
position
:
"absolute"
,
top
:
0
,
display
:
a
.
alwaysVisible
&&
a
.
railVisible
?
"block"
:
"none"
,
"border-radius"
:
a
.
railBorderRadius
,
background
:
a
.
railColor
,
opacity
:
a
.
railOpacity
,
zIndex
:
90
}),
c
=
e
(
"<div></div>"
).
addClass
(
a
.
barClass
).
css
({
background
:
a
.
color
,
width
:
a
.
size
,
position
:
"absolute"
,
top
:
0
,
opacity
:
a
.
opacity
,
display
:
a
.
alwaysVisible
?
"block"
:
"none"
,
"border-radius"
:
a
.
borderRadius
,
BorderRadius
:
a
.
borderRadius
,
MozBorderRadius
:
a
.
borderRadius
,
WebkitBorderRadius
:
a
.
borderRadius
,
zIndex
:
99
}),
q
=
"right"
==
a
.
position
?
{
right
:
a
.
distance
}:{
left
:
a
.
distance
};
h
.
css
(
q
);
c
.
css
(
q
);
b
.
wrap
(
n
);
b
.
parent
().
append
(
c
);
b
.
parent
().
append
(
h
);
a
.
railDraggable
&&
c
.
bind
(
"mousedown"
,
function
(
a
){
var
b
=
e
(
document
);
z
=!
0
;
t
=
parseFloat
(
c
.
css
(
"top"
));
pageY
=
a
.
pageY
;
b
.
bind
(
"mousemove.slimscroll"
,
function
(
a
){
currTop
=
t
+
a
.
pageY
-
pageY
;
c
.
css
(
"top"
,
currTop
);
m
(
0
,
c
.
position
().
top
,
!
1
)});
b
.
bind
(
"mouseup.slimscroll"
,
function
(
a
){
z
=!
1
;
p
();
b
.
unbind
(
".slimscroll"
)});
return
!
1
}).
bind
(
"selectstart.slimscroll"
,
function
(
a
){
a
.
stopPropagation
();
a
.
preventDefault
();
return
!
1
});
h
.
hover
(
function
(){
w
()},
function
(){
p
()});
c
.
hover
(
function
(){
y
=!
0
},
function
(){
y
=!
1
});
b
.
hover
(
function
(){
r
=!
0
;
w
();
p
()},
function
(){
r
=!
1
;
p
()});
b
.
bind
(
"touchstart"
,
function
(
a
,
b
){
a
.
originalEvent
.
touches
.
length
&&
(
A
=
a
.
originalEvent
.
touches
[
0
].
pageY
)});
b
.
bind
(
"touchmove"
,
function
(
b
){
k
||
b
.
originalEvent
.
preventDefault
();
b
.
originalEvent
.
touches
.
length
&&
(
m
((
A
-
b
.
originalEvent
.
touches
[
0
].
pageY
)
/
a
.
touchScrollStep
,
!
0
),
A
=
b
.
originalEvent
.
touches
[
0
].
pageY
)});
x
();
"bottom"
===
a
.
start
?(
c
.
css
({
top
:
b
.
outerHeight
()
-
c
.
outerHeight
()}),
m
(
0
,
!
0
)):
"top"
!==
a
.
start
&&
(
m
(
e
(
a
.
start
).
position
().
top
,
null
,
!
0
),
a
.
alwaysVisible
||
c
.
hide
());
window
.
addEventListener
?(
this
.
addEventListener
(
"DOMMouseScroll"
,
v
,
!
1
),
this
.
addEventListener
(
"mousewheel"
,
v
,
!
1
)):
document
.
attachEvent
(
"onmousewheel"
,
v
)}});
return
this
}});
e
.
fn
.
extend
({
slimscroll
:
e
.
fn
.
slimScroll
})})(
jQuery
);
var
c
=
0
;
d
.
wheelDelta
&&
(
c
=-
d
.
wheelDelta
/
120
);
d
.
detail
&&
(
c
=
d
.
detail
/
3
);
e
(
d
.
target
||
d
.
srcTarget
||
d
.
srcElement
).
closest
(
"."
+
a
.
wrapperClass
).
is
(
b
.
parent
())
&&
m
(
c
,
!
0
);
d
.
preventDefault
&&!
k
&&
d
.
preventDefault
();
k
||
(
d
.
returnValue
=!
1
)}}
function
m
(
d
,
e
,
g
){
k
=!
1
;
var
f
=
d
,
h
=
b
.
outerHeight
()
-
c
.
outerHeight
();
e
&&
(
f
=
parseInt
(
c
.
css
(
"top"
))
+
d
*
parseInt
(
a
.
wheelStep
)
/
100
*
c
.
outerHeight
(),
f
=
Math
.
min
(
Math
.
max
(
f
,
0
),
h
),
f
=
0
<
d
?
Math
.
ceil
(
f
):
Math
.
floor
(
f
),
c
.
css
({
top
:
f
+
"px"
}));
l
=
parseInt
(
c
.
css
(
"top"
))
/
(
b
.
outerHeight
()
-
c
.
outerHeight
());
f
=
l
*
(
b
[
0
].
scrollHeight
-
b
.
outerHeight
());
g
&&
(
f
=
d
,
d
=
f
/
b
[
0
].
scrollHeight
*
b
.
outerHeight
(),
d
=
Math
.
min
(
Math
.
max
(
d
,
0
),
h
),
c
.
css
({
top
:
d
+
"px"
}));
b
.
scrollTop
(
f
);
b
.
trigger
(
"slimscrolling"
,
~~
f
);
w
();
p
()}
function
x
(){
u
=
Math
.
max
(
b
.
outerHeight
()
/
b
[
0
].
scrollHeight
*
b
.
outerHeight
(),
30
);
c
.
css
({
height
:
u
+
"px"
});
var
a
=
u
==
b
.
outerHeight
()?
"none"
:
"block"
;
c
.
css
({
display
:
a
})}
function
w
(){
x
();
clearTimeout
(
B
);
l
==~~
l
?(
k
=
a
.
allowPageScroll
,
C
!=
l
&&
b
.
trigger
(
"slimscroll"
,
0
==~~
l
?
"top"
:
"bottom"
)):
k
=!
1
;
C
=
l
;
u
>=
b
.
outerHeight
()?
k
=!
0
:(
c
.
stop
(
!
0
,
!
0
).
fadeIn
(
"fast"
),
a
.
railVisible
&&
h
.
stop
(
!
0
,
!
0
).
fadeIn
(
"fast"
))}
function
p
(){
a
.
alwaysVisible
||
(
B
=
setTimeout
(
function
(){
a
.
disableFadeOut
&&
r
||
y
||
z
||
(
c
.
fadeOut
(
"slow"
),
h
.
fadeOut
(
"slow"
))},
1
E3
))}
var
r
,
y
,
z
,
B
,
A
,
u
,
l
,
C
,
k
=!
1
,
b
=
e
(
this
);
if
(
b
.
parent
().
hasClass
(
a
.
wrapperClass
)){
var
n
=
b
.
scrollTop
(),
c
=
b
.
closest
(
"."
+
a
.
barClass
),
h
=
b
.
closest
(
"."
+
a
.
railClass
);
x
();
if
(
e
.
isPlainObject
(
g
)){
if
(
"height"
in
g
&&
"auto"
==
g
.
height
){
b
.
parent
().
css
(
"height"
,
"auto"
);
b
.
css
(
"height"
,
"auto"
);
var
q
=
b
.
parent
().
parent
().
height
();
b
.
parent
().
css
(
"height"
,
q
);
b
.
css
(
"height"
,
q
)}
if
(
"scrollTo"
in
g
)
n
=
parseInt
(
a
.
scrollTo
);
else
if
(
"scrollBy"
in
g
)
n
+=
parseInt
(
a
.
scrollBy
);
else
if
(
"destroy"
in
g
){
c
.
remove
();
h
.
remove
();
b
.
unwrap
();
return
}
m
(
n
,
!
1
,
!
0
)}}
else
if
(
!
(
e
.
isPlainObject
(
g
)
&&
"destroy"
in
g
)){
a
.
height
=
"auto"
==
a
.
height
?
b
.
parent
().
height
():
a
.
height
;
n
=
e
(
"<div></div>"
).
addClass
(
a
.
wrapperClass
).
css
({
position
:
"relative"
,
overflow
:
"hidden"
,
width
:
a
.
width
,
height
:
a
.
height
});
b
.
css
({
overflow
:
"hidden"
,
width
:
a
.
width
,
height
:
a
.
height
});
var
h
=
e
(
"<div></div>"
).
addClass
(
a
.
railClass
).
css
({
width
:
a
.
size
,
height
:
"100%"
,
position
:
"absolute"
,
top
:
0
,
display
:
a
.
alwaysVisible
&&
a
.
railVisible
?
"block"
:
"none"
,
"border-radius"
:
a
.
railBorderRadius
,
background
:
a
.
railColor
,
opacity
:
a
.
railOpacity
,
zIndex
:
90
}),
c
=
e
(
"<div></div>"
).
addClass
(
a
.
barClass
).
css
({
background
:
a
.
color
,
width
:
a
.
size
,
position
:
"absolute"
,
top
:
0
,
opacity
:
a
.
opacity
,
display
:
a
.
alwaysVisible
?
"block"
:
"none"
,
"border-radius"
:
a
.
borderRadius
,
BorderRadius
:
a
.
borderRadius
,
MozBorderRadius
:
a
.
borderRadius
,
WebkitBorderRadius
:
a
.
borderRadius
,
zIndex
:
99
}),
q
=
"right"
==
a
.
position
?
{
right
:
a
.
distance
}:{
left
:
a
.
distance
};
h
.
css
(
q
);
c
.
css
(
q
);
b
.
wrap
(
n
);
b
.
parent
().
append
(
c
);
b
.
parent
().
append
(
h
);
a
.
railDraggable
&&
c
.
bind
(
"mousedown"
,
function
(
a
){
var
b
=
e
(
document
);
z
=!
0
;
t
=
parseFloat
(
c
.
css
(
"top"
));
pageY
=
a
.
pageY
;
b
.
bind
(
"mousemove.slimscroll"
,
function
(
a
){
currTop
=
t
+
a
.
pageY
-
pageY
;
c
.
css
(
"top"
,
currTop
);
m
(
0
,
c
.
position
().
top
,
!
1
)});
b
.
bind
(
"mouseup.slimscroll"
,
function
(
a
){
z
=!
1
;
p
();
b
.
unbind
(
".slimscroll"
)});
return
!
1
}).
bind
(
"selectstart.slimscroll"
,
function
(
a
){
a
.
stopPropagation
();
a
.
preventDefault
();
return
!
1
});
h
.
hover
(
function
(){
w
()},
function
(){
p
()});
c
.
hover
(
function
(){
y
=!
0
},
function
(){
y
=!
1
});
b
.
hover
(
function
(){
r
=!
0
;
w
();
p
()},
function
(){
r
=!
1
;
p
()});
b
.
bind
(
"touchstart"
,
function
(
a
,
b
){
a
.
originalEvent
.
touches
.
length
&&
(
A
=
a
.
originalEvent
.
touches
[
0
].
pageY
)});
b
.
bind
(
"touchmove"
,
function
(
b
){
k
||
b
.
originalEvent
.
preventDefault
();
b
.
originalEvent
.
touches
.
length
&&
(
m
((
A
-
b
.
originalEvent
.
touches
[
0
].
pageY
)
/
a
.
touchScrollStep
,
!
0
),
A
=
b
.
originalEvent
.
touches
[
0
].
pageY
)});
x
();
"bottom"
===
a
.
start
?(
c
.
css
({
top
:
b
.
outerHeight
()
-
c
.
outerHeight
()}),
m
(
0
,
!
0
)):
"top"
!==
a
.
start
&&
(
m
(
e
(
a
.
start
).
position
().
top
,
null
,
!
0
),
a
.
alwaysVisible
||
c
.
hide
());
window
.
addEventListener
?(
this
.
addEventListener
(
"DOMMouseScroll"
,
v
,
!
1
),
this
.
addEventListener
(
"mousewheel"
,
v
,
!
1
)):
document
.
attachEvent
(
"onmousewheel"
,
v
)}});
return
this
}});
e
.
fn
.
extend
({
slimscroll
:
e
.
fn
.
slimScroll
})})(
jQuery
);
//для замены слассов
$
(
document
).
ready
(
function
()
{
var
width
=
$
(
'body'
).
innerWidth
()
if
(
width
<
767
)
{
$
(
'#header_search_wrap'
).
addClass
(
'mobile'
);
$
(
'.mobile_menu_wrap'
).
addClass
(
'mobile'
);
$
(
'#header_search'
).
addClass
(
'mobile'
)
}
else
{
$
(
'#header_search_wrap'
).
removeClass
(
'mobile'
);
$
(
'.mobile_menu_wrap'
).
removeClass
(
'mobile'
);
$
(
'#header_search'
).
removeClass
(
'mobile'
)
}
var
width
=
$
(
'body'
).
innerWidth
()
if
(
width
<
767
)
{
$
(
'#header_search_wrap'
).
addClass
(
'mobile'
);
$
(
'.mobile_menu_wrap'
).
addClass
(
'mobile'
);
$
(
'#header_search'
).
addClass
(
'mobile'
)
}
else
{
$
(
'#header_search_wrap'
).
removeClass
(
'mobile'
);
$
(
'.mobile_menu_wrap'
).
removeClass
(
'mobile'
);
$
(
'#header_search'
).
removeClass
(
'mobile'
)
}
});
var
owl
=
false
;
$
(
function
(){
function
show_prev
(
index
,
item
)
{
function
show_prev
(
index
,
item
)
{
var
bg
=
item
.
attr
(
'data-original'
);
var
bg
=
item
.
attr
(
'data-original'
);
if
(
bg
)
item
.
css
(
{
'background-image'
:
'url('
+
bg
+
')'
}
);
if
(
bg
)
item
.
css
(
{
'background-image'
:
'url('
+
bg
+
')'
}
);
/* $('.project-gallery-item:lt('+index+')').each(function(){
/* $('.project-gallery-item:lt('+index+')').each(function(){
var bg = $(this).attr('data-original');
var bg = $(this).attr('data-original');
if (bg) $(this).css( {'background-image' : 'url('+bg+')'} );
if (bg) $(this).css( {'background-image' : 'url('+bg+')'} );
})
*/
}
})
*/
}
//$('#pre_load').before('<link rel="stylesheet" type="text/css" href="/css/media.min.css" ><link rel="stylesheet" type="text/css" href="/css/flaticon.css"> <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700,700italic,800,800italic,300italic,300&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">');
//$('#pre_load').before('<link rel="stylesheet" type="text/css" href="/css/media.min.css" ><link rel="stylesheet" type="text/css" href="/css/flaticon.css"> <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700,700italic,800,800italic,300italic,300&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">');
//инициализация скролла в галерее проекта
$
(
'.project-gallery-previews'
).
slimScroll
({
//инициализация скролла в галерее проекта
$
(
'.project-gallery-previews'
).
slimScroll
({
height
:
'100%'
height
:
'100%'
});
});
//toggle мобильного меню
$
(
'.mobile_menu_wrap'
||
'.mobile_menu_wrap_phone'
).
click
(
function
(){
//toggle мобильного меню
$
(
'.mobile_menu_wrap'
||
'.mobile_menu_wrap_phone'
).
click
(
function
(){
$
(
this
).
find
(
'.main-menu'
).
toggleClass
(
'opened-xs-menu'
);
$
(
this
).
find
(
'.main-menu'
).
toggleClass
(
'opened-xs-menu'
);
$
(
'header.header'
).
toggleClass
(
'opened-menu-header'
);
$
(
'header.header'
).
toggleClass
(
'opened-menu-header'
);
$
(
'body'
).
toggleClass
(
'noscroll-body'
);
$
(
'body'
).
toggleClass
(
'noscroll-body'
);
});
});
//Hawks 13.01.2017 swipe под меню
$
(
".mobile_menu_wrap"
).
swipe
(
{
...
...
@@ -80,330 +83,347 @@ $(function(){
allowPageScroll
:
"auto"
,
});
// $('.mobile_menu_wrap_phone').click(function(){
// $('.mobile_menu_wrap_phone').click(function(){
//
// $(this).find('.main-menu').toggleClass('opened-xs-menu');
// $(this).find('.main-menu').toggleClass('opened-xs-menu');
//
// $('header.header').toggleClass('opened-menu-header');
// $('header.header').toggleClass('opened-menu-header');
//
// $('body').toggleClass('noscroll-body');
// $('body').toggleClass('noscroll-body');
//
// });
// });
//слайд тоггл ссылок мобильного меню на мобильных устройствах
$
(
'.main-menu-item a'
).
click
(
function
(){
if
(
$
(
window
).
width
()
<
992
)
{
//слайд тоггл ссылок мобильного меню на мобильных устройствах
$
(
'.main-menu-item a'
).
click
(
function
(){
$
(
this
).
next
(
'ul'
).
slideToggle
();
if
(
$
(
window
).
width
()
<
992
)
{
if
(
$
(
this
).
next
(
'ul'
).
length
)
return
false
;
$
(
this
).
next
(
'ul'
).
slideToggle
();
}
})
//toogle режима превью в карточке проекта
$
(
'#previewer_toggle'
).
click
(
function
(
event
){
if
(
$
(
this
).
next
(
'ul'
).
length
)
return
false
;
if
(
$
(
window
).
width
()
<
992
)
{
}
$
(
'body'
).
toggleClass
(
'previewer'
);
})
}
event
.
preventDefault
();
event
.
stopPropagation
();
//toogle режима превью в карточке проекта
$
(
'#previewer_toggle'
).
click
(
function
(
event
){
})
if
(
$
(
window
).
width
()
<
992
)
{
//отключение режима просмотра в карточке проекта
$
(
'#object_head_gal'
).
on
(
'click'
,
function
(){
$
(
'body'
).
toggl
eClass
(
'previewer'
);
$
(
'body'
).
remov
eClass
(
'previewer'
);
}
})
event
.
preventDefault
();
//инициализайия и настройка слайдера в карточке проектоа
owl
=
$
(
'.project_slider'
);
event
.
stopPropagation
();
})
//отключение режима просмотра в карточке проекта
$
(
'#object_head_gal'
).
on
(
'click'
,
function
(){
owl
.
on
(
'initialized.owl.carousel'
,
function
(
event
)
{
$
(
'body'
).
removeClass
(
'previewer'
)
;
var
index
=
event
.
item
.
index
;
})
var
video
=
$
(
'.project-gallery-item'
).
eq
(
index
).
find
(
'video'
).
get
(
0
);
//инициализайия и настройка слайдера в карточке проектоа
var
owl
=
$
(
'.project_slider'
)
if
(
video
)
{
owl
.
on
(
'initialized.owl.carousel'
,
function
(
event
)
{
video
.
play
();
var
index
=
event
.
item
.
index
;
}
var
video
=
$
(
'.project-gallery-item'
).
eq
(
index
).
find
(
'video'
).
get
(
0
);
var
slide_num
=
location
.
search
;
// если в поисковой строке есть номер слайда перематываем сразу на него
if
(
video
)
{
if
(
slide_num
)
{
video
.
play
(
);
slide_num
=
Number
(
slide_num
.
replace
(
'?'
,
''
)
);
}
var
item
=
$
(
'.project-gallery-item'
).
eq
(
slide_num
);
var
slide_num
=
location
.
search
;
// если в поисковой строке есть номер слайда перематываем сразу на него
var
video_opened
=
item
.
find
(
'video'
).
get
(
0
);
if
(
slide_num
)
{
if
(
video_opened
)
{
// проверяем содержимое открытого слайда
slide_num
=
Number
(
slide_num
.
replace
(
'?'
,
''
)
);
video_opened
.
play
(
);
var
item
=
$
(
'.project-gallery-item'
).
eq
(
slide_num
);
}
else
{
var
video_opened
=
item
.
find
(
'video'
).
get
(
0
);
show_prev
(
slide_num
,
item
);
if
(
video_opened
)
{
// проверяем содержимое открытого слайда
}
video_opened
.
play
(
);
owl
.
trigger
(
'to.owl.carousel'
,
slide_num
);
}
else
{
}
show_prev
(
slide_num
,
item
)
;
return
false
;
}
})
owl
.
trigger
(
'to.owl.carousel'
,
slide_num
);
//cursor rotate
}
owl
.
on
(
'mousemove'
,
function
(
event
){
return
false
;
var
top
=
$
(
window
).
scrollTop
()
+
event
.
clientY
;
})
$
(
'#cursor'
).
css
({
'transform'
:
'translate('
+
event
.
clientX
+
'px, '
+
top
+
'px)'
});
//cursor rotate
if
(
$
(
window
).
width
()
/
event
.
clientX
>
2
)
{
owl
.
on
(
'mousemove'
,
function
(
event
){
$
(
'#cursor_inside'
).
removeClass
(
'right_cursor'
);
var
top
=
$
(
window
).
scrollTop
()
+
event
.
clientY
;
}
else
{
$
(
'#cursor'
).
css
({
'transform'
:
'translate('
+
event
.
clientX
+
'px, '
+
top
+
'px)'
}
);
$
(
'#cursor_inside'
).
removeClass
(
'left_cursor'
);
if
(
$
(
window
).
width
()
/
event
.
clientX
>
2
)
{
$
(
'#cursor_inside'
).
addClass
(
'right_cursor'
);
}
})
$
(
'#cursor_inside'
).
removeClass
(
'right_cursor'
);
owl
.
owlCarousel
({
items
:
1
,
loop
:
true
,
itemsDesktop
:
[
1370
,
1
],
itemsDesktopSmall
:
[
1000
,
1
],
itemsTablet
:
[
768
,
1
],
itemsMobile
:
[
700
,
1
],
navigation
:
false
,
pagination
:
false
,
navigationText
:
false
,
video
:
true
}
else
{
$
(
'#cursor_inside'
).
removeClass
(
'left_cursor'
);
}
);
$
(
'#cursor_inside'
).
addClass
(
'right_cursor'
);
}
})
$
(
'.project-gallery-previews-item'
).
click
(
function
()
{
owl
.
owlCarousel
({
items
:
1
,
loop
:
true
,
itemsDesktop
:
[
1370
,
1
],
itemsDesktopSmall
:
[
1000
,
1
],
itemsTablet
:
[
768
,
1
],
itemsMobile
:
[
700
,
1
],
navigation
:
false
,
pagination
:
false
,
navigationText
:
false
,
video
:
true
var
index
=
$
(
this
).
attr
(
'data-goto'
);
index
=
Number
(
index
);
}
);
owl
.
trigger
(
'to.owl.carousel'
,
index
);
$
(
'.project-gallery-previews-item'
).
click
(
function
()
{
var
item
=
$
(
'.project-gallery-item'
).
eq
(
index
);
var
index
=
$
(
this
).
attr
(
'data-goto'
);
show_prev
(
index
,
item
);
index
=
Number
(
index
)
;
return
false
;
owl
.
trigger
(
'to.owl.carousel'
,
index
);
var
item
=
$
(
'.project-gallery-item'
).
eq
(
index
);
})
show_prev
(
index
,
item
);
// Перелистывание слайдов в слайдере
$
(
'#cursor'
).
click
(
function
()
{
return
false
;
if
(
$
(
'#cursor_inside'
).
attr
(
'class'
)
==
'right_cursor'
)
{
})
owl
.
trigger
(
'next.owl.carousel'
);
// Перелистывание слайдов в слайдере
$
(
'#cursor'
).
click
(
function
()
{
}
else
owl
.
trigger
(
'prev.owl.carousel'
);
})
if
(
$
(
'#cursor_inside'
).
attr
(
'class'
)
==
'right_cursor'
)
{
owl
.
trigger
(
'next.owl.carousel'
);
$
(
document
).
keyup
(
function
(
event
){
if
(
event
.
keyCode
==
37
)
{
owl
.
trigger
(
'prev.owl.carousel'
);
}
if
(
event
.
keyCode
==
39
)
{
owl
.
trigger
(
'next.owl.carousel'
);
}
});
}
else
owl
.
trigger
(
'prev.owl.carousel'
);
$
(
document
).
keypress
(
function
()
{
debugger
;
})
});
// Переход к слайду с планировкой
// Переход к слайду с планировкой
$
(
'.js-slide-to-layout'
).
click
(
function
(
event
)
{
$
(
'.js-slide-to-layout'
).
click
(
function
(
event
)
{
event
.
preventDefault
();
event
.
preventDefault
();
//var index = $('.project_slider').find('li').index($('._plan'));
//var index = $('.project_slider').find('li').index($('._plan'));
var
index
=
$
(
this
).
attr
(
'data-image'
);
var
index
=
$
(
this
).
attr
(
'data-image'
);
owl
.
trigger
(
'to.owl.carousel'
,
index
)
owl
.
trigger
(
'to.owl.carousel'
,
index
)
var
item
=
$
(
'.project-gallery-item'
).
eq
(
index
);
var
item
=
$
(
'.project-gallery-item'
).
eq
(
index
);
show_prev
(
index
,
item
);
show_prev
(
index
,
item
);
return
false
;
return
false
;
});
});
// Воспроизведение активного видеослайда
// Воспроизведение активного видеослайда
owl
.
on
(
'changed.owl.carousel'
,
function
(
event
)
{
owl
.
on
(
'changed.owl.carousel'
,
function
(
event
)
{
var
index
=
event
.
item
.
index
;
var
index
=
event
.
item
.
index
;
var
item
=
$
(
'.project-gallery-item'
).
eq
(
index
);
var
item
=
$
(
'.project-gallery-item'
).
eq
(
index
);
$
(
'.project-gallery-item'
).
find
(
'video'
).
each
(
function
(){
$
(
'.project-gallery-item'
).
find
(
'video'
).
each
(
function
(){
$
(
this
).
get
(
0
).
pause
();
$
(
this
).
get
(
0
).
pause
();
})
})
var
video
=
item
.
find
(
'video'
).
get
(
0
);
var
video
=
item
.
find
(
'video'
).
get
(
0
);
if
(
video
)
{
if
(
video
)
{
video
.
play
();
video
.
play
();
}
else
{
}
else
{
var
bg
=
item
.
attr
(
'data-original'
);
var
bg
=
item
.
attr
(
'data-original'
);
if
(
bg
)
item
.
css
(
{
'background-image'
:
'url('
+
bg
+
')'
}
);
if
(
bg
)
item
.
css
(
{
'background-image'
:
'url('
+
bg
+
')'
}
);
show_prev
(
index
,
item
);
show_prev
(
index
,
item
);
}
}
history
.
replaceState
(
null
,
null
,
window
.
location
.
pathname
);
history
.
replaceState
(
null
,
null
,
window
.
location
.
pathname
);
index_num
=
Number
(
index
)
-
2
;
index_num
=
Number
(
index
)
-
2
;
var
previews
=
$
(
'.project-gallery-previews-wr'
).
find
(
'li'
);
var
previews
=
$
(
'.project-gallery-previews-wr'
).
find
(
'li'
);
previews
.
removeClass
(
'current_review_item'
);
previews
.
removeClass
(
'current_review_item'
);
previews
.
eq
(
index_num
).
addClass
(
'current_review_item'
);
previews
.
eq
(
index_num
).
addClass
(
'current_review_item'
);
//var offset = previews.eq(index_num).position().top;
//var offset = previews.eq(index_num).position().top;
var
offset
=
98
*
(
index_num
-
3
);
var
offset
=
98
*
(
index_num
-
3
);
$
(
'.project-gallery-previews'
).
animate
({
scrollTop
:
offset
},
0
);
$
(
'.project-gallery-previews'
).
animate
({
scrollTop
:
offset
},
0
);
try
{
try
{
history
.
pushState
(
null
,
null
,
'?'
+
index_num
);
history
.
pushState
(
null
,
null
,
'?'
+
index_num
);
return
;
return
;
}
catch
(
e
)
{}
}
catch
(
e
)
{}
location
.
hash
=
'?'
+
index_num
;
location
.
hash
=
'?'
+
index_num
;
})
})
$
(
'#header_search_wrap'
).
click
(
function
(){
$
(
this
).
toggleClass
(
'active_search'
);
$
(
'#header_search_wrap'
).
click
(
function
(){
$
(
this
).
toggleClass
(
'active_search'
);
setTimeout
(
function
(){
$
(
'#header_search'
).
focus
();
}
,
200
)
})
setTimeout
(
function
(){
$
(
'#header_search'
).
focus
();
}
,
200
)
})
$
(
'#header_search'
).
click
(
function
(
event
){
event
.
preventDefault
();
event
.
stopPropagation
();
})
$
(
'#header_search'
).
click
(
function
(
event
){
event
.
preventDefault
();
event
.
stopPropagation
();
})
// поиск в хедере
$
(
'#header_search'
).
on
(
'keyup'
,
function
(
event
){
var
self
=
$
(
this
);
var
data
=
$
(
this
).
val
();
// поиск в хедере
$
(
'#header_search'
).
on
(
'keyup'
,
function
(
event
){
var
self
=
$
(
this
);
var
data
=
$
(
this
).
val
();
if
(
event
.
keyCode
!=
40
&&
event
.
keyCode
!=
38
&&
event
.
keyCode
!=
13
)
{
if
(
event
.
keyCode
!=
40
&&
event
.
keyCode
!=
38
&&
event
.
keyCode
!=
13
)
{
$
.
ajax
({
type
:
"POST"
,
url
:
"/ajax/ajax_search.php"
,
data
:
'data='
+
data
,
dataType
:
'json'
,
success
:
function
(
result
){
$
.
ajax
({
type
:
"POST"
,
url
:
"/ajax/ajax_search.php"
,
data
:
'data='
+
data
,
dataType
:
'json'
,
success
:
function
(
result
){
$
(
'#result_list'
).
addClass
(
'active_res_list'
).
html
(
result
.
text
);
$
(
'#result_list'
).
addClass
(
'active_res_list'
).
html
(
result
.
text
);
}
}
});
});
}
else
if
(
event
.
keyCode
==
40
||
event
.
keyCode
==
38
)
{
}
else
if
(
event
.
keyCode
==
40
||
event
.
keyCode
==
38
)
{
var
items
=
$
(
'#result_list'
).
find
(
'li'
);
var
items
=
$
(
'#result_list'
).
find
(
'li'
);
var
index
=
items
.
index
(
$
(
'.active_res_item'
));
var
index
=
items
.
index
(
$
(
'.active_res_item'
));
if
(
event
.
keyCode
==
40
)
{
if
(
event
.
keyCode
==
40
)
{
if
(
index
==
-
1
||
index
==
(
items
.
length
-
1
)
)
{
if
(
index
==
-
1
||
index
==
(
items
.
length
-
1
)
)
{
index
=
0
;
index
=
0
;
}
else
index
=
index
+
1
;
}
else
index
=
index
+
1
;
}
else
if
(
event
.
keyCode
==
38
)
{
}
else
if
(
event
.
keyCode
==
38
)
{
if
(
index
==
-
1
||
index
==
items
.
length
)
{
if
(
index
==
-
1
||
index
==
items
.
length
)
{
index
=
0
;
index
=
0
;
}
else
index
=
index
-
1
;
}
else
index
=
index
-
1
;
}
}
items
.
each
(
function
(){
items
.
each
(
function
(){
$
(
this
).
removeClass
(
'active_res_item'
);
$
(
this
).
removeClass
(
'active_res_item'
);
})
})
items
.
eq
(
index
).
addClass
(
'active_res_item'
);
items
.
eq
(
index
).
addClass
(
'active_res_item'
);
}
else
if
(
event
.
keyCode
==
13
)
{
}
else
if
(
event
.
keyCode
==
13
)
{
var
href
=
$
(
'.active_res_item'
).
find
(
'a'
).
attr
(
'href'
);
var
href
=
$
(
'.active_res_item'
).
find
(
'a'
).
attr
(
'href'
);
if
(
href
)
location
.
href
=
href
;
if
(
href
)
location
.
href
=
href
;
}
})
}
})
//тоггл инфо о проекте в карте
//тоггл инфо о проекте в карте
$
(
'.map-text-toggler'
).
click
(
function
(){
$
(
this
).
closest
(
'.map-project-text-wrap'
).
find
(
'.map-project-text'
).
slideToggle
();
if
(
$
(
this
).
text
()
==
'Читать полностью'
)
$
(
this
).
text
(
'Скрыть'
);
else
$
(
this
).
text
(
'Читать полностью'
);
})
$
(
'.map-text-toggler'
).
click
(
function
(){
$
(
this
).
closest
(
'.map-project-text-wrap'
).
find
(
'.map-project-text'
).
slideToggle
();
if
(
$
(
this
).
text
()
==
'Читать полностью'
)
$
(
this
).
text
(
'Скрыть'
);
else
$
(
this
).
text
(
'Читать полностью'
);
})
})
$
(
document
).
ready
(
function
()
{
$
(
"a.show-block"
).
click
(
function
()
{
$
(
$
(
this
).
attr
(
'href'
)).
toggle
(
'slow'
);
return
false
;
});
$
(
"a.show-block"
).
click
(
function
()
{
$
(
$
(
this
).
attr
(
'href'
)).
toggle
(
'slow'
);
return
false
;
});
//2. Получить элемент, к которому необходимо добавить маску
$
(
"#phone"
).
mask
(
"8(999) 999-9999"
);
$
(
"#phone-feed"
).
mask
(
"8(999) 999-9999"
);
...
...
@@ -417,43 +437,43 @@ $(document).ready(function() {
$
(
document
).
ready
(
function
()
{
/* This is basic - uses default settings */
/* This is basic - uses default settings */
$
(
".project-gallery-items"
).
fancybox
();
$
(
".project-gallery-items"
).
fancybox
();
/* Using custom settings */
/* Using custom settings */
$
(
".project-gallery-items"
).
fancybox
({
'hideOnContentClick'
:
true
});
$
(
".project-gallery-items"
).
fancybox
({
'hideOnContentClick'
:
true
});
/* Apply fancybox to multiple items */
/* Apply fancybox to multiple items */
$
(
".project-gallery-items"
).
fancybox
({
'transitionIn'
:
'elastic'
,
'transitionOut'
:
'elastic'
,
'speedIn'
:
600
,
'speedOut'
:
200
,
'overlayShow'
:
false
});
$
(
".project-gallery-items"
).
fancybox
({
'transitionIn'
:
'elastic'
,
'transitionOut'
:
'elastic'
,
'speedIn'
:
600
,
'speedOut'
:
200
,
'overlayShow'
:
false
});
$
(
".project-gallery-items"
).
click
(
function
()
{
$
(
".project-gallery-items"
).
click
(
function
()
{
function
printNumbersTimeout
()
{
var
i
=
1
;
var
timerId
=
setTimeout
(
function
go
()
{
// console.log(i);
if
(
i
<
20
)
setTimeout
(
go
,
100
);
i
++
;
document
.
getElementById
(
'pleasewaitScreen'
).
style
.
display
=
'block'
;
},
4000
);
}
function
printNumbersTimeout
()
{
var
i
=
1
;
var
timerId
=
setTimeout
(
function
go
()
{
// console.log(i);
if
(
i
<
20
)
setTimeout
(
go
,
100
);
i
++
;
document
.
getElementById
(
'pleasewaitScreen'
).
style
.
display
=
'block'
;
},
4000
);
}
// вызов
printNumbersTimeout
();
// вызов
printNumbersTimeout
();
});
$
(
".project-gallery-items"
).
click
(
function
()
{
});
$
(
".project-gallery-items"
).
click
(
function
()
{
function
printNumbersTimeout
()
{
var
i
=
1
;
...
...
@@ -470,9 +490,9 @@ $(document).ready(function() {
});
$
(
".project-gallery-items"
).
swipe
({
$
(
".project-gallery-items"
).
swipe
({
swipe
:
function
(
event
,
direction
,
distance
,
duration
,
fingerCount
,
fingerData
)
{
// alert();
// alert();
function
printNumbersTimeouts
()
{
var
i
=
1
;
...
...
@@ -494,39 +514,39 @@ $(document).ready(function() {
});
//Ставим Куки
function
SetCookie
(
id
,
days
){
var
ws
=
new
Date
();
ws
.
setDate
((
days
-
0
+
ws
.
getDate
()));
document
.
cookie
=
id
+
"; path=/; expires="
+
ws
.
toGMTString
();
var
ws
=
new
Date
();
ws
.
setDate
((
days
-
0
+
ws
.
getDate
()));
document
.
cookie
=
id
+
"; path=/; expires="
+
ws
.
toGMTString
();
}
$
(
window
).
scroll
(
function
()
{
if
(
$
(
this
).
scrollTop
()
>
100
)
{
if
(
$
(
'#upbutton'
).
is
(
':hidden'
))
{
$
(
'#upbutton'
).
css
({
opacity
:
1
}).
fadeIn
(
'slow'
);
}
}
else
{
$
(
'#upbutton'
).
stop
(
true
,
false
).
fadeOut
(
'fast'
);
}
if
(
$
(
this
).
scrollTop
()
>
100
)
{
if
(
$
(
'#upbutton'
).
is
(
':hidden'
))
{
$
(
'#upbutton'
).
css
({
opacity
:
1
}).
fadeIn
(
'slow'
);
}
}
else
{
$
(
'#upbutton'
).
stop
(
true
,
false
).
fadeOut
(
'fast'
);
}
});
$
(
'#upbutton'
).
click
(
function
()
{
$
(
'html, body'
).
stop
().
animate
({
scrollTop
:
0
},
300
);
$
(
'html, body'
).
stop
().
animate
({
scrollTop
:
0
},
300
);
});
$
(
window
).
scroll
(
function
()
{
if
(
$
(
this
).
scrollTop
()
>
-
10
)
{
if
(
$
(
'#call-button'
).
is
(
':hidden'
))
{
$
(
'#call-button'
).
css
({
opacity
:
1
}).
fadeIn
(
'slow'
);
}
}
else
{
$
(
'#call-button'
).
stop
(
true
,
false
).
fadeOut
(
'fast'
);
}
if
(
$
(
this
).
scrollTop
()
>
-
10
)
{
if
(
$
(
'#call-button'
).
is
(
':hidden'
))
{
$
(
'#call-button'
).
css
({
opacity
:
1
}).
fadeIn
(
'slow'
);
}
}
else
{
$
(
'#call-button'
).
stop
(
true
,
false
).
fadeOut
(
'fast'
);
}
});
$
(
'#call-button'
).
click
(
function
()
{
$
(
'html, body'
).
stop
().
animate
({
scrollTop
:
0
},
300
);
$
(
'html, body'
).
stop
().
animate
({
scrollTop
:
0
},
300
);
});
$
(
window
).
scroll
(
function
(){
if
(
$
(
window
).
scrollTop
()
>
100
)
{
$
(
'.header'
).
addClass
(
'scroll'
);
}
else
{
$
(
'.header'
).
removeClass
(
'scroll'
)
}
if
(
$
(
window
).
scrollTop
()
>
100
)
{
$
(
'.header'
).
addClass
(
'scroll'
);
}
else
{
$
(
'.header'
).
removeClass
(
'scroll'
)
}
});
});
...
...
@@ -615,13 +635,13 @@ $(document).ready(function() {
$
(
".filter-element"
).
on
(
'click'
,
function
(){
$
(
'.page-contents'
).
addClass
(
'mobile'
);
// $('.page-content').toggleClass('mobile');
// $('.page-content').toggleClass('mobile');
});
$
(
document
).
on
(
'click'
,
".mobile_menu_phones"
,
function
()
{
var
x
=
document
.
getElementById
(
'myDIV'
);
x
.
classList
.
toggle
(
"mystyle"
);
$
(
".project"
).
toggle
(
"slow"
);
$
(
".project"
).
toggle
(
"slow"
);
// $(this).find(".phone-call").show();
});
...
...
@@ -647,14 +667,3 @@ $(document).on('click', "#close",function() {
window
.
location
.
replace
(
"https://shold.dev5.ashmanov.com/projects/"
);
});
})(
jQuery
);
local/templates/main/footer.php
View file @
e4cc30f
...
...
@@ -33,7 +33,7 @@ if($detect->isMobile() && !$detect->isTablet()){?>
<?
if
(
isset
(
$_COOKIE
[
'mobile'
])
and
$_COOKIE
[
'mobile'
]
==
"no"
)
{
?>
<a
class=
"author"
href=
""
onclick=
"SetCookie('mobile=yes', 0);"
>
На мобильную версию
</a>
<?
}
else
{
?>
<a
class=
"author"
href=
""
onclick=
"SetCookie('mobile=no', 30);"
>
На полную версию
</a>
<?
}
?>
<a
class=
"author"
>
Stroy House
</a>
<span><a
class=
"menus"
>
info@s-h.ru
</a><a
class=
"menu"
>
+7 (495) 645–44–30
</a></span>
<
a
class=
"author"
>
Россия, Москва, Селивёрстов переулок, 1А
</a
>
<
!--<a class="author">Россия, Москва, Селивёрстов переулок, 1А</a>--
>
<?
}
else
{
?>
<?
}
?>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment