-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom.js
95 lines (73 loc) · 2.55 KB
/
custom.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
$().ready(function(){
// STYLE CHANGER
var style = $('body').attr('class').split(' ');
$('#change-pattern a').click(function (){
style[0] = $(this).attr('href');
$('body').removeClass().addClass(style[0]).addClass(style[1]).addClass(style[2]);
return false;
});
$('#change-color a').click(function (){
style[1] = $(this).attr('href');
$('body').removeClass().addClass(style[1]).addClass(style[0]).addClass(style[2]);
return false;
});
// FLEXSLIDER PORTFOLIO
$('.flexslider').flexslider({
slideshow: false,
directionNav: false,
controlNav: true,
animationDuration: 500
});
$('.flexslider-detail').flexslider({
animation: "fade",
slideshowSpeed: 4000,
directionNav: false,
controlNav: true,
animationDuration: 500
});
// FANCYBOX PORTFOLIO
$("a.show-portfolio-text").fancybox({
'titlePosition' : 'inside'
});
$("a.show-portfolio-img").fancybox();
// PORTFOLIO SELECT
$('#choose').change(function() {
var port = $("select option:selected").attr('value');
$("#formCategory").attr("action", port+".html#a-portfolio");
$("#formCategory").submit();
});
// PORTFOLIO LI IMAGES
$("ul.portfolio-slide li:nth-child(4n)").addClass("marginright-zero");
// NAV
$('.nav-global-li a').click(function (){
style[2] = $(this).attr('href').replace('#sec-','');
$('body').removeClass().addClass(style[0]).addClass(style[1]).addClass(style[2]);
return false;
});
var $content = $("#main");
// Run easytabs
$content.easytabs({
animate : true,
updateHash : false,
transitionIn :'slideDown',
transitionOut :'slideUp',
animationSpeed :600,
tabs :"> #header > #nav-global > ul > li",
tabActiveClass :'active'
});
// CONTACT VALIDATE
$('#form-contact-me').validate({
rules:{
name:{
required: true
},
message:{
required: true
},
email: {
required: true,
email: true
}
}
});
});