(function($){
// Open external links in new window
var externalLinks = function(){
var host = location.host;
$('body').on('click', 'a', function(e){
var href = this.href,
link = href.replace(/https?:\/\/([^\/]+)(.*)/, '$1');
if (link != host){
window.open(href);
e.preventDefault();
}
});
};
// Append menu for mobile device
var navigationMenu = function(){
var appends = '';
var search = function(obj, level){
var children = obj.children(),
link = children.eq(0),
_level = level + 1;
appends += '