1 | (function($) |
---|
2 | { |
---|
3 | |
---|
4 | $(document).ready(function() { |
---|
5 | |
---|
6 | $('#mbIdentification').remove(); |
---|
7 | |
---|
8 | $(window).load(function(){ |
---|
9 | $('.liSub').each(function() { |
---|
10 | var $color = $('body').data('color'), |
---|
11 | $topnavLi_h = $(this).height(), |
---|
12 | $topnavLi_w = $(this).innerWidth(), |
---|
13 | $topnavLi_pos = $(this).position(), |
---|
14 | $p1 = $topnavLi_h/1.5, |
---|
15 | $p2 = $topnavLi_h/4, |
---|
16 | $canvas = $('<canvas class="inactiv" height="' + $topnavLi_h + 'px" width="' + $topnavLi_w +'px"></canvas>'); |
---|
17 | |
---|
18 | $('.canvas', this).css({'width':$topnavLi_w, 'height':$topnavLi_h, 'left':$topnavLi_pos.left}).append($canvas); |
---|
19 | |
---|
20 | var ctx = $canvas[0].getContext('2d'); |
---|
21 | ctx.beginPath(); |
---|
22 | ctx.moveTo(0, $p1); |
---|
23 | ctx.lineTo($topnavLi_w, $p2); |
---|
24 | ctx.lineTo($topnavLi_w,$topnavLi_h); |
---|
25 | ctx.lineTo(0,$topnavLi_h); |
---|
26 | ctx.closePath |
---|
27 | ctx.fillStyle = $color; |
---|
28 | ctx.fill(); |
---|
29 | }); |
---|
30 | }); |
---|
31 | |
---|
32 | $('.unloged').on('click',function() { |
---|
33 | $('.regis').hide(); |
---|
34 | $('.ident').show(); |
---|
35 | $('#box_wrapper').show(); |
---|
36 | }); |
---|
37 | |
---|
38 | $('.register').click(function() { |
---|
39 | $('.ident').hide(); |
---|
40 | $('.regis').show(); |
---|
41 | $('#box_wrapper').show(); |
---|
42 | return false |
---|
43 | }); |
---|
44 | |
---|
45 | $('#box_bg_wrapper').on('click',function() { |
---|
46 | $('#box_wrapper').hide(); |
---|
47 | }); |
---|
48 | |
---|
49 | $('.logeduser').click(function(){ |
---|
50 | $('#userlog').toggle(); |
---|
51 | }) |
---|
52 | |
---|
53 | |
---|
54 | //piwitheme link |
---|
55 | var $link = ' - theme by <a href="http://piwitheme.fr" target="_blank">piwitheme</a>'; |
---|
56 | $('#copyright').append($link); |
---|
57 | |
---|
58 | |
---|
59 | }); |
---|
60 | |
---|
61 | })(jQuery); |
---|