LazyLoad = function () { var f = document, g, b = {}, e = { css: [], js: [] }, a; function j(l, k) { var m = f.createElement(l), d; for (d in k) { if (k.hasOwnProperty(d)) { m.setAttribute(d, k[d]) } } return m } function h(d) { var l = b[d]; if (!l) { return } var m = l.callback, k = l.urls; k.shift(); if (!k.length) { if (m) { m.call(l.scope || window, l.obj) } b[d] = null; if (e[d].length) { i(d) } } } function c() { if (a) { return } var k = navigator.userAgent, l = parseFloat, d; a = { gecko: 0, ie: 0, opera: 0, webkit: 0 }; d = k.match(/AppleWebKit\/(\S*)/); if (d && d[1]) { a.webkit = l(d[1]) } else { d = k.match(/MSIE\s([^;]*)/); if (d && d[1]) { a.ie = l(d[1]) } else { if ((/Gecko\/(\S*)/).test(k)) { a.gecko = 1; d = k.match(/rv:([^\s\)]*)/); if (d && d[1]) { a.gecko = l(d[1]) } } else { if (d = k.match(/Opera\/(\S*)/)) { a.opera = l(d[1]) } } } } } function i(r, q, s, m, t) { var n, o, l, k, d; c(); if (q) { q = q.constructor === Array ? q : [q]; if (r === "css" || a.gecko || a.opera) { e[r].push({ urls: [].concat(q), callback: s, obj: m, scope: t }) } else { for (n = 0, o = q.length; n < o; ++n) { e[r].push({ urls: [q[n]], callback: n === o - 1 ? s : null, obj: m, scope: t }) } } } if (b[r] || !(k = b[r] = e[r].shift())) { return } g = g || f.getElementsByTagName("head")[0]; q = k.urls; for (n = 0, o = q.length; n < o; ++n) { d = q[n]; if (r === "css") { l = j("link", { href: d, rel: "stylesheet", type: "text/css" }) } else { l = j("script", { src: d }) } if (a.ie) { l.onreadystatechange = function () { var p = this.readyState; if (p === "loaded" || p === "complete") { this.onreadystatechange = null; h(r) } } } else { if (r === "css" && (a.gecko || a.webkit)) { setTimeout(function () { h(r) }, 50 * o) } else { l.onload = l.onerror = function () { h(r) } } } g.appendChild(l) } } return { css: function (l, m, k, d) { i("css", l, m, k, d) }, js: function (l, m, k, d) { i("js", l, m, k, d) } } } ();

try {
    var jqueryIsLoaded = jQuery;
    jQueryIsLoaded = true;
}
catch (err) {
    var jQueryIsLoaded = false;
}

if (jQueryIsLoaded) {
    //alert('jquery already loaded');
    loadGlobalBar();
}
else {
    LazyLoad.js(['https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'], function () {
        //alert('jquery has been loaded');
        jQuery.noConflict();
        loadGlobalBar();
    });
}

