var xhr_done_auth = true;
doc.addEventListener ? window.addEventListener( 'load', init, false ) : window.attachEvent( 'onload', init );
function init () {
doc = document;
body = doc.body;
var el_auth = doc.getElementById( 'xt_auth_container' );
doc.addEventListener ? el_auth.addEventListener( 'click', hook_xhr_action, false ) : el_auth.attachEvent( 'onclick', hook_xhr_action );
if ( 'backgroundSize' in doc.body.style ) {
if ( window.devicePixelRatio && window.devicePixelRatio > 1 ) {
el_auth.className += ' xt_auth_icon_enchanted';
}
}
}
// bind xhr links
function hook_xhr_action ( e ) {
var e =