// -------------------------------------------------------------
// Knihovna JavaScriptu pro stranky www.oborsky.cz
// -------------------------------------------------------------

var quotes_nav = navigator.userAgent, quotes_level = 0, quotes_ancestors = '', quotes_lastLength = 0;
var oldBodyText, newBodyText, reg
var quotes_i, quotes_elm;

isIE = ((quotes_nav.indexOf('MSIE')!=-1 && quotes_nav.indexOf('Opera')==-1 && parseFloat(quotes_nav.substr(quotes_nav.indexOf('MSIE')+5,4))<=6 && quotes_nav.indexOf('Win')!=-1)) ? true:false;

// -------------------------------------------------------------
// zacatek: Marek Prokop hack pro atribut title u ABBR

if (isIE) {
    oldBodyText = document.body.innerHTML;
    reg = /<ABBR([^>]*)>([^<]*)<\/ABBR>/g;
    newBodyText = oldBodyText.replace(reg, '<abbr $1><span class=\"abbr\" $1>$2</span></abbr>');
    document.body.innerHTML = newBodyText;
}

// konec: Marek Prokop hack pro atribut title u ABBR
// -------------------------------------------------------------
// zacatek: Martin Snizek hack pro uvozovky kolem Q a BLOCKQUOTE 

if (isIE) {
    for (quotes_i = quotes_lastLength; quotes_i < document.all.length; quotes_i++) {
        quotes_elm = document.all[quotes_i];
        if (quotes_elm.tagName.toLowerCase()=='q') {
            quotes_elm.innerHTML = '&#8222;' + quotes_elm.innerHTML + '&#8220;';
            quotes_level = 0;
        }
        else if (quotes_elm.tagName.toLowerCase() == 'p' && quotes_elm.parentElement.tagName.toLowerCase() == 'blockquote') quotes_elm.innerHTML = '&#8222;' + quotes_elm.innerHTML + '&#8220;';
    }
}

// konec: Martin Snizek hack pro uvozovky kolem Q a BLOCKQUOTE
// -------------------------------------------------------------