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