$(function () {
    //$('#search').formwatermark();
    $('.accordian').accordian();
    $('#main_nav').navigation();
    fontface();
    $('#sub').delay(500).background();
     var patt = new RegExp(/[a-z0-9]+\.(com|net|org)/i);
    $('a[href^="http"]').externallink({ url: url_frag.match(patt)[0], message: "You are now leaving Laredo Petroleum's website. We provide this link as a resource to you, but we do not endorse or have any control of this external content." });
    $(window).resize(function () {
        $('#sub').background();
    });
    $('#sub-content img').eq(0).load(function () {
        $('#sub').delay(100).background();
    });

    $('.operations').operations();
});
function fontface() {
    var special_font = [
            '.page-title'
      ];

    for (i in special_font) {
        $(special_font[i]).each(function () {
            $(this).addClass('custom_font').addClass('typeface-js');
        });
    }

    var font_face = "ag_foreigner_bold_italic.typeface.js";
    $.getScript(url_frag + "/scripts/" + font_face, function () {
        _typeface_js.renderDocument();
    });
    /*
    var special_font_bold = [
    '.crazy'
    ];
    for (i in special_font_bold) {
    $(special_font_bold[i]).each(function () {
    $(this).hide().addClass('custom_font_bold').addClass('typeface-js');
    });
    }
    var font_face_bold = "titilliumtext22l_xbold.typeface.js";
    $.getScript(url_frag + "/scripts/" + font_face_bold, function () {
    _typeface_js.renderDocument();
    $('.custom_font,.custom_font_bold').show();
    });
    */
}
