// // home.js // var Serf = (function() { function initialize (){ Serf.Util.runIfClassNamePresent('page-home', initHome); } function initHome() { if(!Serf.Util.isMobile){ Serf.Nodes.init(); }else{ Serf.Home.mobileHero(); } } //api return { initialize: initialize } })();// // util.js // var Serf = Serf || {}; (function () { //check for mobile user agents var isMobile = (function(){ if( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) //|| navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i) ){ return true; } else { return false; } })() // calls the given function if the given classname is found function runIfClassNamePresent(selector, initFunction) { var elms = document.getElementsByClassName(selector); if (elms.length > 0) { initFunction(); } } Serf.Util = {}; Serf.Util.isMobile = isMobile; Serf.Util.runIfClassNamePresent = runIfClassNamePresent; })();// // home.js // var Serf = Serf || {}; (function () { // calls the given function if the given classname is found function mobileHero() { var jumbo = document.getElementById('jumbotron'); jumbo.className = jumbo.className + ' mobile-hero'; } Serf.Home = {}; Serf.Home.mobileHero = mobileHero; })();// // node.js // animation on the home page // var Serf = Serf || {}; (function () { var width = 1400, height = 490, border = 50, numberNodes = 128, linkGroup = 0; //nodeLinks = []; var nodes = []; for (i=0; i