// Initialize sIFR if (typeof sIFR == "function"){ sIFR.replaceElement("#content-main h1", named({sFlashSrc: "images/fonts/futura-std-light.swf", sColor: "#006ebc"})) } YAHOO.util.Dom.getElementsByExternal = function(root) { var method = function(el) { if (el.href.indexOf(location.hostname) > -1 || el.href.indexOf(':') == -1) { return false; } return true; }; return this.getElementsBy(method, 'a', root); }; YAHOO.util.Dom.getElementsByInternal = function(root) { var method = function(el) { if (el.href.indexOf(location.hostname) > -1 || el.href.indexOf(':') == -1) { return true; } return false; }; return this.getElementsBy(method, 'a', root); }; YAHOO.util.Dom.getElementsByAttribute = function(atr, val, tag, root) { var method = function(el) { var re = new RegExp('(?:^|\\s+)' + val + '(?:\\s+|$)'); if ( el.getAttribute(atr) && re.test(el.getAttribute(atr)) ) { return true; } return false; }; return this.getElementsBy(method, tag, root); }; YAHOO.routeLinks = function() { var $D = YAHOO.util.Dom; var $E = YAHOO.util.Event; var $ = $D.get; return { init : function() { var helpLinks = $D.getElementsByAttribute('rel','help','a','container'); var externalLinks = $D.getElementsByExternal('container'); $E.on([helpLinks, externalLinks], 'click', function(e) { $E.stopEvent(e); window.open(this.href); }); }, help : function(e) { var helpLinks = $D.getElementsByAttribute('rel','help','a','container'); $D.batch(helpLinks, function(oEl) { oEl.className = 'help'; }); }, external : function(e) { var externalLinks = $D.getElementsByExternal('container'); $D.batch(externalLinks, function(oEl) { oEl.className = 'external'; }); } }; }();