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('slow', 1).show(); |
---|
10 | |
---|
11 | } |
---|
12 | |
---|
13 | function megaHoverOut(){ |
---|
14 | $(this).find(".sub").stop().fadeTo('slow', 0, function() { |
---|
15 | $(this).hide(); |
---|
16 | }); |
---|
17 | } |
---|
18 | |
---|
19 | |
---|
20 | var configSub = { |
---|
21 | sensitivity: 2, // 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(configSub); |
---|
30 | |
---|
31 | var configSwitch = { |
---|
32 | sensitivity: 2, // number = sensitivity threshold (must be 1 or higher) |
---|
33 | interval: 0, // number = milliseconds for onMouseOver polling interval |
---|
34 | over: switchBoxOver, // function = onMouseOver callback (REQUIRED) |
---|
35 | timeout: 0, // number = milliseconds delay before onMouseOut |
---|
36 | out: switchBoxOut // function = onMouseOut callback (REQUIRED) |
---|
37 | }; |
---|
38 | |
---|
39 | function switchBoxOver(){ |
---|
40 | $(this).find(".switchBox").stop().fadeTo('slow', 1).show(); |
---|
41 | |
---|
42 | } |
---|
43 | |
---|
44 | function switchBoxOut(){ |
---|
45 | $(this).find(".switchBox").stop().fadeTo('slow', 0, function() { |
---|
46 | $(this).hide(); |
---|
47 | }); |
---|
48 | } |
---|
49 | $("ul.categoryActions li").hoverIntent(configSwitch); |
---|
50 | |
---|
51 | |
---|
52 | // Delete the border for the last li of the submenu |
---|
53 | $("ul#topnav .sub ul li:last-child a").css("border", "none"); |
---|
54 | |
---|
55 | /*other menubar script*/ |
---|
56 | //open form login menu |
---|
57 | $(".cl_wrapper").next("div").hide(); |
---|
58 | |
---|
59 | |
---|
60 | $(".cl_wrapper").hover(function(){ |
---|
61 | |
---|
62 | if($(this).next("div").is(":hidden")){ |
---|
63 | $(this).next("div").fadeTo('fast', 1); |
---|
64 | $(this).addClass('activate'); |
---|
65 | $(this).next("div").attr(":visible") |
---|
66 | } |
---|
67 | }); |
---|
68 | |
---|
69 | |
---|
70 | $(".cl_wrapper").click(function(){ |
---|
71 | if($(this).next("div").is(":visible")){ |
---|
72 | $(this).next("div").fadeTo('slow', 0, function(){$(this).hide()}); |
---|
73 | $(this).removeClass('activate'); |
---|
74 | $(this).next("div").attr(":hidden") |
---|
75 | } |
---|
76 | }); |
---|
77 | |
---|
78 | $(".close").click(function(){ |
---|
79 | if($("#loger").is(":visible")){ |
---|
80 | $("#loger").fadeTo('fast', 0, function(){$(this).hide()}); |
---|
81 | $(".cl_wrapper").removeClass('activate'); |
---|
82 | $("#loger").attr(":hidden"); |
---|
83 | } |
---|
84 | }); |
---|
85 | |
---|
86 | $(".cc_wrapper").click(function(){ |
---|
87 | if($(this).next("div").is(":visible")){ |
---|
88 | $(this).next("div").fadeTo('slow', 0, function(){$(this).hide()}); |
---|
89 | $(this).removeClass('activate'); |
---|
90 | $(this).next("div").attr(":hidden") |
---|
91 | } |
---|
92 | }); |
---|
93 | |
---|
94 | $(".cc_wrapper").click(function(){ |
---|
95 | if($(this).next("div").is(":hidden")){ |
---|
96 | $(this).next("div").fadeTo('fast', 1); |
---|
97 | $(this).addClass('activate'); |
---|
98 | $(this).next("div").attr(":visible") |
---|
99 | } |
---|
100 | }); |
---|
101 | |
---|
102 | $(".close").click(function(){ |
---|
103 | if($("#loger").is(":visible")){ |
---|
104 | $("#loger").fadeTo('fast', 0, function(){$(this).hide()}); |
---|
105 | $(".cc_wrapper").removeClass('activate'); |
---|
106 | $("#loger").attr(":hidden"); |
---|
107 | } |
---|
108 | }); |
---|
109 | |
---|
110 | |
---|
111 | |
---|
112 | |
---|
113 | |
---|
114 | // make column menubar_categorie |
---|
115 | $('.mcol').makeacolumnlists({cols:4, colWidth:155, equalHeight: true, startN: 1}); |
---|
116 | }); |
---|