/** * @author keith */ function breadcrumb(el){ el = document.getElementById(el); el.parentNode.className="active"; if(el.parentNode.parentNode.parentNode.nodeName == 'LI') el.parentNode.parentNode.parentNode.className = 'active'; } function xtractFile_sans(data){ var m = data.match(/(.*)[\/\\]([^\/\\]+)\.\w+$/); return {file: m == null ? 'about' : m[2]} } window.onload = function() { //console.log(xtractFile_sans(window.location.href).file.replace(/(_video|_gallery)($)/, '')); breadcrumb(xtractFile_sans(window.location.href).file.replace(/(_video|_gallery)($)/, '')); if(xtractFile_sans(window.location.href).file.indexOf('gallery') != -1) setupZoom(); }