Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Danielle / mt-theme-scale2.js
1 $(function() {
2     $('<select />').appendTo('header [role="navigation"]');
3
4     $('<option />', {
5         'value': '',
6         'text': 'Menu',
7         'selected': 'selected'
8     }).appendTo('header [role="navigation"] > select');
9
10     $('header [role="navigation"] a').each(function() {
11         var el = $(this);
12         $('<option />', {
13             'value': el.attr('href'),
14             'text': el.text()
15         }).appendTo('header [role="navigation"] > select');
16     });
17
18     $('header [role="navigation"] > select, .widget-archive-dropdown select').change(function() {
19         window.location = $(this).find('option:selected').val();
20     });
21 });