!function(e){e.fn.mobileMenu=function(s){var a=e.extend({defaultText:"Navigate to...",className:"select-menu",subMenuClass:"sub-menu",subMenuDash:"&ndash;"},s),n=e(this);return this.each(function(){var s=e(this);s.find("ul").addClass(a.subMenuClass);var t=e("<select />",{class:a.className+" "+n.get(0).className}).insertAfter(s);e("<option />",{value:"#",text:a.defaultText}).appendTo(t),s.find("a").each(function(){var s=e(this),n="&nbsp;"+s.text(),u=s.parents("."+a.subMenuClass).length;s.parents("ul").hasClass(a.subMenuClass)&&(n=Array(u+1).join(a.subMenuDash)+n),e("<option />",{value:this.href,html:n,selected:this.href==window.location.href}).appendTo(t)}),t.change(function(){"#"!==e(this).val()&&(window.location.href=e(this).val())})}),this}}(jQuery);