var pullquote={init:function(arrOptions){var $skiplinks=arrOptions[0];var $skipintlinks=arrOptions[1];var $defside=arrOptions[2];var $altsides=arrOptions[3];var $alttext=arrOptions[4];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;}
if(!document.getElementById||!document.createElement||!document.appendChild)return false;var oElement,oClassName,oPullquote,oPullquoteP,oQuoteContent,i,j,k;var arrElements=document.getElementsByTagName('span');var oRegExp=new RegExp("(^|\\s)pullquote(\\s|$)");for(i=0;i<arrElements.length;i++){oElement=arrElements[i];oClassName=oElement.className
if(oRegExp.test(oClassName)){var oAltQuote=undefined;oPullquote=document.createElement($qcontainer);oPullquoteP=document.createElement('p');var oSideRegExp=new RegExp("(^|\\s)(pqRight|pqLeft)(\\s|$)");var oSideFound=oSideRegExp.exec(oClassName);if(oSideFound&&(oSideFound[2]=="pqLeft"||oSideFound[2]=="pqRight")){if(oSideFound[2]=="pqRight"){$quoteclass=$defquoteclassAlt;$defside='';}else{$quoteclass=$defquoteclass;$defside='';}}else if($altsides){if($defside!=''){$defside='';}else if($quoteclass==$defquoteclass){$quoteclass=$defquoteclassAlt;}else{$quoteclass=$defquoteclass;}}else{if($defside=='right'){var $quoteclass=$defquoteclassAlt;}else{var $quoteclass=$defquoteclass;}}
oPullquote.className=$quoteclass;if($alttext&&oElement.firstChild&&oElement.firstChild.nodeType==8){oAltQuote=document.createTextNode(oElement.firstChild.data);oPullquoteP.appendChild(oAltQuote);}else{for(j=0;j<oElement.childNodes.length;j++){var oCurrChild=oElement.childNodes[j];if(oCurrChild.nodeType==8){}else if(oCurrChild.nodeType==1&&oCurrChild.tagName.toLowerCase()=="a"&&(($skiplinks&&'#'!=oCurrChild.getAttribute('href').substr(0,1))||($skipintlinks&&'#'==oCurrChild.getAttribute('href').substr(0,1))||(!oCurrChild.getAttribute('href'))||(''==oCurrChild.getAttribute('href')))){for(k=0;k<oCurrChild.childNodes.length;k++){oAltQuote=pullquote.dupeNode(oCurrChild.childNodes[k],true);oPullquoteP.appendChild(oAltQuote);}}else{if(oCurrChild.nodeType==1&&oCurrChild.tagName.toLowerCase()=="a"){}
if(oAltQuote=pullquote.dupeNode(oCurrChild,true)){oPullquoteP.appendChild(oAltQuote);}}}}
if(oAltQuote!=undefined&&oAltQuote!=''){oPullquote.appendChild(oPullquoteP);oElement.parentNode.parentNode.insertBefore(oPullquote,oElement.parentNode);}}}},dupeNode:function($the_node,$include_all){var i;var $new_node=$the_node.cloneNode(false);if($new_node.nodeType==1){if($new_node.getAttribute('name')){$new_node.removeAttribute('name')};if($new_node.getAttribute('id')){$new_node.removeAttribute('id')};}
if($include_all&&$the_node.hasChildNodes()){for(i=0;i<$the_node.childNodes.length;i++){$child_node=arguments.callee($the_node.childNodes[i],true);$new_node.appendChild($child_node);}}
return $new_node;},addEvent:function(obj,type,fn){if(obj.addEventListener)
obj.addEventListener(type,fn,false);else if(obj.attachEvent)
{obj["e"+type+fn]=fn;obj[type+fn]=function(){obj["e"+type+fn](window.event);}
obj.attachEvent("on"+type,obj[type+fn]);}}};function pullQuoteOpts(arrOptions){pullquote.addEvent(window,'load',function(){pullquote.init(arrOptions);});}