﻿/* This page content all the script from the master pages */
/* You may give each page an identifying name, server, and channel on
the next lines. */
s.server = "plansponsor"
s.channel = ""
s.pageType = ""
s.prop1 = ""
s.prop2 = ""
s.prop3 = ""
s.prop4 = ""

s.prop6 = ""
s.prop7 = ""
s.prop8 = ""
s.prop9 = ""
s.prop10 = ""
s.prop11 = ""
s.prop12 = ""
s.prop13 = ""
s.prop14 = ""
s.prop15 = ""
/* Conversion Variables */
s.campaign = ""
s.state = ""
s.zip = ""
s.events = ""
s.products = ""
s.purchaseID = ""
s.eVar1 = ""
s.eVar2 = ""
s.eVar3 = ""
s.eVar4 = ""
s.eVar5 = ""
s.eVar6 = ""
s.eVar7 = ""
s.eVar8 = ""
s.eVar9 = ""
s.eVar10 = ""
s.eVar11 = ""
s.eVar12 = ""
s.eVar13 = ""
s.eVar14 = ""
s.eVar15 = ""
/* Hierarchy Variables */
s.hier1 = ""
/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code = s.t(); if (s_code) document.write(s_code)

/* End SiteCatalyst code version: H.19.4. */


ord = Math.random() * 10000000000000000;

$(function() {
    $("#tabs").tabs();
    $("#tabs-en").tabs();
    $("#subscribe_email_address").blur(function() {
        var strEmail = $(this).val();
        if (strEmail == '') {
            alert("can't be blank");
        }
        else {
            validate(strEmail);
        }
    });
    function validate(strEmail) {
        validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
        if (strEmail.search(validRegExp) == -1) {
            alert(" A valid e-mail address is required.\r\Please check you have entered your details correctly.");
            return false;
        }
    }
});

//THIS IS FOR THE LEFT SIDE NAVIGATION
$(document).ready(function() {
    //hide the all of the element with class msg_body
    $(".msg_body").hide();
    $(".msg_body_first").show();
    $(".msg_head_first").addClass("msg_active");
    //toggle the componenet with class msg_body
    $(".msg_head").click(function() {
        $(this).next(".msg_body").slideToggle(600);
        $(this).toggleClass("msg_active");
        $(this).next(".msg_body_first").slideToggle(600);
    });
    $(".msg_head_first").click(function() {
        $(this).next(".msg_body").slideToggle(600);
        $(this).toggleClass("msg_active");
        $(this).next(".msg_body_first").slideToggle(600);
    });
});

// This is for the script for the right column for tabs
$(function() {
    $("#liTab3").css("width", "150px");
    $("#liTab3 a h2").css("width", "150px");
    $("#liTab1").css("width", "91px");
    $("#liTab2").css("width", "91px");
});
$ektron(document).ready(function() {
    $ektron('#loginDialog').modal({
        trigger: '.loginlink',
        modal: true,
        onShow: function(hash) {
            /* callback executed via a trigger click using Ektron library slideDown animation */
            hash.w.slideDown();
        },
        onHide: function(hash) {
            /* callback executed on window hide using Ektron Library remove method. */
            hash.w.slideUp("slow", function() {
                if (hash.o) hash.o.remove();
            });
        }
    });
    function closeModal() {
        $ektron("#loginwindow").slideUp("slow");
        $ektron('#loginDialog').hide();
    };
});

// Search enter keydown event
$(function() {
    $ektron('.search_text').keydown(function(e) {
        if (e.keyCode == 13) {
            $ektron('.search_submit').click();
            return false;
        }
    });
});