$(document).ready(function () {

    /* --------------- SEARCH BOX  --------------- */
    $(".inpt").addClass('inp_off');
    $(".inpt").focus(function () {
        $(this).removeClass('inp_off');
        $(this).addClass('inp_on');
    });
    $(".inpt").blur(function () {
        $(this).removeClass('inp_on');
        $(this).addClass('inp_off');
    });
    /* ------------------------------------------ */

    /* --------------- INFO OVERLAY ------------- */

    $("span.info_ico").click(function () {
        $("span.info_ico").animate({ opacity: 'hide' }, "fast");
        $("#info_overlay").animate({ opacity: 'show' }, "slow");
    });

    $("#btn_close").click(function () {
        $("span.info_ico").animate({ opacity: 'show' }, "fast");
        $("#info_overlay").animate({ opacity: 'hide' }, "slow");
    });

    /* ------------------------------------------ */

    /* --------------- CONSUMER SECTOR LIGHT BOX ----------- */
    $("#con_trig").click(function () {
        $("#con_sec_box").animate({ opacity: 'show' }, "fast");
    });

    $(".btn_close").click(function () {
        $("#con_sec_box").animate({ opacity: 'hide' }, "fast");
    });
    /* ----------------------------------------------------- */


    /* ------------------ page refresh  ------------------- */



    /* ----------------- lightbox ------------------------- */
    $('a.lightboxContent').cluetiplightbox({ activation: 'click', showTitle: false, leftOffset: 0, topOffset: 0, positionBy: 'fixed', cursor: 'pointer', onShow: function(ct, c){ Cufon.replace('h2, h1', { fontFamily: 'Baker' })} });
    $('a.lightboxWideContent').cluetiplightbox({ activation: 'click', showTitle: false, leftOffset: 0, topOffset: 0, positionBy: 'fixed', cursor: 'pointer', onShow: function(ct, c){ Cufon.replace('h2, h1', { fontFamily: 'Baker' })} });
    /* ---------------------------------------------------- */
});

/* ------------------ font resize ------------------- */
var mytextsizer2 = new fluidtextresizer({
    controlsdiv: "", //id of special div containing your resize controls. Enter "" if not defined
    targets: ["body"], //target elements to resize text within: ["selector1", "selector2", etc]
    levels: 3, //number of levels users can magnify (or shrink) text
    persist: "none", //enter "session" or "none"
    animate: 0 //animation duration of text resize. Enter 0 to disable
})
var global_counter = 0;
function font_resize() {
    global_counter++
    if (global_counter > 2) {
        global_counter = 0;
    }
    mytextsizer2.setFontLevel(global_counter);
}
/* ---------------------------------------------------- */
