1 | /* |
---|
2 | * jQuery Mega Drop Down Menu script by Soh Tanaka |
---|
3 | * http://www.sohtanaka.com/web-design/mega-drop-downs-w-css-jquery/ |
---|
4 | * |
---|
5 | */ |
---|
6 | $(document).ready(function(){ |
---|
7 | |
---|
8 | function megaHoverOver(){ |
---|
9 | $(this).find(".sub").stop().fadeTo('fast', 1).show(); |
---|
10 | |
---|
11 | } |
---|
12 | |
---|
13 | function megaHoverOut(){ |
---|
14 | $(this).find(".sub").stop().fadeTo('fast', 0, function() { |
---|
15 | $(this).hide(); |
---|
16 | }); |
---|
17 | } |
---|
18 | |
---|
19 | |
---|
20 | var config = { |
---|
21 | sensitivity: 1, // number = sensitivity threshold (must be 1 or higher) |
---|
22 | interval: 0, // number = milliseconds for onMouseOver polling interval |
---|
23 | over: megaHoverOver, // function = onMouseOver callback (REQUIRED) |
---|
24 | timeout: 0, // number = milliseconds delay before onMouseOut |
---|
25 | out: megaHoverOut // function = onMouseOut callback (REQUIRED) |
---|
26 | }; |
---|
27 | |
---|
28 | $("ul#topnav li .sub").css({'opacity':'0'}); |
---|
29 | $("ul#topnav li").hoverIntent(config); |
---|
30 | |
---|
31 | |
---|
32 | // Delete the border for the last li of the submenu |
---|
33 | $("ul#topnav .sub ul li:last-child a").css("border", "none"); |
---|
34 | |
---|
35 | /*other menubar script*/ |
---|
36 | //open form login menu |
---|
37 | $(".cl_wrapper").next("div").hide(); |
---|
38 | |
---|
39 | |
---|
40 | $(".cl_wrapper").hover(function(){ |
---|
41 | |
---|
42 | if($(this).next("div").is(":hidden")){ |
---|
43 | $(this).next("div").fadeTo('fast',1); |
---|
44 | $(this).addClass('activate'); |
---|
45 | $(this).next("div").attr(":visible") |
---|
46 | } |
---|
47 | }); |
---|
48 | |
---|
49 | |
---|
50 | $(".cl_wrapper").click(function(){ |
---|
51 | if($(this).next("div").is(":visible")){ |
---|
52 | $(this).next("div").fadeTo('slow', 0, function(){$(this).hide()}); |
---|
53 | $(this).removeClass('activate'); |
---|
54 | $(this).next("div").attr(":hidden") |
---|
55 | } |
---|
56 | }); |
---|
57 | |
---|
58 | $(".close").click(function(){ |
---|
59 | if($("#loger").is(":visible")){ |
---|
60 | $("#loger").fadeTo('fast', 0, function(){$(this).hide()}); |
---|
61 | $(".cl_wrapper").removeClass('activate'); |
---|
62 | $("#loger").attr(":hidden"); |
---|
63 | } |
---|
64 | }); |
---|
65 | |
---|
66 | $(".cc_wrapper").click(function(){ |
---|
67 | if($(this).next("div").is(":visible")){ |
---|
68 | $(this).next("div").fadeTo('slow', 0, function(){$(this).hide()}); |
---|
69 | $(this).removeClass('activate'); |
---|
70 | $(this).next("div").attr(":hidden") |
---|
71 | } |
---|
72 | }); |
---|
73 | |
---|
74 | $(".cc_wrapper").click(function(){ |
---|
75 | if($(this).next("div").is(":hidden")){ |
---|
76 | $(this).next("div").fadeTo('fast', 1); |
---|
77 | $(this).addClass('activate'); |
---|
78 | $(this).next("div").attr(":visible") |
---|
79 | } |
---|
80 | }); |
---|
81 | |
---|
82 | |
---|
83 | // make column menubar_categorie |
---|
84 | $('.mcol').makeacolumnlists({cols:4, colWidth:155, equalHeight: true, startN: 1}); |
---|
85 | |
---|
86 | |
---|
87 | |
---|
88 | }); |
---|