-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
103 lines (88 loc) · 1.87 KB
/
index.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
96
97
98
99
100
101
102
$(document).ready(function(){
$('#main_tab').parent('body').css({
'background-image' : 'url("./img/BG.png")',
'background-repeat' : 'repeat',
'background-size' : 'cover',
'background-position' : '50%'
});
$('.header,.footer').css({
'color' :'#FAFAFA'
});
$('.main_links').css({
'color' : '#FAFAFA',
'text-decoration' : 'none'
});
$('.main_links').hover(
function(){
$(this).css({
'color' : 'red',
'text-decoration':'underline'
});
},
function(){
$(this).css({
'color' : '#FAFAFA',
'text-decoration':'none'
});
}
);
$('.mode_item')
.bind('mouseenter', function(e){
m_over.m_in(e);
})
.bind('mouseleave', function(e){
m_over.m_out(e);
});
});
//пререход на онлайн
var online = function(url){
//переадресуем на онлайн просмотр
//alert(url);
user_layouts.redirect(url, true);
};
var m_over = {
factor : 1.15,
m_in: function(e){
var h, w;
var him, wim;
h= $(e.currentTarget).height();
w= $(e.currentTarget).width();
him= $('img', e.currentTarget).height();
wim= $('img', e.currentTarget).width();
$(e.currentTarget)
.css({
'z-index': 10,
'width': w*m_over.factor+'px',
'height': h*m_over.factor+'px',
'left': (w-w*m_over.factor)/2,
'top': (h-h*m_over.factor)/2
})
.attr({'h':h, 'w':w , 'him':him, 'wim':wim })
.find('img')
.css({
'width': wim*m_over.factor,
'height': him*m_over.factor
});
},
m_out: function(e){
var h, w;
var him, wim;
h= $(e.currentTarget).attr('h');
w= $(e.currentTarget).attr('w');
him= $(e.currentTarget).attr('him');
wim= $(e.currentTarget).attr('wim');
$(e.currentTarget)
.css({
'z-index': 0,
'width': w+'px',
'height': h+'px',
'left': 0,
'top': 0
})
.find('img')
.css({
'width': wim,
'height': him
});
}
};