/* This is loaded in the of each page */ var pullquote = { init : function(arrOptions) { // Get options and set defaults as needed var $skiplinks = arrOptions[0]; var $skipintlinks = arrOptions[1]; var $defside = arrOptions[2]; var $altsides = arrOptions[3]; var $alttext = arrOptions[4]; // var $capfirst = arrOptions[5]; var $qcontainer = arrOptions[5]; if ($qcontainer=='') {$qcontainer='blockquote';}; var $defquoteclass = arrOptions[6]; if ($defquoteclass=='') {$defquoteclass='pullquote';}; var $defquoteclassAlt = arrOptions[7]; if ($defquoteclassAlt=='') {$defquoteclass='pullquote pqRight';}; if ($defside == 'right') { var $quoteclass = $defquoteclassAlt; } else { var $quoteclass = $defquoteclass; } // Check that the browser supports the methods used if (!document.getElementById || !document.createElement || !document.appendChild) return false; var oElement, oClassName, oPullquote, oPullquoteP, oQuoteContent, i, j, k; // Find all span elements var arrElements = document.getElementsByTagName('span'); var oRegExp = new RegExp("(^|\\s)pullquote(\\s|$)"); // loop through all span elements for (i=0; i var oCurrChild = oElement.childNodes[j]; if (oCurrChild.nodeType == 8) { // if an HTML comment, do nothing! } else if ( oCurrChild.nodeType == 1 && oCurrChild.tagName.toLowerCase() == "a" && ( // if it's an HTML "a" tag, and... ( $skiplinks && '#' != oCurrChild.getAttribute('href').substr(0,1) ) || // external link, or... ( $skipintlinks && '#' == oCurrChild.getAttribute('href').substr(0,1) ) || // internal (href="#id") link, or... ( !oCurrChild.getAttribute('href') ) || // no href, or... ( '' == oCurrChild.getAttribute('href') ) // href is blank ) ) { // Apply the append loop to node's decendants, but not the A tag itself (assumes there is not another A tag within the A tag, as that would be illegal) for(k=0;k