function loadGlobalBar() {

    var cssNode = document.createElement('link');
    cssNode.type = 'text/css';
    cssNode.rel = 'stylesheet';
    cssNode.href = 'http://cdn.catchthefire.com/files/global/ctf-globalbar/ctf-globalbar.css';
    cssNode.media = 'screen';
    cssNode.title = 'dynamicLoadedSheet';
    document.getElementsByTagName("head")[0].appendChild(cssNode);


    var fragment = create('<div id="globalBorder"><div id="globalBar" style="height: 36px;overflow-x: hidden;overflow-y: hidden;"><div id="globalWrapper" style="width: 940px;"><a id="globalLogo" href="http://catchthefire.com" target="_BLANK"><img src="http://cdn.catchthefire.com/files/global/ctf-globalbar/logo.png" alt="ctf logo" style="display: inline;opacity: 1;"></a><div id="globalTrigger"><div class="arrow"><img src="http://cdn.catchthefire.com/files/global/ctf-globalbar/arrow.png" alt="V" style="display: inline;"></div><div id="networkReplace"><img id="network" alt="Catch the Fire Network" src="http://cdn.catchthefire.com/files/global/ctf-globalbar/network.png" style="display: inline;opacity: 1;"></div><div class="arrow"><img src="http://cdn.catchthefire.com/files/global/ctf-globalbar/arrow.png" alt="V" style="display: inline;"></div></div><div id="globalNetwork" style="opacity: 0;"><div class="globalBlock" id="globalLinks" style="opacity: 0;"><h2> Quick Links</h2><p> Our main site contains information about our vision, leadership, history and regional event listings.</p><ul class="globalList"><span><h3> HOME</h3><li><a href="http://catchthefire.com">www.catchthefire.com</a></li></span><span><h3> ABOUT US</h3><li><a href="http://catchthefire.com/about">www.catchthefire.com/about</a></li></span><span><h3> CHURCHES</h3><li><a href="http://catchthefire.com/churches">www.catchthefire.com/churches</a></li></span><span><h3> EVENTS</h3><li><a href="http://catchthefire.com/events">www.catchthefire.com/events</a></li></span><span><h3> COLLEGE</h3><li><a href="http://catchthefire.com/college">www.catchthefire.com/college</a></li></span><span><h3> WORLD CHANGERS</h3><li><a href="http://catchthefire.com/world-changers">www.catchthefire.com/world-changers</a></li></span></ul></div><div class="globalBlock" id="globalChurches" style="opacity: 0;"><h2> Catch the Fire Churches</h2><p> Our rapidly growing family of churches, planted internationally by Catch The Fire. Including...</p><ul class="globalList"><span><h3><span>CATCH THE FIRE</span> TORONTO, CA</h3><li><a href="http://ctftoronto.com">www.ctftoronto.com</a></li></span><span><h3><span>CATCH THE FIRE</span> RALEIGH, USA</h3><li><a href="http://ctfraleigh.com">www.ctfraleigh.com</a></li></span><span><h3><span>CATCH THE FIRE</span> LONDON, UK</h3><li><a href="http://ctflondon.com">www.ctflondon.com</a></li></span><span><h3><span>CATCH THE FIRE</span> REYKJAVIK, IC</h3><li><a href="http://ctfreykjavik.com">www.ctfreykjavik.com</a></li></span><span><h3><span>CATCH THE FIRE</span> OSLO, NO</h3><li><a href="http://ctfoslo.com">www.ctfoslo.com</a></li></span><span><h3><span>CATCH THE FIRE</span> MONTREAL,CA</h3><li><a href="http://ctfmontreal.com">www.ctfmontreal.com</a></li></span><span><h3><span>CATCH THE FIRE</span> HOUSTON, USA</h3><li><a href="http://ctfhouston.com">www.ctfhouston.com</a></li></span></ul><br/></div><div class="globalBlock" id="globalColleges" style="opacity: 0;"><h2> Catch the Fire College</h2><p> Our college encompases all our training seminars and schools, below are some of our full-time campuses.</p><ul class="globalList"><span><h3><span>SOM</span> TORONTO, CA</h3><li><a href="http://som.catchthefire.com">som.catchthefire.com</a></li></span><span><h3><span>SOM</span> CAPETOWN, SA</h3><li><a href="http://www.ctf-som-sa.com">www.ctf-som-sa.com</a></li></span><span><h3><span>SOM</span> SAPIRANGA, BR</h3><li><a href="http://www.escoladeministerios.org">escoladeministerios.org</a></li></span><span><h3><span>SOM</span> OSLO, NO</h3><li><a href="http://som.catchthefire.com">som.catchthefire.com/oslo</a></li></span><span><h3><span>SOM</span> MANCHESTER, UK</h3><li><a href="http://www.idestiny.org.uk">idestiny.org.uk</a></li></span><span><h3><span>SOR</span> RALEIGH, USA</h3><li><a href="http://www.schoolofrevival.com">www.schoolofrevival.com</a></li></span></ul></div><div class="globalBlock" id="globalOther" style="opacity: 0;"><span><h2> CatchTheFire.TV</h2><p> This is our online video site with live streaming and archives of previous conferences and church meetings.</p><ul class="globalList"><li><a href="http://catchthefire.tv">www.catchthefire.tv</a></li></ul></span><span><h2> John and Carol</h2><p> John & Carol Arnott&#39;s personal itinerary and updates.</p><ul class="globalList"><li><a href="http://johnandcarol.org">www.johnandcarol.org</a></li></ul></span><span><h2> Partners In Harvest</h2><p> We are part of a global relational network of churches and ministries called Partners in Harvest.</p><ul class="globalList"><li><a href="http://partnersinharvest.org">www.partnersinharvest.org</a></li></ul></span></div></div></div></div></div>');
    document.body.insertBefore(fragment, document.body.childNodes[0]);

    jQuery.extend(jQuery.easing, { easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t = t / d - 1) * t) + b; } });
    jQuery(document).ready(

    function () {

        //jQuery('head').append('<link href="http://cdn.catchthefire.com/files/global/ctf-globalbar/ctf-globalbar.css" rel="stylesheet" type="text/css" />');

        jQuery('#globalWrapper').css('width', pageWidth);
        jQuery('#globalNetwork').animate({ opacity: '0' }, 0);
        var isHidden = 1;
        jQuery('#globalBar').hover(function () { jQuery(this).find('#globalLogo img').stop().fadeTo('normal', 0, function () { jQuery(this).hide() }); }, function () { jQuery(this).find('#globalLogo img').stop().fadeTo('normal', 1).show(); });
        jQuery('#globalTrigger').hover(function () { jQuery(this).find('#networkReplace img').stop().fadeTo('normal', 0, function () { jQuery(this).hide() }); }, function () { jQuery(this).find('#networkReplace img').stop().fadeTo('normal', 1).show(); });
        jQuery('.globalList span').hover(function () { jQuery(this).find('a').addClass('hovering'); }, function () { jQuery(this).find('a').removeClass('hovering'); }); jQuery('.globalList span').click(function () { jQuery(this).find('a').each(function () { window.location = this.href; }); });
        jQuery('#globalOther span').hover(function () { jQuery(this).find('a').addClass('hovering'); }, function () { jQuery(this).find('a').removeClass('hovering'); }); jQuery('#globalOther span').click(function () { jQuery(this).find('a').each(function () { window.location = this.href; }); });
        jQuery('#globalTrigger').click(function () { if (isHidden == 1) { jQuery('#globalBar').stop().animate({ 'height': '440px' }, { queue: false, duration: 900, easing: 'easeOutCirc' }); jQuery('#globalNetwork').stop().animate({ opacity: 1.0 }, { queue: false, duration: 500 }); jQuery('#globalNetwork .globalBlock ').stop().animate({ opacity: 1.0 }, { queue: false, duration: 500 }); jQuery('#globalTrigger div.arrow img').stop().fadeOut(400); isHidden = 0; } else { jQuery('#globalNetwork').stop().animate({ opacity: 0 }, { queue: false, duration: 500 }); jQuery('#globalBar').stop().animate({ 'height': '36px' }, { queue: false, duration: 900, easing: 'easeOutCirc' }); jQuery('#globalNetwork .globalBlock ').stop().animate({ opacity: 0 }, { queue: false, duration: 500 }); jQuery('#globalTrigger div.arrow img').stop().fadeIn(400); isHidden = 1; } });
    });
}

function create(htmlStr) {
    var frag = document.createDocumentFragment(),
        temp = document.createElement('div');
    temp.innerHTML = htmlStr;
    while (temp.firstChild) {
        frag.appendChild(temp.firstChild);
    }
    return frag;
}

