| 42 |
lars |
1 |
<script>
|
|
|
2 |
$(document).ready(function(){
|
|
|
3 |
|
|
|
4 |
$('.subnav, .marker_container').mouseenter(function(){
|
|
|
5 |
var id = $(this).attr('id');
|
|
|
6 |
idArr = id.split('_');
|
|
|
7 |
id = idArr[1];
|
|
|
8 |
$('.topnav_active').hide();
|
|
|
9 |
$('#topnav_active_'+id).show();
|
|
|
10 |
});
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
$('.topnav li').click(function() {
|
|
|
14 |
$('.subnav').hide();
|
|
|
15 |
$('.sub2').html("");
|
|
|
16 |
var id = $(this).attr('id');
|
|
|
17 |
idArr = id.split('_');
|
|
|
18 |
id = idArr[1];
|
|
|
19 |
$('#sub_'+id).toggle();
|
|
|
20 |
});
|
|
|
21 |
|
|
|
22 |
// 3. Ebene in den DIV zur Ausgabe verschieben
|
|
|
23 |
$('.level02_item').click(function(){
|
|
|
24 |
$('.sub2').html("");
|
|
|
25 |
$('.subhead_active').removeClass('subhead_active').addClass('subhead_inactive');
|
|
|
26 |
$('.sub_head').removeClass('active');
|
|
|
27 |
var state = $(this).children().children().attr('class');
|
|
|
28 |
|
|
|
29 |
if(state=="subhead_inactive") {
|
|
|
30 |
$('.subhead_inactive', this).removeClass('subhead_inactive').addClass('subhead_active');
|
|
|
31 |
$('.sub_head', this).addClass('active');
|
|
|
32 |
}
|
|
|
33 |
var str = $('.sub2data', this).html();
|
|
|
34 |
$('.sub2').html(str);
|
|
|
35 |
});
|
|
|
36 |
|
|
|
37 |
// closeMenu
|
|
|
38 |
$('.closeMenu').click(function(){
|
|
|
39 |
$('.subnav, .topnav_active').hide("fade");
|
|
|
40 |
});
|
|
|
41 |
|
|
|
42 |
});
|
|
|
43 |
</script>
|
|
|
44 |
|
|
|
45 |
<nav class="topnav noprint" role="navigation">
|
|
|
46 |
<div class="inner">
|
|
|
47 |
<!-- level01 -->
|
|
|
48 |
<ul class="topnav_ul">
|
|
|
49 |
{if $herstellerInMenu|is_array}
|
|
|
50 |
<li id="li_one" style="cursor:pointer;">
|
|
|
51 |
<a class="topnav_li" id="one">Marken</a>
|
|
|
52 |
<div id="topnav_active_one" class="topnav_active desktop"></div>
|
|
|
53 |
</li>
|
|
|
54 |
{/if}
|
|
|
55 |
{foreach $nav as $n}
|
|
|
56 |
{foreach $n.top as $top}
|
|
|
57 |
<li class="{if $n@last}last{/if}" id="li_{$top.id}" style="cursor:pointer;">
|
|
|
58 |
{if $n.sub|count>0}
|
|
|
59 |
<a class="topnav_li" id="{$top.id}">{$top.name}</a>
|
|
|
60 |
{else}
|
|
|
61 |
<a class="topnav_li" id="{$top.id}" href="{$top.dirLink}">{$top.name}</a>
|
|
|
62 |
{/if}
|
|
|
63 |
<div id="topnav_active_{$top.id}" class="topnav_active desktop"></div>
|
|
|
64 |
</li>
|
|
|
65 |
{/foreach}
|
|
|
66 |
{/foreach}
|
|
|
67 |
</ul>
|
|
|
68 |
{if $herstellerInMenu|is_array}
|
|
|
69 |
<div class="subnav" id="sub_one">
|
|
|
70 |
<div class="subnav_outer_container">
|
|
|
71 |
<div class="subnav_inner_container">
|
|
|
72 |
<div class="closeMenu"><button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only ui-dialog-titlebar-close" role="button" title="Close"><span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span><span class="ui-button-text">Close</span></button></div>
|
|
|
73 |
<div class="subnav_padding">
|
|
|
74 |
|
|
|
75 |
{foreach $herstellerInMenu as $key => $value}
|
|
|
76 |
<div class="level02_item" id="one">
|
|
|
77 |
<div class="marker_container"><div class="subhead_inactive"></div></div>
|
|
|
78 |
<span class="sub_head">{$value.Name}</span>
|
|
|
79 |
{if $herstellerSerie[$value.ID]}
|
|
|
80 |
<span class="sub2data">
|
|
|
81 |
{foreach $herstellerSerie[$value.ID] as $sub3}
|
|
|
82 |
<a href="{$sub3.serieLink}">{$sub3.serieName}</a>
|
|
|
83 |
{/foreach}
|
|
|
84 |
</span>
|
|
|
85 |
{/if}
|
|
|
86 |
</div>
|
|
|
87 |
{/foreach}
|
|
|
88 |
</div>
|
|
|
89 |
<div class="sub2">
|
|
|
90 |
</div>
|
|
|
91 |
</div>
|
|
|
92 |
</div>
|
|
|
93 |
</div>
|
|
|
94 |
{/if}
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
{foreach $nav as $n}
|
|
|
98 |
|
|
|
99 |
{foreach $n.top as $top}
|
|
|
100 |
{if $n.sub|count}
|
|
|
101 |
<div class="subnav" id="sub_{$top.id}">
|
|
|
102 |
<div class="subnav_outer_container">
|
|
|
103 |
<div class="subnav_inner_container">
|
|
|
104 |
<div class="closeMenu"><button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only ui-dialog-titlebar-close" role="button" title="Close"><span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span><span class="ui-button-text">Close</span></button></div>
|
|
|
105 |
<div class="subnav_padding">
|
|
|
106 |
<!-- level02 -->
|
|
|
107 |
|
|
|
108 |
{section loop=$n.sub start=0 name=s_ind}
|
| 299 |
lars |
109 |
{if $n.sub[s_ind].dirLink && $n.sub[s_ind].name}
|
| 42 |
lars |
110 |
<div class="level02_item" id="{$n.sub[s_ind].id}">
|
|
|
111 |
{if $n.sub[s_ind].sub2|count > 0}
|
|
|
112 |
<div class="marker_container"><div class="subhead_inactive"></div></div>
|
|
|
113 |
<span class="sub_head">{$n.sub[s_ind].name}</span>
|
|
|
114 |
{else}
|
| 299 |
lars |
115 |
<span class="sub_head"><a href="{$n.sub[s_ind].dirLink}">{$n.sub[s_ind].name}</a></span>
|
| 42 |
lars |
116 |
{/if}
|
|
|
117 |
<!-- level03 -->
|
|
|
118 |
{if $n.sub[s_ind].sub2}
|
|
|
119 |
<span class="sub2data">
|
|
|
120 |
{foreach $n.sub[s_ind].sub2 as $sub3}
|
| 301 |
lars |
121 |
<a href="{$sub3.dirLink}">{$sub3.name}</a>
|
| 42 |
lars |
122 |
{/foreach}
|
|
|
123 |
</span>
|
|
|
124 |
{/if}
|
|
|
125 |
</div>
|
|
|
126 |
{/if}
|
|
|
127 |
{/section}
|
|
|
128 |
</div>
|
|
|
129 |
<div class="sub2">
|
|
|
130 |
|
|
|
131 |
</div>
|
|
|
132 |
|
|
|
133 |
</div>
|
|
|
134 |
|
|
|
135 |
|
|
|
136 |
</div>
|
|
|
137 |
</div>
|
|
|
138 |
{/if}
|
|
|
139 |
{/foreach}
|
|
|
140 |
|
|
|
141 |
{/foreach}
|
|
|
142 |
|
|
|
143 |
|
|
|
144 |
</div>
|
|
|
145 |
</nav>
|
|
|
146 |
|
|
|
147 |
|