Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
NAP-wordpress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marwa Sfari
NAP-wordpress
Commits
12c9ad23
Commit
12c9ad23
authored
Sep 04, 2017
by
Nahla Shiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main js
parent
e05d98ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
589 additions
and
586 deletions
+589
-586
main.js
wp-content/themes/nap/assets/js/main.js
+589
-586
No files found.
wp-content/themes/nap/assets/js/main.js
View file @
12c9ad23
var
initFunction
=
function
(){
var
initFunction
=
function
(){
};
//END init Function
};
//END init Function
$
(
function
(){
//Stop jump tag
$
(
document
).
find
(
'a[href^="#"], .easyzoom a'
).
click
(
function
(
e
){
e
.
preventDefault
();
});
$
(
document
).
find
(
'.contact-form .open-filter'
).
on
(
'click'
,
function
(){
$
(
'.contact-form form'
).
slideToggle
();
$
(
this
).
parent
().
toggleClass
(
'on'
);
checkFilterContactWrapper
();
})
//Open Menu
var
toggles
=
document
.
querySelectorAll
(
".c-hamburger"
);
for
(
var
i
=
toggles
.
length
-
1
;
i
>=
0
;
i
--
)
{
var
toggle
=
toggles
[
i
];
toggleHandler
(
toggle
);
};
function
toggleHandler
(
toggle
)
{
toggle
.
addEventListener
(
"click"
,
function
(
e
)
{
var
nav
=
$
(
'.main-nav .nav-content'
);
//(this.classList.contains("is-active") === true) ? this.classList.remove("is-active") : this.classList.add("is-active");
$
(
".c-hamburger"
).
toggleClass
(
'is-active'
);
if
(
$
(
".c-hamburger"
).
hasClass
(
'is-active'
))
{
//Open menu
nav
.
removeClass
(
'OFF'
).
addClass
(
"ON"
);
nav
.
parent
().
addClass
(
"show-nav transition"
);
$
(
'body'
).
addClass
(
'fixed'
);
if
(
!
(
$
(
'.main-nav .nav-content .footer'
).
length
)){
$
(
'.main-nav .nav-content'
).
append
(
$
(
'footer .footer'
).
clone
(
true
,
true
));
}
$
(
'.right-panel-wrapper'
).
css
(
'z-index'
,
'9999'
);
}
else
{
//Close menu
nav
.
removeClass
(
'ON'
).
addClass
(
"OFF"
);
$
(
'body'
).
removeClass
(
'fixed'
);
nav
.
parent
().
removeClass
(
"show-nav"
);
$
(
'.main-nav .nav-content .footer'
).
remove
();
setTimeout
(
function
(){
$
(
'.right-panel-wrapper'
).
css
(
'z-index'
,
'9999999'
);
},
500
)
}
setTimeout
(
function
(){
checkFooterNavPosition
();
},
330
)
nav
.
stop
().
slideToggle
();
});
}
$
.
fn
.
loadPageContent
=
function
(){
if
(
$
(
'body'
).
find
(
'header'
).
length
>
1
){
(
function
(
$
)
{
$
(
'body'
).
find
(
'header'
).
last
().
parent
().
remove
();
$
(
function
(){
$
(
'.right-panel-wrapper'
).
css
(
'top'
,
$
(
'.nav-header'
).
outerHeight
());
//Stop jump tag
$
(
'html'
).
css
(
'overflow'
,
'auto'
);
$
(
document
).
find
(
'a[href^="#"], .easyzoom a'
).
click
(
function
(
e
){
}
e
.
preventDefault
();
});
$
(
document
).
find
(
'.contact-form .open-filter'
).
on
(
'click'
,
function
(){
$
(
'.contact-form form'
).
slideToggle
();
$
(
this
).
parent
().
toggleClass
(
'on'
);
checkFilterContactWrapper
();
})
//$('.load-page').removeClass('fadeOutUp').addClass('animated fadeInUp')
//Open Menu
$
(
'ul.phototheque'
).
find
(
'li'
).
first
().
addClass
(
'current'
);
var
toggles
=
document
.
querySelectorAll
(
".c-hamburger"
);
$
(
'ul.phototheque'
).
find
(
'li'
).
first
().
find
(
'.subcat'
).
slideDown
(
'slow'
);
for
(
var
i
=
toggles
.
length
-
1
;
i
>=
0
;
i
--
)
{
var
product
=
$
(
'.list-animation article'
);
var
toggle
=
toggles
[
i
];
// TODO: Remove init classes , init attr on html
toggleHandler
(
toggle
);
product
.
find
(
'figure img,ul,h3,.new,.download-btn'
).
attr
(
{
'data-animate'
:
""
,
'data-animation-classes'
:
"animated fadeIn"
}
);
};
animateOnScroll
();
function
toggleHandler
(
toggle
)
{
if
(
$
(
document
).
find
(
'#load-page'
).
children
().
length
){
toggle
.
addEventListener
(
"click"
,
function
(
e
)
{
scrollAnchor
(
"#load-page"
,
true
);
var
nav
=
$
(
'.main-nav .nav-content'
);
elemToScroll
=
$
(
document
).
find
(
"#load-page"
);
//(this.classList.contains("is-active") === true) ? this.classList.remove("is-active") : this.classList.add("is-active");
}
else
{
$
(
".c-hamburger"
).
toggleClass
(
'is-active'
);
elemToScroll
=
$
(
document
).
find
(
".main"
);
if
(
$
(
".c-hamburger"
).
hasClass
(
'is-active'
))
{
//Open menu
scrollAnchor
(
'body'
,
true
);
nav
.
removeClass
(
'OFF'
).
addClass
(
"ON"
);
}
nav
.
parent
().
addClass
(
"show-nav transition"
);
elemToScroll
.
on
(
"scroll"
,{
items
:
"ul.phototheque li .subcat a"
},
onScroll
);
$
(
'body'
).
addClass
(
'fixed'
);
document
.
getElementById
(
'load-page'
).
addEventListener
(
'scroll'
,
window
.
scrollAnimation
.
throttledEvent
,
false
);
if
(
!
(
$
(
'.main-nav .nav-content .footer'
).
length
)){
$
(
document
).
find
(
'ul.phototheque'
).
on
(
'click'
,
' li.parent-cat>a'
,
function
(
e
){
$
(
'.main-nav .nav-content'
).
append
(
$
(
'footer .footer'
).
clone
(
true
,
true
));
var
windowWidth
=
$
(
window
).
width
();
}
e
.
preventDefault
();
$
(
'.right-panel-wrapper'
).
css
(
'z-index'
,
'9999'
);
e
.
stopPropagation
();
}
$
(
'.phototheque>li'
).
removeClass
(
'current'
);
else
{
//Close menu
$
(
this
).
parent
().
addClass
(
'current'
);
nav
.
removeClass
(
'ON'
).
addClass
(
"OFF"
);
//if (windowWidth < 860){
$
(
'body'
).
removeClass
(
'fixed'
);
//$('.nav-phototeque .nav-content>ul>li').addClass('animated fadeOutLeft');
nav
.
parent
().
removeClass
(
"show-nav"
);
//$('.nav-phototeque .nav-content li.current').removeClass('fadeOutLeft').addClass('fadeInRight');
$
(
'.main-nav .nav-content .footer'
).
remove
();
//$('.nav-phototeque .nav-content li.current ul').removeClass('fadeOutLeft').addClass('fadeInRight');
setTimeout
(
function
(){
//$('.nav-phototeque .nav-content li.current ul').css('display','inline-block !important');
$
(
'.right-panel-wrapper'
).
css
(
'z-index'
,
'9999999'
);
//.phototheque-content nav li
},
500
)
//}else{
$
(
'.phototheque .subcat'
).
slideUp
(
'slow'
);
$
(
'.phototheque .off .subcat'
).
slideUp
();
$
(
this
).
parent
().
find
(
'.subcat'
).
slideDown
(
'slow'
);
//}
});
}
setTimeout
(
function
(){
setTimeout
(
function
(){
$
(
'.gallery-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated visible-elem fadeInUp'
);
checkFooterNavPosition
();
},
0
)
},
330
)
}
nav
.
stop
().
slideToggle
();
function
appendLoading
()
{
});
$
(
'.load-page'
).
append
(
$
(
'#loading-container-subpage'
).
clone
());
}
$
(
'#loading-container-subpage'
).
show
();
$
.
fn
.
loadPageContent
=
function
(){
}
//load content page on left Panel
$
(
document
).
find
(
'.to-slide'
).
on
(
'click'
,
'a'
,
function
(
e
){
$
(
'html'
).
css
(
'overflow'
,
'hidden'
);
appendLoading
();
e
.
preventDefault
();
var
link
=
$
(
this
).
attr
(
"href"
),
windowWidth
=
$
(
window
).
width
();
$
(
'.load-page'
).
parent
().
addClass
(
'active'
);
history
.
pushState
(
null
,
null
,
link
);
$
(
'.load-page'
).
load
(
link
,
function
(){
console
.
log
(
'load page'
);
$
.
fn
.
loadPageContent
();
$
(
'#loading-container-subpage'
).
hide
();
});
if
(
windowWidth
<
860
){
$
(
".c-hamburger"
).
trigger
(
"click"
);
}
});
var
div
=
$
(
'.nav-content'
);
$
(
'.footer-home-content'
).
on
(
'click'
,
'.home-down:not(.scrolled)'
,
function
(
e
){
TweenMax
.
killTweensOf
(
'.nav-content'
);
var
mainHeight
=
$
(
'.main'
).
outerHeight
();
$
(
this
).
addClass
(
'scrolled'
);
if
(
!
(
$
(
'.footer-home-content .nav-content'
).
length
)){
$
(
'.footer-home-content'
).
append
(
$
(
'.nav-content'
).
clone
());
$
(
'.main'
).
outerHeight
(
mainHeight
+
$
(
'.footer-home-content'
).
outerHeight
());
$
(
'.home-down-wrapper'
).
css
(
'top'
,
-
(
$
(
'.home-down-wrapper'
).
outerHeight
()));
$
(
'.home-down'
).
css
(
'top'
,
-
(
$
(
'.home-down'
).
outerHeight
()));
//$('.home-down-wrapper').css('top','121px');
}
//scroll to bottom
$
(
'body'
).
animate
({
scrollTop
:
div
.
outerHeight
()
},
1000
,
'swing'
,
function
(){
});
if
(
$
(
'body'
).
find
(
'header'
).
length
>
1
){
$
(
'body'
).
find
(
'header'
).
last
().
parent
().
remove
();
$
(
'.right-panel-wrapper'
).
css
(
'top'
,
$
(
'.nav-header'
).
outerHeight
());
$
(
'html'
).
css
(
'overflow'
,
'auto'
);
}
}).
on
(
'click'
,
'.scrolled'
,
function
(){
//$('.load-page').removeClass('fadeOutUp').addClass('animated fadeInUp')
$
(
this
).
removeClass
(
'scrolled'
);
$
(
'ul.phototheque'
).
find
(
'li'
).
first
().
addClass
(
'current'
);
$
(
"html, body"
).
animate
({
scrollTop
:
0
},
"slow"
);
$
(
'ul.phototheque'
).
find
(
'li'
).
first
().
find
(
'.subcat'
).
slideDown
(
'slow'
);
setTimeout
(
function
(){
var
product
=
$
(
'.list-animation article'
);
$
(
'.footer-home-content'
).
find
(
'.nav-content'
).
remove
();
// TODO: Remove init classes , init attr on html
$
(
'.home-down-wrapper'
).
css
(
'top'
,
'initial'
);
product
.
find
(
'figure img,ul,h3,.new,.download-btn'
).
attr
(
{
'data-animate'
:
""
,
'data-animation-classes'
:
"animated fadeIn"
}
);
$
(
'.footer-home-content'
).
removeClass
(
'fixed'
);
animateOnScroll
();
$
(
'.main'
).
height
(
$
(
window
).
innerHeight
());
if
(
$
(
document
).
find
(
'#load-page'
).
children
().
length
){
},
600
)
scrollAnchor
(
"#load-page"
,
true
);
return
false
;
elemToScroll
=
$
(
document
).
find
(
"#load-page"
);
});
}
else
{
//Get file name of uploaded file
elemToScroll
=
$
(
document
).
find
(
".main"
);
$
(
'#file-p'
).
on
(
'change'
,
function
(
e
){
scrollAnchor
(
'body'
,
true
);
var
fileName
=
e
.
target
.
files
[
0
].
name
;
}
$
(
'.upload-btn'
).
after
(
$
(
'<p class="loaded-file">'
+
fileName
+
'</p>'
));
elemToScroll
.
on
(
"scroll"
,{
items
:
"ul.phototheque li .subcat a"
},
onScroll
);
})
document
.
getElementById
(
'load-page'
).
addEventListener
(
'scroll'
,
window
.
scrollAnimation
.
throttledEvent
,
false
);
//END get file name
$
(
document
).
find
(
'ul.phototheque'
).
on
(
'click'
,
' li.parent-cat>a'
,
function
(
e
){
//END load content page on left Panel
var
windowWidth
=
$
(
window
).
width
();
$
(
document
).
on
(
'click'
,
'.int-link'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
'.phototheque>li'
).
removeClass
(
'current'
);
$
(
this
).
parent
().
addClass
(
'current'
);
//if (windowWidth < 860){
//$('.nav-phototeque .nav-content>ul>li').addClass('animated fadeOutLeft');
//$('.nav-phototeque .nav-content li.current').removeClass('fadeOutLeft').addClass('fadeInRight');
//$('.nav-phototeque .nav-content li.current ul').removeClass('fadeOutLeft').addClass('fadeInRight');
//$('.nav-phototeque .nav-content li.current ul').css('display','inline-block !important');
//.phototheque-content nav li
//}else{
$
(
'.phototheque .subcat'
).
slideUp
(
'slow'
);
$
(
'.phototheque .off .subcat'
).
slideUp
();
$
(
this
).
parent
().
find
(
'.subcat'
).
slideDown
(
'slow'
);
//}
});
setTimeout
(
function
(){
$
(
'.gallery-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated visible-elem fadeInUp'
);
},
0
)
}
function
appendLoading
()
{
$
(
'.load-page'
).
append
(
$
(
'#loading-container-subpage'
).
clone
());
$
(
'#loading-container-subpage'
).
show
();
}
//load content page on left Panel
$
(
document
).
find
(
'.to-slide'
).
on
(
'click'
,
'a'
,
function
(
e
){
$
(
'html'
).
css
(
'overflow'
,
'hidden'
);
appendLoading
();
e
.
preventDefault
();
var
link
=
$
(
this
).
attr
(
"href"
),
windowWidth
=
$
(
window
).
width
();
$
(
'.load-page'
).
parent
().
addClass
(
'active'
);
history
.
pushState
(
null
,
null
,
link
);
$
(
'.load-page'
).
load
(
link
,
function
(){
console
.
log
(
'load page'
);
$
.
fn
.
loadPageContent
();
$
(
'#loading-container-subpage'
).
hide
();
});
if
(
windowWidth
<
860
){
$
(
".c-hamburger"
).
trigger
(
"click"
);
}
});
var
div
=
$
(
'.nav-content'
);
$
(
'.footer-home-content'
).
on
(
'click'
,
'.home-down:not(.scrolled)'
,
function
(
e
){
TweenMax
.
killTweensOf
(
'.nav-content'
);
var
mainHeight
=
$
(
'.main'
).
outerHeight
();
$
(
this
).
addClass
(
'scrolled'
);
if
(
!
(
$
(
'.footer-home-content .nav-content'
).
length
)){
$
(
'.footer-home-content'
).
append
(
$
(
'.nav-content'
).
clone
());
$
(
'.main'
).
outerHeight
(
mainHeight
+
$
(
'.footer-home-content'
).
outerHeight
());
$
(
'.home-down-wrapper'
).
css
(
'top'
,
-
(
$
(
'.home-down-wrapper'
).
outerHeight
()));
$
(
'.home-down'
).
css
(
'top'
,
-
(
$
(
'.home-down'
).
outerHeight
()));
//$('.home-down-wrapper').css('top','121px');
}
//scroll to bottom
$
(
'body'
).
animate
({
scrollTop
:
div
.
outerHeight
()
},
1000
,
'swing'
,
function
(){
});
}).
on
(
'click'
,
'.scrolled'
,
function
(){
$
(
this
).
removeClass
(
'scrolled'
);
$
(
"html, body"
).
animate
({
scrollTop
:
0
},
"slow"
);
setTimeout
(
function
(){
$
(
'.footer-home-content'
).
find
(
'.nav-content'
).
remove
();
$
(
'.home-down-wrapper'
).
css
(
'top'
,
'initial'
);
$
(
'.footer-home-content'
).
removeClass
(
'fixed'
);
$
(
'.main'
).
height
(
$
(
window
).
innerHeight
());
},
600
)
return
false
;
});
//Get file name of uploaded file
$
(
'#file-p'
).
on
(
'change'
,
function
(
e
){
var
fileName
=
e
.
target
.
files
[
0
].
name
;
$
(
'.upload-btn'
).
after
(
$
(
'<p class="loaded-file">'
+
fileName
+
'</p>'
));
})
//END get file name
//END load content page on left Panel
$
(
document
).
on
(
'click'
,
'.int-link'
,
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
$
(
'.load-page'
).
parent
().
removeClass
(
'active'
);
$
(
'.load-page'
).
parent
().
removeClass
(
'active'
);
history
.
pushState
(
null
,
null
,
$
(
this
).
find
(
'a'
).
attr
(
'href'
));
history
.
pushState
(
null
,
null
,
$
(
this
).
find
(
'a'
).
attr
(
'href'
));
$
(
'html'
).
css
(
'overflow'
,
'auto'
);
$
(
'html'
).
css
(
'overflow'
,
'auto'
);
tlProduct
.
reverse
();
tlProduct
.
reverse
();
//$('.load-page').removeClass('fadeInUp').addClass('animated fadeOutUp');
//$('.load-page').removeClass('fadeInUp').addClass('animated fadeOutUp');
});
});
$
(
document
).
on
(
'click'
,
'.acces li .login, .login-user'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'.acces li .login, .login-user'
,
function
(
e
){
e
.
stopImmediatePropagation
();
e
.
stopImmediatePropagation
();
var
windowWidth
=
$
(
window
).
width
();
var
windowWidth
=
$
(
window
).
width
();
$
(
'.popup-container'
).
fadeIn
();
$
(
'.popup-container'
).
fadeIn
();
if
(
windowWidth
<
860
){
if
(
windowWidth
<
860
){
$
(
".c-hamburger"
).
trigger
(
"click"
);
$
(
".c-hamburger"
).
trigger
(
"click"
);
}
}
// $('#user_login').attr('placeholder', 'Identifiant');
// $('#user_login').attr('placeholder', 'Identifiant');
// $('#user_pass').attr('placeholder', 'Mot de passe');
// $('#user_pass').attr('placeholder', 'Mot de passe');
$
(
'.popup-first'
).
removeClass
(
'fadeOutDown '
).
addClass
(
'animated visible-elem pulse'
);
$
(
'.popup-first'
).
removeClass
(
'fadeOutDown '
).
addClass
(
'animated visible-elem pulse'
);
});
});
//Close popup
//Close popup
$
(
'.popup-first .close-btn'
).
click
(
$
(
'.popup-first .close-btn'
).
click
(
function
(){
function
(){
$
(
'.popup-first'
).
removeClass
(
'visible-elem pulse'
).
addClass
(
'fadeOutDown'
);
$
(
'.popup-first'
).
removeClass
(
'visible-elem pulse'
).
addClass
(
'fadeOutDown'
);
setTimeout
(
function
(){
setTimeout
(
function
(){
$
(
'.popup-container'
).
fadeOut
(
'slow'
);
$
(
'.popup-container'
).
fadeOut
(
'slow'
);
},
0
);
},
0
);
});
});
checkWhiteColor
=
function
(
color
)
{
checkWhiteColor
=
function
(
color
)
{
var
white
=
[
"#fff"
,
"#ffffff"
,
"white"
];
var
white
=
[
"#fff"
,
"#ffffff"
,
"white"
];
if
(
$
.
inArray
(
color
,
white
)
!=
-
1
){
if
(
$
.
inArray
(
color
,
white
)
!=
-
1
){
color
=
'#999999'
;
color
=
'#999999'
;
}
return
color
;
}
}
//checkWhiteColor = function(item) {
return
color
;
$
.
fn
.
setColorToWhite
=
function
(
item
){
}
//$('.list-wrapper .color-list')
//checkWhiteColor = function(item) {
$
(
this
).
each
(
function
(){
$
.
fn
.
setColorToWhite
=
function
(
item
){
//$('.list-wrapper .color-list')
$
(
this
).
each
(
function
(){
elem
=
item
?
$
(
this
).
find
(
item
)
:
$
(
this
),
elem
=
item
?
$
(
this
).
find
(
item
)
:
$
(
this
),
isWhite
=
checkWhiteColor
(
elem
.
data
(
'color'
));
isWhite
=
checkWhiteColor
(
elem
.
data
(
'color'
));
if
(
isWhite
!=
elem
.
data
(
'color'
)){
if
(
isWhite
!=
elem
.
data
(
'color'
)){
elem
.
addClass
(
'is-white'
);
elem
.
addClass
(
'is-white'
);
}
}
});
});
}
}
$
.
fn
.
setBgColorList
=
function
(){
$
.
fn
.
setBgColorList
=
function
(){
$
(
this
).
each
(
function
(){
$
(
this
).
each
(
function
(){
$
(
this
).
css
({
$
(
this
).
css
({
'background-color'
:
$
(
this
).
data
(
'color'
),
'background-color'
:
$
(
this
).
data
(
'color'
),
'border'
:
'1px solid'
+
checkWhiteColor
(
$
(
this
).
data
(
'color'
))
'border'
:
'1px solid'
+
checkWhiteColor
(
$
(
this
).
data
(
'color'
))
})
})
})
})
}
}
$
.
fn
.
showProductListColors
=
function
(){
$
.
fn
.
showProductListColors
=
function
(){
var
articleWrapper
=
$
(
this
),
var
articleWrapper
=
$
(
this
),
firstPellet
=
articleWrapper
.
find
(
'li'
).
first
(),
firstPellet
=
articleWrapper
.
find
(
'li'
).
first
(),
articleColor
=
checkWhiteColor
(
firstPellet
.
data
(
'color'
));
articleColor
=
checkWhiteColor
(
firstPellet
.
data
(
'color'
));
articleLink
=
firstPellet
.
data
(
'link'
);
articleLink
=
firstPellet
.
data
(
'link'
);
articleWrapper
.
find
(
'.article-bg'
).
css
(
'background-color'
,
articleColor
);
articleWrapper
.
find
(
'.article-bg'
).
css
(
'background-color'
,
articleColor
);
articleWrapper
.
find
(
'figure img'
).
attr
({
articleWrapper
.
find
(
'figure img'
).
attr
({
'src'
:
firstPellet
.
data
(
'image'
),
'src'
:
firstPellet
.
data
(
'image'
),
'data-link'
:
articleLink
'data-link'
:
articleLink
});
$
(
'.product-list article ul li'
).
setBgColorList
();
}
//FadeIn Image on home page
$
.
fn
.
fadeImage
=
function
(){
var
srcImage
=
$
(
this
).
data
(
'img'
);
if
(
srcImage
==
'undefined'
||
!
srcImage
)
{
srcImage
=
$
(
'#home .img-wrapper'
).
data
(
'defaultimg'
);
}
$
(
'.img-wrapper'
).
removeClass
(
'animate'
);
$
(
'.img-wrapper'
).
stop
().
animate
({
opacity
:
0
,
},
500
,
function
()
{});
$
(
'.img-wrapper'
).
stop
().
animate
({
opacity
:
1
,
},
500
,
function
()
{
$
(
'.img-wrapper'
).
addClass
(
'animate'
);
$
(
'.img-wrapper'
).
css
({
'background-image'
:
"url("
+
srcImage
+
")"
,
});
});
});
$
(
'.product-list article ul li'
).
setBgColorList
();
}
}
$
.
fn
.
showSubmenu
=
function
(){
//FadeIn Image on home page
var
currentPage
=
$
(
'.container'
).
data
(
'page'
);
$
.
fn
.
fadeImage
=
function
(){
$
(
'header nav'
).
find
(
'ul li'
).
find
(
"[data-page="
+
currentPage
+
"]"
).
slideDown
();
var
srcImage
=
$
(
this
).
data
(
'img'
);
$
(
'header nav'
).
find
(
'ul'
).
find
(
"[data-page="
+
currentPage
+
"]"
).
addClass
(
'current'
);
if
(
srcImage
==
'undefined'
||
!
srcImage
)
}
{
//animate menu nav
srcImage
=
$
(
'#home .img-wrapper'
).
data
(
'defaultimg'
);
$
.
fn
.
open_nav
=
function
(){
TweenLite
.
set
(
".nav-content"
,
{
visibility
:
"visible"
});
var
tl
=
new
TimelineMax
();
tl
.
staggerFrom
(
'.nav-content >ul>li, .phototheque-content nav >ul > li'
,
0.5
,{
opacity
:
0
,
x
:
200
},
0.1
,
0.5
);
tl
.
staggerFromTo
(
'nav ul ul li '
,
0.5
,{
opacity
:
0
,
x
:
200
},{
opacity
:
1
,
x
:
0
},
0.1
,
1.2
);
tl
.
fromTo
(
'.news-btn'
,
0.9
,{
autoAlpha
:
0
,
scale
:
'0'
},{
autoAlpha
:
1
,
scale
:
'1'
},
0
);
}
$
.
fn
.
openPanelAnimation
=
function
(){
$
(
this
).
addClass
(
'animated slideInRight'
).
removeClass
(
'slideOutRight'
).
show
();
}
$
.
fn
.
closePanelAnimation
=
function
(){
$
(
this
).
removeClass
(
'slideInRight'
).
addClass
(
'slideOutRight'
);
}
}
$
.
fn
.
open_news
=
function
(){
$
(
'.img-wrapper'
).
removeClass
(
'animate'
);
$
(
this
).
on
(
'click'
,
function
(){
$
(
'.img-wrapper'
).
stop
().
animate
({
opacity
:
0
,
},
500
,
function
()
{});
$
(
'.img-wrapper'
).
stop
().
animate
({
opacity
:
1
,
},
500
,
function
()
{
$
(
'.img-wrapper'
).
addClass
(
'animate'
);
$
(
'.img-wrapper'
).
css
({
'background-image'
:
"url("
+
srcImage
+
")"
,
});
});
}
$
.
fn
.
showSubmenu
=
function
(){
var
currentPage
=
$
(
'.container'
).
data
(
'page'
);
$
(
'header nav'
).
find
(
'ul li'
).
find
(
"[data-page="
+
currentPage
+
"]"
).
slideDown
();
$
(
'header nav'
).
find
(
'ul'
).
find
(
"[data-page="
+
currentPage
+
"]"
).
addClass
(
'current'
);
}
//animate menu nav
$
.
fn
.
open_nav
=
function
(){
TweenLite
.
set
(
".nav-content"
,
{
visibility
:
"visible"
});
var
tl
=
new
TimelineMax
();
tl
.
staggerFrom
(
'.nav-content >ul>li, .phototheque-content nav >ul > li'
,
0.5
,{
opacity
:
0
,
x
:
200
},
0.1
,
0.5
);
tl
.
staggerFromTo
(
'nav ul ul li '
,
0.5
,{
opacity
:
0
,
x
:
200
},{
opacity
:
1
,
x
:
0
},
0.1
,
1.2
);
tl
.
fromTo
(
'.news-btn'
,
0.9
,{
autoAlpha
:
0
,
scale
:
'0'
},{
autoAlpha
:
1
,
scale
:
'1'
},
0
);
}
$
.
fn
.
openPanelAnimation
=
function
(){
$
(
this
).
addClass
(
'animated slideInRight'
).
removeClass
(
'slideOutRight'
).
show
();
}
$
.
fn
.
closePanelAnimation
=
function
(){
$
(
this
).
removeClass
(
'slideInRight'
).
addClass
(
'slideOutRight'
);
}
$
.
fn
.
open_news
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
$
(
'.news-wrapper'
).
openPanelAnimation
();
$
(
'.news-wrapper'
).
openPanelAnimation
();
})
})
}
}
$
.
fn
.
close_news
=
function
(){
$
.
fn
.
close_news
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
$
(
this
).
on
(
'click'
,
function
(){
$
(
'.news-wrapper'
).
closePanelAnimation
();
$
(
'.news-wrapper'
).
closePanelAnimation
();
})
})
}
}
$
.
fn
.
reinitFilter
=
function
(){
$
.
fn
.
reinitFilter
=
function
(){
$
(
this
).
removeClass
(
'selected-filter selected'
);
$
(
this
).
removeClass
(
'selected-filter selected'
);
}
}
$
.
fn
.
open_filter
=
function
(){
$
.
fn
.
open_filter
=
function
(){
$
(
this
).
on
(
'click'
,
'.filter-btn'
,
function
(){
$
(
this
).
on
(
'click'
,
'.filter-btn'
,
function
(){
var
filterW
=
$
(
'.filter-list'
).
outerWidth
(),
var
filterW
=
$
(
'.filter-list'
).
outerWidth
(),
mainW
=
$
(
'.main-nav'
).
outerWidth
(),
mainW
=
$
(
'.main-nav'
).
outerWidth
(),
filterBtn
=
$
(
'.filter-btn .btn-container'
).
outerWidth
();
filterBtn
=
$
(
'.filter-btn .btn-container'
).
outerWidth
();
...
@@ -288,137 +290,137 @@ $.fn.loadPageContent = function(){
...
@@ -288,137 +290,137 @@ $.fn.loadPageContent = function(){
//tl.fromTo('#slides',0.5,{opacity:1},{opacity:0},0);
//tl.fromTo('#slides',0.5,{opacity:1},{opacity:0},0);
//tl.fromTo('.nav-slider',0.5,{opacity:1},{opacity:0},0);
//tl.fromTo('.nav-slider',0.5,{opacity:1},{opacity:0},0);
}).
on
(
'click'
,
'.close-btn'
,
function
(){
}).
on
(
'click'
,
'.close-btn'
,
function
(){
tlFilter
.
reverse
();
tlFilter
.
reverse
();
}).
on
(
'click'
,
'.filter-bloc .header'
,
function
(){
}).
on
(
'click'
,
'.filter-bloc .header'
,
function
(){
var
$this
=
$
(
this
).
parent
();
var
$this
=
$
(
this
).
parent
();
if
(
!
$this
.
hasClass
(
'active'
)){
if
(
!
$this
.
hasClass
(
'active'
)){
$
(
'.filter-bloc'
).
removeClass
(
'active'
);
$
(
'.filter-bloc'
).
removeClass
(
'active'
);
$this
.
addClass
(
'active'
);
$this
.
addClass
(
'active'
);
$
(
'.filter-bloc .bloc-content'
).
slideUp
(
'slow'
);
$
(
'.filter-bloc .bloc-content'
).
slideUp
(
'slow'
);
$this
.
find
(
'.bloc-content'
).
slideDown
(
'slow'
);
$this
.
find
(
'.bloc-content'
).
slideDown
(
'slow'
);
$
(
'.commercial'
).
slideUp
(
'slow'
);
$
(
'.commercial'
).
slideUp
(
'slow'
);
}
else
{
}
else
{
$this
.
removeClass
(
'active'
);
$this
.
removeClass
(
'active'
);
$this
.
find
(
'.bloc-content'
).
slideUp
(
'slow'
);
$this
.
find
(
'.bloc-content'
).
slideUp
(
'slow'
);
}
}
}).
on
(
'click'
,
'.filter-bloc li:not(.disabled,.reinit)'
,
function
(
e
){
}).
on
(
'click'
,
'.filter-bloc li:not(.disabled,.reinit)'
,
function
(
e
){
e
.
stopPropagation
();
e
.
stopPropagation
();
$
(
this
).
toggleClass
(
'selected'
);
$
(
this
).
toggleClass
(
'selected'
);
var
e
=
$
(
this
).
parent
().
find
(
'.selected'
).
length
,
var
e
=
$
(
this
).
parent
().
find
(
'.selected'
).
length
,
parentFilter
=
$
(
this
).
parent
().
parent
().
parent
();
parentFilter
=
$
(
this
).
parent
().
parent
().
parent
();
if
(
e
){
if
(
e
){
parentFilter
.
addClass
(
'selected-filter'
);
parentFilter
.
addClass
(
'selected-filter'
);
$
(
'.filter-btn'
).
addClass
(
'selected-filter'
);
$
(
'.filter-btn'
).
addClass
(
'selected-filter'
);
}
else
{
}
else
{
parentFilter
.
removeClass
(
'selected-filter'
)
;
parentFilter
.
removeClass
(
'selected-filter'
)
;
$
(
'.filter-btn'
).
removeClass
(
'selected-filter'
);
$
(
'.filter-btn'
).
removeClass
(
'selected-filter'
);
}
}
//e ? parentFilter.addClass('selected-filter') : parentFilter.removeClass('selected-filter') ;
//e ? parentFilter.addClass('selected-filter') : parentFilter.removeClass('selected-filter') ;
}).
on
(
'click'
,
'.filter-bloc .reinit'
,
function
(){
}).
on
(
'click'
,
'.filter-bloc .reinit'
,
function
(){
selector
=
$
(
this
).
parent
().
parent
();
selector
=
$
(
this
).
parent
().
parent
();
selector
.
parent
().
reinitFilter
();
selector
.
parent
().
reinitFilter
();
selector
.
find
(
'li'
).
reinitFilter
();
selector
.
find
(
'li'
).
reinitFilter
();
}).
on
(
'click'
,
'.reinit-all'
,
function
(){
}).
on
(
'click'
,
'.reinit-all'
,
function
(){
$
(
'.filter-bloc , .filter-bloc li'
).
reinitFilter
();
$
(
'.filter-bloc , .filter-bloc li'
).
reinitFilter
();
$
(
'.filter-btn'
).
removeClass
(
'selected-filter'
);
$
(
'.filter-btn'
).
removeClass
(
'selected-filter'
);
});
});
}
}
$
.
fn
.
checkSelectedFilter
=
function
(){
$
.
fn
.
checkSelectedFilter
=
function
(){
if
(
$
(
'.filter-content .filter-bloc.selected-filter'
).
length
){
if
(
$
(
'.filter-content .filter-bloc.selected-filter'
).
length
){
$
(
'.filter-btn'
).
addClass
(
'selected-filter'
);
$
(
'.filter-btn'
).
addClass
(
'selected-filter'
);
}
}
}
}
$
.
fn
.
changeProductImageBg
=
function
(){
$
.
fn
.
changeProductImageBg
=
function
(){
var
var
selectedColor
=
checkWhiteColor
(
$
(
this
).
data
(
"color"
)),
selectedColor
=
checkWhiteColor
(
$
(
this
).
data
(
"color"
)),
selectedImage
=
$
(
this
).
data
(
"image"
),
selectedImage
=
$
(
this
).
data
(
"image"
),
linkProduct
=
$
(
this
).
data
(
"link"
),
linkProduct
=
$
(
this
).
data
(
"link"
),
tl
=
new
TimelineMax
(),
tl
=
new
TimelineMax
(),
container
=
$
(
this
).
parent
().
parent
();
container
=
$
(
this
).
parent
().
parent
();
container
.
find
(
'.article-bg'
).
css
({
"background-color"
:
selectedColor
,
opacity
:
'0.1'
});
container
.
find
(
'.article-bg'
).
css
({
"background-color"
:
selectedColor
,
opacity
:
'0.1'
});
container
.
find
(
'img'
).
attr
({
'src'
:
selectedImage
,
'data-link'
:
linkProduct
});
container
.
find
(
'img'
).
attr
({
'src'
:
selectedImage
,
'data-link'
:
linkProduct
});
tl
.
fromTo
(
container
.
find
(
'img'
),
1
,{
opacity
:
0
,
visibility
:
"hidden"
},{
opacity
:
1
,
visibility
:
"visible"
},
0
);
tl
.
fromTo
(
container
.
find
(
'img'
),
1
,{
opacity
:
0
,
visibility
:
"hidden"
},{
opacity
:
1
,
visibility
:
"visible"
},
0
);
}
}
$
.
fn
.
animatePageScroll
=
function
(
element
,
duration
)
{
$
.
fn
.
animatePageScroll
=
function
(
element
,
duration
)
{
return
$
(
this
).
fromTo
(
element
,
duration
,
return
$
(
this
).
fromTo
(
element
,
duration
,
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
0.7
);
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
0.7
);
}
}
$
.
fn
.
fullpageSlide
=
function
(){
$
.
fn
.
fullpageSlide
=
function
(){
var
var
timeout
=
1.7
,
timeout
=
1.7
,
duration
=
1.2
;
duration
=
1.2
;
setTimeout
(
function
(){
setTimeout
(
function
(){
$
(
'.moveDown'
).
removeClass
(
'hidden-elem'
).
addClass
(
'visible-elem animated rollIn'
);
$
(
'.moveDown'
).
removeClass
(
'hidden-elem'
).
addClass
(
'visible-elem animated rollIn'
);
},
2000
);
},
2000
);
$
(
"#fullpage .section"
).
first
().
addClass
(
'first'
);
$
(
"#fullpage .section"
).
first
().
addClass
(
'first'
);
$
(
this
).
fullpage
({
$
(
this
).
fullpage
({
verticalCentered
:
false
,
verticalCentered
:
false
,
css3
:
false
,
css3
:
false
,
scrollingSpeed
:
1500
,
scrollingSpeed
:
1500
,
lazyLoading
:
false
,
lazyLoading
:
false
,
fixedElements
:
'footer'
,
fixedElements
:
'footer'
,
controlArrows
:
true
,
controlArrows
:
true
,
fitToSectionDelay
:
800000
,
fitToSectionDelay
:
800000
,
fadingEffect
:
true
,
fadingEffect
:
true
,
normalScrollElements
:
".section .bloc"
,
normalScrollElements
:
".section .bloc"
,
afterLoad
:
function
(
anchor
,
index
){
afterLoad
:
function
(
anchor
,
index
){
tl1
=
new
TimelineMax
();
tl1
=
new
TimelineMax
();
var
firstSection
=
$
(
"#fullpage .section.first"
);
var
firstSection
=
$
(
"#fullpage .section.first"
);
//tl1.animatePageScroll(firstSection,duration);
//tl1.animatePageScroll(firstSection,duration);
//console.log(animation);
//console.log(animation);
tl1
.
fromTo
(
firstSection
.
find
(
'.bloc .header-bloc'
),
1.5
,
tl1
.
fromTo
(
firstSection
.
find
(
'.bloc .header-bloc'
),
1.5
,
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
timeout
);
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
timeout
);
tl1
.
fromTo
(
firstSection
.
find
(
'.bloc .desc-content'
),
1
,
tl1
.
fromTo
(
firstSection
.
find
(
'.bloc .desc-content'
),
1
,
{
opacity
:
0
,
visibility
:
"hidden"
,
marginLeft
:
'-100px'
},
{
opacity
:
0
,
visibility
:
"hidden"
,
marginLeft
:
'-100px'
},
{
opacity
:
1
,
visibility
:
"visible"
,
marginLeft
:
'0px'
},
timeout
);
{
opacity
:
1
,
visibility
:
"visible"
,
marginLeft
:
'0px'
},
timeout
);
},
},
onLeave
:
function
(
index
,
nextIndex
,
direction
){
onLeave
:
function
(
index
,
nextIndex
,
direction
){
var
var
activeSection
=
$
(
this
),
activeSection
=
$
(
this
),
nextSection
=
$
(
this
).
next
();
nextSection
=
$
(
this
).
next
();
tl2
=
new
TimelineMax
();
tl2
=
new
TimelineMax
();
timeout
=
0.7
;
timeout
=
0.7
;
activeSection
.
removeClass
(
'first'
);
activeSection
.
removeClass
(
'first'
);
if
(
nextIndex
===
$
(
'#fullpage .section'
).
length
){
if
(
nextIndex
===
$
(
'#fullpage .section'
).
length
){
$
(
'.moveDown'
).
removeClass
(
'hidden-elem'
).
addClass
(
'visible-elem animated rollOut'
);
$
(
'.moveDown'
).
removeClass
(
'hidden-elem'
).
addClass
(
'visible-elem animated rollOut'
);
}
else
{
}
else
{
$
(
'.moveDown'
).
removeClass
(
'rollOut'
);
$
(
'.moveDown'
).
removeClass
(
'rollOut'
);
}
}
tl2
.
fromTo
(
nextSection
.
find
(
'.bloc .header-bloc'
),
1.5
,
tl2
.
fromTo
(
nextSection
.
find
(
'.bloc .header-bloc'
),
1.5
,
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
timeout
);
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
timeout
);
tl2
.
fromTo
(
nextSection
.
find
(
'.bloc .desc-content'
),
1
,
tl2
.
fromTo
(
nextSection
.
find
(
'.bloc .desc-content'
),
1
,
{
opacity
:
0
,
visibility
:
"hidden"
,
marginLeft
:
'-100px'
},
{
opacity
:
0
,
visibility
:
"hidden"
,
marginLeft
:
'-100px'
},
{
opacity
:
1
,
visibility
:
"visible"
,
marginLeft
:
'0px'
},
timeout
);
{
opacity
:
1
,
visibility
:
"visible"
,
marginLeft
:
'0px'
},
timeout
);
if
(
direction
===
'up'
)
{
if
(
direction
===
'up'
)
{
tl3
=
new
TimelineMax
();
tl3
=
new
TimelineMax
();
prevSection
=
$
(
this
).
prev
();
prevSection
=
$
(
this
).
prev
();
tl3
.
fromTo
(
prevSection
.
find
(
'.bloc .header-bloc'
),
1.5
,
tl3
.
fromTo
(
prevSection
.
find
(
'.bloc .header-bloc'
),
1.5
,
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
timeout
);
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
timeout
);
tl3
.
fromTo
(
prevSection
.
find
(
'.bloc .desc-content'
),
1
,
tl3
.
fromTo
(
prevSection
.
find
(
'.bloc .desc-content'
),
1
,
{
opacity
:
0
,
visibility
:
"hidden"
,
marginLeft
:
'-100px'
},
{
opacity
:
0
,
visibility
:
"hidden"
,
marginLeft
:
'-100px'
},
{
opacity
:
1
,
visibility
:
"visible"
,
marginLeft
:
'0px'
},
timeout
);
{
opacity
:
1
,
visibility
:
"visible"
,
marginLeft
:
'0px'
},
timeout
);
}
}
},
},
});
});
$
(
document
).
on
(
'click'
,
'.moveDown'
,
function
(){
$
(
document
).
on
(
'click'
,
'.moveDown'
,
function
(){
$
.
fn
.
fullpage
.
moveSectionDown
();
$
.
fn
.
fullpage
.
moveSectionDown
();
});
});
}
}
$
.
fn
.
getMenuBg
=
function
(){
$
.
fn
.
getMenuBg
=
function
(){
var
imgSrc
=
$
(
'header .nav-content > ul'
).
find
(
' > li.current'
).
data
(
'img'
),
var
imgSrc
=
$
(
'header .nav-content > ul'
).
find
(
' > li.current'
).
data
(
'img'
),
windowWidth
=
$
(
window
).
width
(),
windowWidth
=
$
(
window
).
width
(),
navwWidth
=
$
(
'.nav-wrapper'
).
width
(),
navwWidth
=
$
(
'.nav-wrapper'
).
width
(),
navHeight
=
$
(
'.nav-header'
).
outerHeight
();
navHeight
=
$
(
'.nav-header'
).
outerHeight
();
$
(
'.container-bg'
).
css
({
$
(
'.container-bg'
).
css
({
'background-image'
:
"url("
+
imgSrc
+
")"
,
'background-image'
:
"url("
+
imgSrc
+
")"
,
'opacity'
:
0
,
'opacity'
:
0
,
})
})
tlBg
=
new
TimelineMax
();
tlBg
=
new
TimelineMax
();
tlBg
.
to
(
'.container-bg'
,
0.9
,{
opacity
:
1
},
0.5
);
tlBg
.
to
(
'.container-bg'
,
0.9
,{
opacity
:
1
},
0.5
);
tlBg
.
from
(
'.full-slides'
,
1.2
,{
opacity
:
0
,
width
:
0
},
0.4
);
tlBg
.
from
(
'.full-slides'
,
1.2
,{
opacity
:
0
,
width
:
0
},
0.4
);
...
@@ -432,125 +434,125 @@ $.fn.appendMap = function(){
...
@@ -432,125 +434,125 @@ $.fn.appendMap = function(){
this
.
append
(
$
(
'.map'
));
this
.
append
(
$
(
'.map'
));
}
}
setTimeout
(
function
(){
setTimeout
(
function
(){
initMap
();
initMap
();
},
330
)
},
330
)
}
}
$
.
fn
.
appendMobileMenu
=
function
(){
$
.
fn
.
appendMobileMenu
=
function
(){
var
$this
=
$
(
this
);
var
$this
=
$
(
this
);
setTimeout
(
function
(){
setTimeout
(
function
(){
if
(
!
(
$this
.
find
(
'li.current'
).
length
)){
if
(
!
(
$this
.
find
(
'li.current'
).
length
)){
$
(
'.main-nav .nav-content li.current'
).
addClass
(
'to-replace'
);
$
(
'.main-nav .nav-content li.current'
).
addClass
(
'to-replace'
);
$
(
'.main-nav .nav-content li.current'
).
clone
(
true
).
find
(
'ul'
).
remove
().
end
().
appendTo
(
$this
);
$
(
'.main-nav .nav-content li.current'
).
clone
(
true
).
find
(
'ul'
).
remove
().
end
().
appendTo
(
$this
);
$this
.
find
(
"li.current"
).
append
(
$
(
'.main-nav.nav-wrapper li.current ul'
));
$this
.
find
(
"li.current"
).
append
(
$
(
'.main-nav.nav-wrapper li.current ul'
));
}
}
$
(
'.right-container'
).
css
(
'padding-top'
,
$this
.
parent
().
outerHeight
());
$
(
'.right-container'
).
css
(
'padding-top'
,
$this
.
parent
().
outerHeight
());
},
2000
)
},
2000
)
}
}
//Responsive function
//Responsive function
$
.
fn
.
responsive
=
function
(){
$
.
fn
.
responsive
=
function
(){
var
footerHeight
=
$
(
'footer'
).
height
(),
var
footerHeight
=
$
(
'footer'
).
height
(),
productHeight
=
$
(
".product-details"
).
outerHeight
(),
productHeight
=
$
(
".product-details"
).
outerHeight
(),
productWidth
=
$
(
".product-details"
).
outerWidth
(),
productWidth
=
$
(
".product-details"
).
outerWidth
(),
windowHeight
=
$
(
window
).
innerHeight
(),
windowHeight
=
$
(
window
).
innerHeight
(),
windowWidth
=
$
(
window
).
width
(),
windowWidth
=
$
(
window
).
width
(),
navMenuWidth
=
$
(
'.nav-wrapper'
).
outerWidth
(),
navMenuWidth
=
$
(
'.nav-wrapper'
).
outerWidth
(),
navHeight
=
$
(
'.nav-header'
).
outerHeight
(),
navHeight
=
$
(
'.nav-header'
).
outerHeight
(),
navHeader
=
$
(
'.nav-header'
).
outerHeight
(),
navHeader
=
$
(
'.nav-header'
).
outerHeight
(),
containerHeight
=
windowHeight
-
footerHeight
,
containerHeight
=
windowHeight
-
footerHeight
,
navPhototequeWidth
=
$
(
'.nav-phototeque'
).
outerWidth
(),
navPhototequeWidth
=
$
(
'.nav-phototeque'
).
outerWidth
(),
navPhototequeHeight
=
$
(
'.nav-phototeque'
).
height
(),
navPhototequeHeight
=
$
(
'.nav-phototeque'
).
height
(),
maxHeight
=
productHeight
>
windowHeight
?
productHeight
:
containerHeight
,
maxHeight
=
productHeight
>
windowHeight
?
productHeight
:
containerHeight
,
galleryWidth
=
windowWidth
-
navPhototequeWidth
,
galleryWidth
=
windowWidth
-
navPhototequeWidth
,
filterWidth
=
$
(
'.right-container .left-panel'
).
outerWidth
(),
filterWidth
=
$
(
'.right-container .left-panel'
).
outerWidth
(),
footerContact
=
$
(
'.contact-form .footer'
).
outerHeight
();
footerContact
=
$
(
'.contact-form .footer'
).
outerHeight
();
$
(
'.gallery-wrapper'
).
outerWidth
(
galleryWidth
).
css
(
'margin-left'
,
navPhototequeWidth
)
;
$
(
'.gallery-wrapper'
).
outerWidth
(
galleryWidth
).
css
(
'margin-left'
,
navPhototequeWidth
)
;
$
(
'.main,.load-page'
).
outerHeight
(
containerHeight
);
$
(
'.main,.load-page'
).
outerHeight
(
containerHeight
);
$
(
'.full-height'
).
outerHeight
(
maxHeight
);
$
(
'.full-height'
).
outerHeight
(
maxHeight
);
$
(
'.nav-content'
).
outerHeight
(
windowHeight
-
navHeader
-
footerHeight
);
$
(
'.nav-content'
).
outerHeight
(
windowHeight
-
navHeader
-
footerHeight
);
$
(
'.product-images'
).
outerWidth
(
windowWidth
-
productWidth
-
10
);
$
(
'.product-images'
).
outerWidth
(
windowWidth
-
productWidth
-
10
);
$
(
'.right-container'
).
outerWidth
(
windowWidth
-
navMenuWidth
);
$
(
'.right-container'
).
outerWidth
(
windowWidth
-
navMenuWidth
);
$
(
'.position--after-menu'
).
css
(
'left'
,
navMenuWidth
);
$
(
'.position--after-menu'
).
css
(
'left'
,
navMenuWidth
);
$
(
'.right-panel'
).
outerWidth
(
windowWidth
-
(
navMenuWidth
+
filterWidth
));
$
(
'.right-panel'
).
outerWidth
(
windowWidth
-
(
navMenuWidth
+
filterWidth
));
$
(
'.contact-form'
).
height
(
windowHeight
-
footerHeight
);
$
(
'.contact-form'
).
height
(
windowHeight
-
footerHeight
);
$
(
'.contact-form .inner-form'
).
outerHeight
(
windowHeight
-
footerContact
);
$
(
'.contact-form .inner-form'
).
outerHeight
(
windowHeight
-
footerContact
);
$
(
'#catalogue .panel-content section'
).
last
().
css
(
'height'
,
'auto'
);
$
(
'#catalogue .panel-content section'
).
last
().
css
(
'height'
,
'auto'
);
setTimeout
(
function
(){
setTimeout
(
function
(){
var
lastSection
=
$
(
'#catalogue .panel-content section'
).
last
();
var
lastSection
=
$
(
'#catalogue .panel-content section'
).
last
();
var
lastSectionHeight
=
lastSection
.
outerHeight
()
+
50
;
var
lastSectionHeight
=
lastSection
.
outerHeight
()
+
50
;
if
(
lastSectionHeight
<
windowHeight
-
footerHeight
){
if
(
lastSectionHeight
<
windowHeight
-
footerHeight
){
lastSection
.
height
(
2
*
windowHeight
/
3
+
lastSection
.
find
(
'h2'
).
outerHeight
()
-
footerHeight
);
lastSection
.
height
(
2
*
windowHeight
/
3
+
lastSection
.
find
(
'h2'
).
outerHeight
()
-
footerHeight
);
}
else
{
lastSection
.
css
(
'height'
,
'auto'
);
}
},
1000
)
$
(
'.nav-phototeque .nav-content'
).
outerHeight
(
navPhototequeHeight
-
$
(
'.circle-btn'
).
outerHeight
()
-
$
(
'.phototheque-content .header h2'
).
outerHeight
()
-
footerHeight
);
if
(
windowWidth
>
860
){
$
(
'#fullpage .chevron'
).
css
(
'left'
,
navMenuWidth
);
$
(
'.container-bg'
).
css
({
'height'
:
'100%'
,
'width'
:
navMenuWidth
});
$
(
'.main'
).
css
(
'padding-top'
,
0
);
$
(
'.contact-form h2'
).
removeClass
(
'show-comm'
);
$
(
'.filter, .left-panel .map, .details, .contact-form form'
).
show
();
$
(
'.left-panel'
).
appendMap
();
$
(
'.filter-list,#home'
).
css
(
'margin-top'
,
0
);
$
(
'.filter-list .top-header'
).
css
(
'top'
,
"initial"
);
$
(
'.header .nav-wrapper li.to-replace'
).
append
(
$
(
'.mobile-nav .nav-wrapper li.current ul'
));
$
(
'.mobile-nav .nav-wrapper ul'
).
find
(
'li'
).
remove
();
}
else
{
$
(
'.filter'
).
appendMap
();
$
(
'.main'
).
css
(
'padding-top'
,
navHeight
);
$
(
'.container-bg'
).
css
({
'height'
:
navHeight
});
$
(
'.contact-form h2'
).
addClass
(
'show-comm'
);
$
(
'.filter-list'
).
css
(
'margin-top'
,
navHeight
);
$
(
'.filter-list .top-header, .mobile-nav'
).
css
(
'top'
,
navHeight
);
$
(
'.mobile-nav .nav-wrapper ul'
).
appendMobileMenu
();
$
(
'#slides'
).
height
(
$
(
'.slides-wrapper'
).
width
());
if
(
$
(
'body #home'
).
length
){
$
(
'.main'
).
css
(
'padding-top'
,
0
);
}
if
(
$
(
'.filter-wrapper .header-filter-contact'
).
hasClass
(
'on'
)){
$
(
'.filter, .left-panel .map, .details'
).
show
();
}
else
{
$
(
'.filter, .left-panel .map, .details'
).
hide
();
}
if
(
$
(
'.contact-form .header-filter-contact'
).
hasClass
(
'on'
)){
$
(
'.contact-form form'
).
show
();
}
else
{
}
else
{
$
(
'.contact-form form'
).
hide
(
);
lastSection
.
css
(
'height'
,
'auto'
);
}
}
checkFilterContactWrapper
();
},
1000
)
$
(
'.nav-phototeque .nav-content'
).
outerHeight
(
navPhototequeHeight
-
$
(
'.circle-btn'
).
outerHeight
()
-
$
(
'.phototheque-content .header h2'
).
outerHeight
()
-
footerHeight
);
if
(
windowWidth
>
860
){
$
(
'#fullpage .chevron'
).
css
(
'left'
,
navMenuWidth
);
$
(
'.container-bg'
).
css
({
'height'
:
'100%'
,
'width'
:
navMenuWidth
});
$
(
'.main'
).
css
(
'padding-top'
,
0
);
$
(
'.contact-form h2'
).
removeClass
(
'show-comm'
);
$
(
'.filter, .left-panel .map, .details, .contact-form form'
).
show
();
$
(
'.left-panel'
).
appendMap
();
$
(
'.filter-list,#home'
).
css
(
'margin-top'
,
0
);
$
(
'.filter-list .top-header'
).
css
(
'top'
,
"initial"
);
$
(
'.header .nav-wrapper li.to-replace'
).
append
(
$
(
'.mobile-nav .nav-wrapper li.current ul'
));
$
(
'.mobile-nav .nav-wrapper ul'
).
find
(
'li'
).
remove
();
}
else
{
$
(
'.filter'
).
appendMap
();
$
(
'.main'
).
css
(
'padding-top'
,
navHeight
);
$
(
'.container-bg'
).
css
({
'height'
:
navHeight
});
$
(
'.contact-form h2'
).
addClass
(
'show-comm'
);
$
(
'.filter-list'
).
css
(
'margin-top'
,
navHeight
);
$
(
'.filter-list .top-header, .mobile-nav'
).
css
(
'top'
,
navHeight
);
$
(
'.mobile-nav .nav-wrapper ul'
).
appendMobileMenu
();
$
(
'#slides'
).
height
(
$
(
'.slides-wrapper'
).
width
());
if
(
$
(
'body #home'
).
length
){
$
(
'.main'
).
css
(
'padding-top'
,
0
);
}
}
checkFooterNavPosition
();
if
(
$
(
'.filter-wrapper .header-filter-contact'
).
hasClass
(
'on'
)){
$
(
'.filter, .left-panel .map, .details'
).
show
();
}
else
{
$
(
'.filter, .left-panel .map, .details'
).
hide
();
}
if
(
$
(
'.contact-form .header-filter-contact'
).
hasClass
(
'on'
)){
$
(
'.contact-form form'
).
show
();
}
else
{
$
(
'.contact-form form'
).
hide
();
}
checkFilterContactWrapper
();
}
}
//Wordpress js login
checkFooterNavPosition
();
$
(
'#user_login'
).
attr
(
'placeholder'
,
'Identifiant'
);
}
$
(
'#user_pass'
).
attr
(
'placeholder'
,
'Mot de passe'
);
//Wordpress js login
$
(
"#user_login"
).
addClass
(
"my-login-username"
);
$
(
'#user_login'
).
attr
(
'placeholder'
,
'Identifiant'
);
$
(
"#wp-submit"
).
addClass
(
"btn rounded white-btn"
);
$
(
'#user_pass'
).
attr
(
'placeholder'
,
'Mot de passe'
);
$
(
"#user_login"
).
addClass
(
"my-login-username"
);
$
(
"#wp-submit"
).
addClass
(
"btn rounded white-btn"
);
});
//END Function
});
//END Function
function
animateOnScroll
(){
function
animateOnScroll
(){
var
animate
=
new
Animate
({
var
animate
=
new
Animate
({
target
:
'[data-animate]'
,
target
:
'[data-animate]'
,
animatedClass
:
'visible'
,
animatedClass
:
'visible'
,
offset
:
[
0.1
,
0.1
],
offset
:
[
0.1
,
0.1
],
delay
:
3
,
delay
:
3
,
remove
:
false
,
remove
:
false
,
reverse
:
true
,
reverse
:
true
,
scrolled
:
false
,
scrolled
:
false
,
debug
:
true
,
debug
:
true
,
onLoad
:
true
,
onLoad
:
true
,
onScroll
:
true
,
onScroll
:
true
,
onResize
:
false
,
onResize
:
false
,
callbackOnInit
:
function
()
{
callbackOnInit
:
function
()
{
},
},
callbackOnAnimate
:
function
(
element
)
{
callbackOnAnimate
:
function
(
element
)
{
}
}
});
});
window
.
scrollAnimation
=
animate
;
window
.
scrollAnimation
=
animate
;
animate
.
init
();
animate
.
init
();
setTimeout
(
animate
.
render
.
bind
(
animate
),
2000
);
setTimeout
(
animate
.
render
.
bind
(
animate
),
2000
);
}
}
$
.
fn
.
animation
=
function
(){
$
.
fn
.
animation
=
function
(){
...
@@ -565,13 +567,13 @@ $.fn.animation = function(){
...
@@ -565,13 +567,13 @@ $.fn.animation = function(){
tlCata
.
from
(
'.floated-bloc h2'
,
0.9
,{
autoAlpha
:
0
,
marginTop
:
'-100px'
},
1.4
);
tlCata
.
from
(
'.floated-bloc h2'
,
0.9
,{
autoAlpha
:
0
,
marginTop
:
'-100px'
},
1.4
);
tlCata
.
from
(
'.floated-bloc .text-content'
,
0.9
,{
autoAlpha
:
0
,
marginLeft
:
'-40px'
},
2.2
);
tlCata
.
from
(
'.floated-bloc .text-content'
,
0.9
,{
autoAlpha
:
0
,
marginLeft
:
'-40px'
},
2.2
);
setTimeout
(
function
(){
$
(
'.form-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated fadeInUp'
)},
1000
)
setTimeout
(
function
(){
$
(
'.form-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated fadeInUp'
)},
1000
)
animateOnScroll
();
animateOnScroll
();
}
}
function
onScrollCover
(){
function
onScrollCover
(){
cover
=
$
(
'.subcat.current a.active'
).
attr
(
"href"
);
cover
=
$
(
'.subcat.current a.active'
).
attr
(
"href"
);
$
(
'.cover-wrapper'
).
each
(
function
()
{
$
(
'.cover-wrapper'
).
each
(
function
()
{
coverWrapper
=
$
(
this
).
data
(
'cat'
);
coverWrapper
=
$
(
this
).
data
(
'cat'
);
if
(
coverWrapper
==
cover
&&
!
(
$
(
this
).
hasClass
(
'current-cover'
)))
{
if
(
coverWrapper
==
cover
&&
!
(
$
(
this
).
hasClass
(
'current-cover'
)))
{
$
(
'.cover-wrapper'
).
removeClass
(
'last-current-cover'
);
$
(
'.cover-wrapper'
).
removeClass
(
'last-current-cover'
);
$
(
'.cover-desc-wrapper'
).
removeClass
(
'fadeInDown'
).
addClass
(
'animated fadeOutDown'
)
$
(
'.cover-desc-wrapper'
).
removeClass
(
'fadeInDown'
).
addClass
(
'animated fadeOutDown'
)
$
(
'.current-cover'
).
addClass
(
'last-current-cover'
);
$
(
'.current-cover'
).
addClass
(
'last-current-cover'
);
...
@@ -580,73 +582,73 @@ function onScrollCover(){
...
@@ -580,73 +582,73 @@ function onScrollCover(){
$
(
this
).
nextAll
(
'.cover-wrapper'
).
addClass
(
'next'
);
$
(
this
).
nextAll
(
'.cover-wrapper'
).
addClass
(
'next'
);
$
(
this
).
addClass
(
'current-cover '
);
$
(
this
).
addClass
(
'current-cover '
);
setTimeout
(
function
(){
setTimeout
(
function
(){
$
(
'.current-cover .cover-desc-wrapper'
).
removeClass
(
'fadeOutDown'
).
addClass
(
'animated fadeInDown'
);
$
(
'.current-cover .cover-desc-wrapper'
).
removeClass
(
'fadeOutDown'
).
addClass
(
'animated fadeInDown'
);
},
600
);
},
600
);
}
}
});
});
};
};
var
lastScrollTop
=
0
;
var
lastScrollTop
=
0
;
function
onScroll
(
event
){
function
onScroll
(
event
){
var
scrollPos
=
$
(
this
).
scrollTop
(),
var
scrollPos
=
$
(
this
).
scrollTop
(),
titleHeight
=
(
$
(
'.panel section > h2'
).
outerHeight
()
/
2
)
;
titleHeight
=
(
$
(
'.panel section > h2'
).
outerHeight
()
/
2
)
;
//items = event.data.items;
//items = event.data.items;
items
=
"li .subcat a"
;
items
=
"li .subcat a"
;
if
(
timer
)
clearTimeout
(
timer
);
if
(
timer
)
clearTimeout
(
timer
);
timer
=
setTimeout
(
function
(){
timer
=
setTimeout
(
function
(){
onScrollCover
();
onScrollCover
();
},
330
);
},
330
);
$
(
items
).
each
(
function
()
{
$
(
items
).
each
(
function
()
{
var
currLink
=
$
(
this
);
var
currLink
=
$
(
this
);
var
refElement
=
$
(
currLink
.
attr
(
"href"
));
var
refElement
=
$
(
currLink
.
attr
(
"href"
));
//console.log(currLink);
//console.log(currLink);
if
(
refElement
.
length
&&
refElement
.
position
().
top
-
(
$
(
".main"
).
outerHeight
()
/
2
-
titleHeight
-
$
(
".footer"
).
outerHeight
()
)
<=
scrollPos
&&
refElement
.
position
().
top
+
refElement
.
height
()
>
scrollPos
)
{
if
(
refElement
.
length
&&
refElement
.
position
().
top
-
(
$
(
".main"
).
outerHeight
()
/
2
-
titleHeight
-
$
(
".footer"
).
outerHeight
()
)
<=
scrollPos
&&
refElement
.
position
().
top
+
refElement
.
height
()
>
scrollPos
)
{
$
(
'.subcat a'
).
removeClass
(
"active"
);
$
(
'.subcat a'
).
removeClass
(
"active"
);
currLink
.
addClass
(
"active"
);
currLink
.
addClass
(
"active"
);
if
(
$
(
'nav ul ul'
).
find
(
'li.active'
)){
if
(
$
(
'nav ul ul'
).
find
(
'li.active'
)){
$
(
'nav ul li'
).
removeClass
(
'current'
).
addClass
(
'off'
);
$
(
'nav ul li'
).
removeClass
(
'current'
).
addClass
(
'off'
);
parent
=
currLink
.
parent
().
parent
().
parent
();
parent
=
currLink
.
parent
().
parent
().
parent
();
parent
.
addClass
(
'current'
).
removeClass
(
'off'
);
parent
.
addClass
(
'current'
).
removeClass
(
'off'
);
if
(
timer2
)
clearTimeout
(
timer2
);
if
(
timer2
)
clearTimeout
(
timer2
);
timer2
=
setTimeout
(
function
(){
timer2
=
setTimeout
(
function
(){
$
(
'.phototheque .off .subcat'
).
stop
().
slideUp
();
$
(
'.phototheque .off .subcat'
).
stop
().
slideUp
();
parent
.
find
(
'ul'
).
stop
().
slideDown
();
parent
.
find
(
'ul'
).
stop
().
slideDown
();
},
330
);
},
330
);
}
}
}
}
else
{
else
{
currLink
.
removeClass
(
"active"
);
currLink
.
removeClass
(
"active"
);
}
}
});
});
}
}
function
scrollAnchor
(
elemId
,
skipZero
){
function
scrollAnchor
(
elemId
,
skipZero
){
$
(
'.subcat'
).
each
(
function
(){
$
(
'.subcat'
).
each
(
function
(){
$
(
this
).
find
(
'a[href^="#"]'
).
on
(
'click'
,
function
(
e
)
{
$
(
this
).
find
(
'a[href^="#"]'
).
on
(
'click'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
$
(
'a'
).
each
(
function
()
{
$
(
'a'
).
each
(
function
()
{
$
(
this
).
removeClass
(
'active'
);
$
(
this
).
removeClass
(
'active'
);
})
$
(
this
).
addClass
(
'active'
);
var
target
=
this
.
hash
,
menu
=
target
,
temp
=
0
;
$target
=
$
(
target
);
//$parent = $('#load-page');
$
(
elemId
).
stop
().
animate
({
'scrollTop'
:
$target
.
position
().
top
//- $parent.offset().top
},
1000
,
'swing'
,
function
()
{
window
.
location
.
hash
=
target
;
});
});
})
})
$
(
this
).
addClass
(
'active'
);
var
target
=
this
.
hash
,
menu
=
target
,
temp
=
0
;
$target
=
$
(
target
);
//$parent = $('#load-page');
$
(
elemId
).
stop
().
animate
({
'scrollTop'
:
$target
.
position
().
top
//- $parent.offset().top
},
1000
,
'swing'
,
function
()
{
window
.
location
.
hash
=
target
;
});
});
})
}
}
function
checkFooterNavPosition
(){
function
checkFooterNavPosition
(){
var
mainHeight
=
$
(
'.main-nav .nav-content'
).
height
(),
var
mainHeight
=
$
(
'.main-nav .nav-content'
).
height
(),
nav
=
$
(
'.main-nav .nav-content .arrow-white'
).
height
()
+
$
(
'.main-nav .nav-content .arrow-pink'
).
height
(),
nav
=
$
(
'.main-nav .nav-content .arrow-white'
).
height
()
+
$
(
'.main-nav .nav-content .arrow-pink'
).
height
(),
footerNav
=
$
(
'.header .nav-content .footer'
).
outerHeight
();
footerNav
=
$
(
'.header .nav-content .footer'
).
outerHeight
();
footerSpace
=
mainHeight
-
(
nav
+
40
)
;
footerSpace
=
mainHeight
-
(
nav
+
40
)
;
if
(
footerSpace
<=
footerNav
){
if
(
footerSpace
<=
footerNav
){
$
(
'.header .nav-content .footer'
).
addClass
(
'relative'
);
$
(
'.header .nav-content .footer'
).
addClass
(
'relative'
);
...
@@ -656,95 +658,96 @@ function checkFooterNavPosition(){
...
@@ -656,95 +658,96 @@ function checkFooterNavPosition(){
}
}
function
checkFilterContactWrapper
(){
function
checkFilterContactWrapper
(){
setTimeout
(
function
(){
setTimeout
(
function
(){
if
(
if
(
(
$
(
'.contact-form .form-wrapper'
).
outerHeight
()
(
$
(
'.contact-form .form-wrapper'
).
outerHeight
()
+
$
(
'.filter-wrapper'
).
outerHeight
()
+
$
(
'.filter-wrapper'
).
outerHeight
()
+
$
(
'nav .main-nav'
).
outerHeight
()
+
$
(
'.main-nav'
).
outerHeight
())
<
$
(
window
).
outerHeight
()
+
$
(
'nav .main-nav'
).
outerHeight
()
+
$
(
'.main-nav'
).
outerHeight
())
<
$
(
window
).
outerHeight
()
/*&&
/*&&
( $('.contact-form .form-wrapper').outerHeight() +
( $('.contact-form .form-wrapper').outerHeight() +
$('.contact-form .footer').outerHeight() +
$('.contact-form .footer').outerHeight() +
$('.filter-wrapper').outerHeight()
$('.filter-wrapper').outerHeight()
> $(window).outerHeight() )*/
> $(window).outerHeight() )*/
)
)
{
{
$
(
'.contact-form .footer'
).
addClass
(
'fixed'
);
$
(
'.contact-form .footer'
).
addClass
(
'fixed'
);
}
else
{
}
else
{
$
(
'.contact-form .footer'
).
removeClass
(
'fixed'
);
$
(
'.contact-form .footer'
).
removeClass
(
'fixed'
);
}
}
},
500
)
},
500
)
}
}
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
initFunction
();
initFunction
();
$
(
'.header .nav-wrapper .nav-content > ul > li'
).
each
(
function
(){
$
(
'.header .nav-wrapper .nav-content > ul > li'
).
each
(
function
(){
url
=
$
(
this
).
data
(
'img'
);
url
=
$
(
this
).
data
(
'img'
);
$
(
'.img-wrapper'
).
append
(
'<img src='
+
url
+
'>'
);
$
(
'.img-wrapper'
).
append
(
'<img src='
+
url
+
'>'
);
})
})
});
//END document load
});
//END document load
var
timer
;
var
timer
;
var
timer2
;
var
timer2
;
$
(
window
).
scroll
(
function
(
e
)
{
$
(
window
).
scroll
(
function
(
e
)
{
onScroll
(
e
);
onScroll
(
e
);
var
elem
=
$
(
'.home-down-wrapper'
);
var
elem
=
$
(
'.home-down-wrapper'
);
if
(
elem
.
length
){
if
(
elem
.
length
){
var
downBTN
=
$
(
'.home-down-wrapper'
).
offset
().
top
;
var
downBTN
=
$
(
'.home-down-wrapper'
).
offset
().
top
;
if
(
$
(
window
).
scrollTop
()
>
downBTN
-
$
(
'.nav-header'
).
outerHeight
())
{
if
(
$
(
window
).
scrollTop
()
>
downBTN
-
$
(
'.nav-header'
).
outerHeight
())
{
$
(
'.home-footer-nav .nav-wrapper'
).
addClass
(
'fixed'
);
$
(
'.home-footer-nav .nav-wrapper'
).
addClass
(
'fixed'
);
}
}
else
{
else
{
$
(
'.home-footer-nav .nav-wrapper'
).
removeClass
(
'fixed'
);
$
(
'.home-footer-nav .nav-wrapper'
).
removeClass
(
'fixed'
);
}
}
}
}
});
});
//$(window).bind("scrollStop",onScroll)
//$(window).bind("scrollStop",onScroll)
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
$
(
document
).
on
(
'mouseover'
,
'.nav-content li'
,
function
(){
$
(
document
).
on
(
'mouseover'
,
'.nav-content li'
,
function
(){
$
(
this
).
stop
(
false
,
true
).
fadeImage
();
$
(
this
).
stop
(
false
,
true
).
fadeImage
();
});
});
// Catalog Page : Change product image depending on selected color
// Catalog Page : Change product image depending on selected color
$
(
'.product-list article ul li'
).
on
(
'mouseover'
,
function
(){
$
(
'.product-list article ul li'
).
on
(
'mouseover'
,
function
(){
$
(
this
).
changeProductImageBg
();
$
(
this
).
changeProductImageBg
();
});
});
$
(
'.product-list article'
).
each
(
function
(){
$
(
'.product-list article'
).
each
(
function
(){
$
(
this
).
showProductListColors
();
$
(
this
).
showProductListColors
();
});
});
$
(
'.filter-bloc .list-color-filter li'
).
setColorToWhite
();
$
(
'.filter-bloc .list-color-filter li'
).
setColorToWhite
();
setTimeout
(
function
(){
setTimeout
(
function
(){
onScrollCover
();
onScrollCover
();
},
330
);
},
330
);
$
.
fn
.
open_nav
();
$
.
fn
.
open_nav
();
if
(
$
(
document
).
find
(
'#load-page'
).
children
().
length
){
if
(
$
(
document
).
find
(
'#load-page'
).
children
().
length
){
scrollAnchor
(
"#load-page"
,
true
);
scrollAnchor
(
"#load-page"
,
true
);
}
else
{
}
else
{
scrollAnchor
(
'html,body'
,
false
);
scrollAnchor
(
'html,body'
,
false
);
}
}
$
(
'.news-btn'
).
open_news
();
$
(
'.news-btn'
).
open_news
();
$
(
'.close-btn'
).
close_news
();
$
(
'.close-btn'
).
close_news
();
$
(
'.filter-wrapper'
).
open_filter
();
$
(
'.filter-wrapper'
).
open_filter
();
$
.
fn
.
checkSelectedFilter
();
$
.
fn
.
checkSelectedFilter
();
$
.
fn
.
showSubmenu
();
//Catalog subMenu
$
.
fn
.
showSubmenu
();
//Catalog subMenu
$
(
'#fullpage'
).
fullpageSlide
();
//Stories
$
(
'#fullpage'
).
fullpageSlide
();
//Stories
$
.
fn
.
responsive
();
$
.
fn
.
responsive
();
$
(
'.list-color-filter li'
).
setBgColorList
();
$
(
'.list-color-filter li'
).
setBgColorList
();
$
.
fn
.
animation
();
//Global animation for entire site
$
.
fn
.
animation
();
//Global animation for entire site
$
.
fn
.
getMenuBg
();
//Animation BG Menu
$
.
fn
.
getMenuBg
();
//Animation BG Menu
//TODO
//TODO
$
(
'.cover-wrapper'
).
last
().
addClass
(
'last'
);
$
(
'.cover-wrapper'
).
last
().
addClass
(
'last'
);
$
(
'.cover-wrapper'
).
first
().
addClass
(
'first'
);
$
(
'.cover-wrapper'
).
first
().
addClass
(
'first'
);
showMap
();
showMap
();
$
.
fn
.
loadPageContent
();
$
.
fn
.
loadPageContent
();
});
//end document ready
});
//end document ready
$
(
window
).
resize
(
function
()
{
$
(
window
).
resize
(
function
()
{
$
.
fn
.
responsive
();
$
.
fn
.
responsive
();
});
//end document resize
});
//end document resize
window
.
addEventListener
(
"load"
,
function
(){
window
.
addEventListener
(
"load"
,
function
(){
var
load_screen
=
document
.
getElementById
(
"loading-container"
);
var
load_screen
=
document
.
getElementById
(
"loading-container"
);
document
.
body
.
removeChild
(
load_screen
);
document
.
body
.
removeChild
(
load_screen
);
});
});
}(
jQuery
));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment