﻿/*! ADServe v1 <http://nvinteractive.co.nz>
Copyright (c) NV Interactive
	
References:
jquery-1.2.6.js
		
Release Notes:

		
*/

/* [ Ad declarations ] */
/* Only one replace will occur per page, order is important. */

var ads = new Array(


{
    include: "/content/domestic/points-table/hrv-cup.aspx",
    html: '<a id="header-sponsor" href="http://www.hrv.co.nz/" target="_blank"><img src="/images/sponsors/hrv.gif" width="130" height="100" alt="Brought to you by HRV" /></a>',
    element: ".content_header",
    operation: "prepend"
}


)



adserve = function() {

    var init = function() {

        for (var i in ads) {
            var ad = ads[i];

            var re_include = new RegExp(ad.include, "gim");
            var re_exclude = new RegExp(ad.exclude, "gim");

            if (re_include.test(window.location)) {
                if (!(ad.exclude != undefined && re_exclude.test(window.location)))
                    $(ad.element)[ad.operation](ad.html);
            }
        }

    }

    return {
        /* Public API
        */
        init: init
    }

} ();

$(document).ready(adserve.init);