// JavaScript Document
function whichBrs() {
    var agt = navigator.userAgent.toLowerCase();
    if (((agt.indexOf("firefox") != -1) && (agt.indexOf("macintosh") != -1)) || ((agt.indexOf("mozilla/5.0 (windows; u; windows nt 5.1; en-gb; rv:1.9.1.5)") != -1) && (agt.indexOf("firefox") != -1))) {
        return 'hackpos'
    }
    else {
        return 'nohackpos'
    };
}
var browserName = whichBrs();
var droplinemenu = {
    animateduration: {
        over: 1,
        out: 1
    },
    buildmenu: function (menuid) {
        jQuery.easing['BounceEaseOut'] = function (x, t, b, c, d) {
            if (t == 0) return b;
            if (t == d) return b + c;
            if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
            return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
        };
        jQuery(document).ready(function ($) {
            if (jQuery("#stripe-wrap #carousel").length) {
                switch (jQuery('#theme').text()) {
                case "0":
                    jQuery("#stripe-wrap").css({
                        "background-image": "url(img/blue/bluestripes-home.png)"
                    });
                    break;
                case "1":
                    jQuery("#stripe-wrap").css({
                        "background-image": "url(img/green/greenstripes-home.png)"
                    });
                    break;
                case "2":
                    jQuery("#stripe-wrap").css({
                        "background-image": "url(img/yellow/yellowstripes-home.png)"
                    });
                    break;
                }
            }
            $start = parseInt(jQuery('#theme').text()) + 1;
            if (location.href.indexOf("index2.php") > 0) {
                jQuery('#body-wrap').css({
                    'background-image': 'none'
                });
            }
            var Browser = {
                Version: function () {
                    var version = 999;
                    // we assume a sane browser
                    if (navigator.appVersion.indexOf("MSIE") != -1) // bah, IE again, lets downgrade version number
                    version = parseFloat(navigator.appVersion.split("MSIE")[1]);
                    return version;
                }
            }
            if (Browser.Version() < 7) {
                if (location.href.indexOf("a-z.php") > 0 || location.href.indexOf("entertainment.php") > 0 || location.href.indexOf("hampshire.php") > 0 || location.href.indexOf("places-to-eat.php") > 0) {
                    jQuery('#stripe-wrap').css({
                        'background-position': '0 0'
                    });
                    jQuery('#back-wrap').css({
                        'background-position': '-4px 0'
                    });
                }
            }
            jQuery('#mycarousel').jcarousel({
                easing: 'BounceEaseOut',
                animation: 1000,
                wrap: 'circular',
                size: 3,
                start: $start,
                itemFirstInCallback: mycarousel_itemFirstInCallback,
                scroll: 1
            });
            function mycarousel_itemFirstInCallback(carousel, item, idx, state) {
                idxDec = (idx / 3).toFixed(1).toString().split('.')[1];
		if(idx<0) {
			var newidxDec=0;
			if (idxDec == 3) {newidxDec = 7};
			if (idxDec == 7) {newidxDec = 3};
			if (idxDec == 1) {newidxDec = 1};
			idxDec = newidxDec;
		}
                jQuery('#back-wrap').removeClass();
                jQuery('#footer-back').removeClass();
                jQuery('a').removeClass();
                jQuery('body').removeClass();
                jQuery('h1').removeClass();
                jQuery('#stripe-wrap').removeClass();
                jQuery('#prevButton').removeClass();
                jQuery('#showalljobs').removeClass();
                jQuery('#h_movie_content').removeClass();
                jQuery('#nextButton').removeClass();
                jQuery('#mainmenu').removeClass();
                jQuery('#welcomeTitle').removeClass();
                jQuery('#videoTitle').removeClass();
jQuery('#gptwimg').removeClass();
jQuery('#gptwimgover').removeClass();
                jQuery('#viewallbutton').removeClass();
                jQuery('#latestejobspaneltitle').removeClass();
                jQuery('#module-top').removeClass();
                jQuery('#module-bottom').removeClass();
                jQuery('#hometopdivider').removeClass();
                jQuery('#carousel').css({
                    visibility: 'visible'
                });
                if (idxDec == "3") {
                    if (jQuery('#vidthumb1').attr("src").indexOf("/1/") > -1) {
                        var src = jQuery('#vidthumb1').attr("src").replace("/1/", "/0/");
                        jQuery('#vidthumb1').attr("src", src);
                    }
                    if (jQuery('#vidthumb1').attr("src").indexOf("/2/") > -1) {
                        var src = jQuery('#vidthumb1').attr("src").replace("/2/", "/0/");
                        jQuery('#vidthumb1').attr("src", src);
                    }
                    if (jQuery('#vidthumb2').attr("src").indexOf("/1/") > -1) {
                        var src = jQuery('#vidthumb2').attr("src").replace("/1/", "/0/");
                        jQuery('#vidthumb2').attr("src", src);
                    }
                    if (jQuery('#vidthumb2').attr("src").indexOf("/2/") > -1) {
                        var src = jQuery('#vidthumb2').attr("src").replace("/2/", "/0/");
                        jQuery('#vidthumb2').attr("src", src);
                    }
                    if (jQuery('#footerrolloptions').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#footerrolloptions').attr("src").replace("-green", "-blue");
                        jQuery('#footerrolloptions').attr("src", src);
                    }
                    if (jQuery('#footerrolloptions').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#footerrolloptions').attr("src").replace("-yellow", "-blue");
                        jQuery('#footerrolloptions').attr("src", src);
                    }
                    if (jQuery('#viewallbutton').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#viewallbutton').attr("src").replace("-green", "-blue");
                        jQuery('#viewallbutton').attr("src", src);
                    }
                    if (jQuery('#viewallbutton').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#viewallbutton').attr("src").replace("-yellow", "-blue");
                        jQuery('#viewallbutton').attr("src", src);
                    }
                    if (jQuery('#viewallbuttonover').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#viewallbuttonover').attr("src").replace("-green", "-blue");
                        jQuery('#viewallbuttonover').attr("src", src);
                    }
                    if (jQuery('#viewallbuttonover').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#viewallbuttonover').attr("src").replace("-yellow", "-blue");
                        jQuery('#viewallbuttonover').attr("src", src);
                    }
                    if (jQuery('#showbutton').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#showbutton').attr("src").replace("-green", "-blue");
                        jQuery('#showbutton').attr("src", src);
                    }
                    if (jQuery('#showbutton').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#showbutton').attr("src").replace("-yellow", "-blue");
                        jQuery('#showbutton').attr("src", src);
                    }
                    if (jQuery('#showbuttonover').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#showbuttonover').attr("src").replace("-green", "-blue");
                        jQuery('#showbuttonover').attr("src", src);
                    }
                    if (jQuery('#showbuttonover').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#showbuttonover').attr("src").replace("-yellow", "-blue");
                        jQuery('#showbuttonover').attr("src", src);
                    }
                    if (jQuery('#footerrollovaltine').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#footerrollovaltine').attr("src").replace("-green", "-blue");
                        jQuery('#footerrollovaltine').attr("src", src);
                    }
                    if (jQuery('#footerrollovaltine').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#footerrollovaltine').attr("src").replace("-yellow", "-blue");
                        jQuery('#footerrollovaltine').attr("src", src);
                    }
                    if (jQuery('#footerrolltwinings').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#footerrolltwinings').attr("src").replace("-green", "-blue");
                        jQuery('#footerrolltwinings').attr("src", src);
                    }
                    if (jQuery('#footerrolltwinings').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#footerrolltwinings').attr("src").replace("-yellow", "-blue");
                        jQuery('#footerrolltwinings').attr("src", src);
                    }
                    if (jQuery('#footerrolljacksons').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#footerrolljacksons').attr("src").replace("-green", "-blue");
                        jQuery('#footerrolljacksons').attr("src", src);
                    }
                    if (jQuery('#footerrolljacksons').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#footerrolljacksons').attr("src").replace("-yellow", "-blue");
                        jQuery('#footerrolljacksons').attr("src", src);
                    }
                    if (jQuery('#footerrollnambarrie').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#footerrollnambarrie').attr("src").replace("-green", "-blue");
                        jQuery('#footerrollnambarrie').attr("src", src);
                    }
                    if (jQuery('#footerrollnambarrie').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#footerrollnambarrie').attr("src").replace("-yellow", "-blue");
                        jQuery('#footerrollnambarrie').attr("src", src);
                    }
if (jQuery('#gptwimg').attr("src").indexOf("_green") > -1) {
                        var src = jQuery('#gptwimg').attr("src").replace("_green", "_blue");
                        jQuery('#gptwimg').attr("src", src);
                    }
                    if (jQuery('#gptwimg').attr("src").indexOf("_yellow") > -1) {
                        var src = jQuery('#gptwimg').attr("src").replace("_yellow", "_blue");
                        jQuery('#gptwimg').attr("src", src);
                    }
if (jQuery('#gptwimgover').attr("src").indexOf("_green") > -1) {
                        var src = jQuery('#gptwimgover').attr("src").replace("_green", "_blue");
                        jQuery('#gptwimgover').attr("src", src);
                    }
                    if (jQuery('#gptwimgover').attr("src").indexOf("_yellow") > -1) {
                        var src = jQuery('#gptwimgover').attr("src").replace("_yellow", "_blue");
                        jQuery('#gptwimgover').attr("src", src);
                    }

                    jQuery('#back-wrap').addClass('blue');
                    jQuery('body').addClass('blue');
                    jQuery('a').addClass('blue');
                    jQuery('h1').addClass('blue');
                    jQuery('#stripe-wrap').addClass('blue');
                    jQuery('#h_movie_content').addClass('blue');
                    jQuery('#showalljobs').addClass('blue');
                    jQuery('#footer-back').addClass('blue');
                    jQuery('#mainmenu').addClass('blue');
                    jQuery('#welcomeTitle').addClass('blue');
                    jQuery('#videoTitle').addClass('blue');
                    jQuery('#viewallbutton').addClass('blue');
                    jQuery('#latestejobspaneltitle').addClass('blue');
                    jQuery('#module-top').addClass('blue');
                    jQuery('#module-bottom').addClass('blue');
                    jQuery('#hometopdivider').addClass('blue');
                    jQuery('#prevButton').addClass('jcarousel-prev jcarousel-prev-horizontal blue');
                    jQuery('#nextButton').addClass('jcarousel-next jcarousel-next-horizontal blue');
                    jQuery("#stripe-wrap").css({
                        "background-image": "url(img/blue/bluestripes-home.png)"
                    });
                    $.post("includes/themesession.php", {
                        colour: 'blue'
                    });
                }
                if (idxDec == "7") {
                    if (jQuery('#vidthumb1').attr("src").indexOf("/0/") > -1) {
                        var src = jQuery('#vidthumb1').attr("src").replace("/0/", "/1/");
                        jQuery('#vidthumb1').attr("src", src);
                    }
                    if (jQuery('#vidthumb1').attr("src").indexOf("/2/") > -1) {
                        var src = jQuery('#vidthumb1').attr("src").replace("/2/", "/1/");
                        jQuery('#vidthumb1').attr("src", src);
                    }
                    if (jQuery('#vidthumb2').attr("src").indexOf("/0/") > -1) {
                        var src = jQuery('#vidthumb2').attr("src").replace("/0/", "/1/");
                        jQuery('#vidthumb2').attr("src", src);
                    }
                    if (jQuery('#vidthumb2').attr("src").indexOf("/2/") > -1) {
                        var src = jQuery('#vidthumb2').attr("src").replace("/2/", "/1/");
                        jQuery('#vidthumb2').attr("src", src);
                    }
                    if (jQuery('#viewallbutton').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#viewallbutton').attr("src").replace("-blue", "-green");
                        jQuery('#viewallbutton').attr("src", src);
                    }
                    if (jQuery('#viewallbutton').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#viewallbutton').attr("src").replace("-yellow", "-green");
                        jQuery('#viewallbutton').attr("src", src);
                    }
                    if (jQuery('#viewallbuttonover').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#viewallbuttonover').attr("src").replace("-blue", "-green");
                        jQuery('#viewallbuttonover').attr("src", src);
                    }
                    if (jQuery('#viewallbuttonover').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#viewallbuttonover').attr("src").replace("-yellow", "-green");
                        jQuery('#viewallbuttonover').attr("src", src);
                    }
                    if (jQuery('#showbutton').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#showbutton').attr("src").replace("-blue", "-green");
                        jQuery('#showbutton').attr("src", src);
                    }
                    if (jQuery('#showbutton').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#showbutton').attr("src").replace("-yellow", "-green");
                        jQuery('#showbutton').attr("src", src);
                    }
   if (jQuery('#gptwimg').attr("src").indexOf("_blue") > -1) {
                        var src = jQuery('#gptwimg').attr("src").replace("_blue", "_green");
                        jQuery('#gptwimg').attr("src", src);
                    }
                    if (jQuery('#gptwimg').attr("src").indexOf("_yellow") > -1) {
                        var src = jQuery('#gptwimg').attr("src").replace("_yellow", "_green");
                        jQuery('#gptwimg').attr("src", src);
                    }
   if (jQuery('#gptwimgover').attr("src").indexOf("_blue") > -1) {
                        var src = jQuery('#gptwimgover').attr("src").replace("_blue", "_green");
                        jQuery('#gptwimgover').attr("src", src);
                    }
                    if (jQuery('#gptwimgover').attr("src").indexOf("_yellow") > -1) {
                        var src = jQuery('#gptwimgover').attr("src").replace("_yellow", "_green");
                        jQuery('#gptwimgover').attr("src", src);
                    }
                    if (jQuery('#showbuttonover').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#showbuttonover').attr("src").replace("-blue", "-green");
                        jQuery('#showbuttonover').attr("src", src);
                    }
                    if (jQuery('#showbuttonover').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#showbuttonover').attr("src").replace("-yellow", "-green");
                        jQuery('#showbuttonover').attr("src", src);
                    }
                    if (jQuery('#footerrolloptions').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#footerrolloptions').attr("src").replace("-blue", "-green");
                        jQuery('#footerrolloptions').attr("src", src);
                    }
                    if (jQuery('#footerrolloptions').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#footerrolloptions').attr("src").replace("-yellow", "-green");
                        jQuery('#footerrolloptions').attr("src", src);
                    }
                    if (jQuery('#footerrollovaltine').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#footerrollovaltine').attr("src").replace("-blue", "-green");
                        jQuery('#footerrollovaltine').attr("src", src);
                    }
                    if (jQuery('#footerrollovaltine').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#footerrollovaltine').attr("src").replace("-yellow", "-green");
                        jQuery('#footerrollovaltine').attr("src", src);
                    }
                    if (jQuery('#footerrolltwinings').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#footerrolltwinings').attr("src").replace("-blue", "-green");
                        jQuery('#footerrolltwinings').attr("src", src);
                    }
                    if (jQuery('#footerrolltwinings').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#footerrolltwinings').attr("src").replace("-yellow", "-green");
                        jQuery('#footerrolltwinings').attr("src", src);
                    }
                    if (jQuery('#footerrolljacksons').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#footerrolljacksons').attr("src").replace("-blue", "-green");
                        jQuery('#footerrolljacksons').attr("src", src);
                    }
                    if (jQuery('#footerrolljacksons').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#footerrolljacksons').attr("src").replace("-yellow", "-green");
                        jQuery('#footerrolljacksons').attr("src", src);
                    }
                    if (jQuery('#footerrollnambarrie').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#footerrollnambarrie').attr("src").replace("-blue", "-green");
                        jQuery('#footerrollnambarrie').attr("src", src);
                    }
                    if (jQuery('#footerrollnambarrie').attr("src").indexOf("-yellow") > -1) {
                        var src = jQuery('#footerrollnambarrie').attr("src").replace("-yellow", "-green");
                        jQuery('#footerrollnambarrie').attr("src", src);
                    }
                    jQuery('#back-wrap').addClass('green');
                    jQuery('body').addClass('green');
                    jQuery('a').addClass('green');
                    jQuery('h1').addClass('green');
                    jQuery('#h_movie_content').addClass('green');
                    jQuery('#stripe-wrap').addClass('green');
                    jQuery('#footer-back').addClass('green');
                    jQuery('#mainmenu').addClass('green');
                    jQuery('#showalljobs').addClass('green');
                    jQuery('#welcomeTitle').addClass('green');
                    jQuery('#videoTitle').addClass('green');
                    jQuery('#viewallbutton').addClass('green');
                    jQuery('#latestejobspaneltitle').addClass('green');
                    jQuery('#module-top').addClass('green');
                    jQuery('#module-bottom').addClass('green');
                    jQuery('#hometopdivider').addClass('green');
                    jQuery("#stripe-wrap").css({
                        "background-image": "url(img/green/greenstripes-home.png)"
                    });
                    jQuery('#prevButton').addClass('jcarousel-prev jcarousel-prev-horizontal green');
                    jQuery('#nextButton').addClass('jcarousel-next jcarousel-next-horizontal green');
                    $.post("includes/themesession.php", {
                        colour: 'green'
                    });
                }
                if (idxDec == "0") {
                    if (jQuery('#vidthumb1').attr("src").indexOf("/1/") > -1) {
                        var src = jQuery('#vidthumb1').attr("src").replace("/1/", "/2/");
                        jQuery('#vidthumb1').attr("src", src);
                    }
                    if (jQuery('#vidthumb1').attr("src").indexOf("/3/") > -1) {
                        var src = jQuery('#vidthumb1').attr("src").replace("/3/", "/2/");
                        jQuery('#vidthumb1').attr("src", src);
                    }
                    if (jQuery('#vidthumb2').attr("src").indexOf("/1/") > -1) {
                        var src = jQuery('#vidthumb2').attr("src").replace("/1/", "/2/");
                        jQuery('#vidthumb2').attr("src", src);
                    }
                    if (jQuery('#vidthumb2').attr("src").indexOf("/3/") > -1) {
                        var src = jQuery('#vidthumb2').attr("src").replace("/3/", "/2/");
                        jQuery('#vidthumb2').attr("src", src);
                    }
                    if (jQuery('#viewallbutton').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#viewallbutton').attr("src").replace("-green", "-yellow");
                        jQuery('#viewallbutton').attr("src", src);
                    }
                    if (jQuery('#viewallbutton').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#viewallbutton').attr("src").replace("-blue", "-yellow");
                        jQuery('#viewallbutton').attr("src", src);
                    }
                    if (jQuery('#viewallbuttonover').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#viewallbuttonover').attr("src").replace("-green", "-yellow");
                        jQuery('#viewallbuttonover').attr("src", src);
                    }
                    if (jQuery('#viewallbuttonover').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#viewallbuttonover').attr("src").replace("-blue", "-yellow");
                        jQuery('#viewallbuttonover').attr("src", src);
                    }
                    if (jQuery('#showbutton').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#showbutton').attr("src").replace("-green", "-yellow");
                        jQuery('#showbutton').attr("src", src);
                    }
                    if (jQuery('#showbutton').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#showbutton').attr("src").replace("-blue", "-yellow");
                        jQuery('#showbutton').attr("src", src);
                    }
     if (jQuery('#gptwimg').attr("src").indexOf("_green") > -1) {
                        var src = jQuery('#gptwimg').attr("src").replace("_green", "_yellow");
                        jQuery('#gptwimg').attr("src", src);
                    }
                    if (jQuery('#gptwimg').attr("src").indexOf("_blue") > -1) {
                        var src = jQuery('#gptwimg').attr("src").replace("_blue", "_yellow");
                        jQuery('#gptwimg').attr("src", src);
                    }
  if (jQuery('#gptwimgover').attr("src").indexOf("_green") > -1) {
                        var src = jQuery('#gptwimgover').attr("src").replace("_green", "_yellow");
                        jQuery('#gptwimgover').attr("src", src);
                    }
                    if (jQuery('#gptwimgover').attr("src").indexOf("_blue") > -1) {
                        var src = jQuery('#gptwimgover').attr("src").replace("_blue", "_yellow");
                        jQuery('#gptwimgover').attr("src", src);
                    }
                    if (jQuery('#showbuttonover').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#showbuttonover').attr("src").replace("-green", "-yellow");
                        jQuery('#showbuttonover').attr("src", src);
                    }
                    if (jQuery('#showbuttonover').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#showbuttonover').attr("src").replace("-blue", "-yellow");
                        jQuery('#showbuttonover').attr("src", src);
                    }
                    if (jQuery('#footerrolloptions').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#footerrolloptions').attr("src").replace("-blue", "-yellow");
                        jQuery('#footerrolloptions').attr("src", src);
                    }
                    if (jQuery('#footerrolloptions').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#footerrolloptions').attr("src").replace("-green", "-yellow");
                        jQuery('#footerrolloptions').attr("src", src);
                    }
                    if (jQuery('#footerrollovaltine').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#footerrollovaltine').attr("src").replace("-blue", "-yellow");
                        jQuery('#footerrollovaltine').attr("src", src);
                    }
                    if (jQuery('#footerrollovaltine').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#footerrollovaltine').attr("src").replace("-green", "-yellow");
                        jQuery('#footerrollovaltine').attr("src", src);
                    }
                    if (jQuery('#footerrolltwinings').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#footerrolltwinings').attr("src").replace("-blue", "-yellow");
                        jQuery('#footerrolltwinings').attr("src", src);
                    }
                    if (jQuery('#footerrolltwinings').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#footerrolltwinings').attr("src").replace("-green", "-yellow");
                        jQuery('#footerrolltwinings').attr("src", src);
                    }
                    if (jQuery('#footerrolljacksons').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#footerrolljacksons').attr("src").replace("-blue", "-yellow");
                        jQuery('#footerrolljacksons').attr("src", src);
                    }
                    if (jQuery('#footerrolljacksons').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#footerrolljacksons').attr("src").replace("-green", "-yellow");
                        jQuery('#footerrolljacksons').attr("src", src);
                    }
                    if (jQuery('#footerrollnambarrie').attr("src").indexOf("-blue") > -1) {
                        var src = jQuery('#footerrollnambarrie').attr("src").replace("-blue", "-yellow");
                        jQuery('#footerrollnambarrie').attr("src", src);
                    }
                    if (jQuery('#footerrollnambarrie').attr("src").indexOf("-green") > -1) {
                        var src = jQuery('#footerrollnambarrie').attr("src").replace("-green", "-yellow");
                        jQuery('#footerrollnambarrie').attr("src", src);
                    }
                    jQuery('#back-wrap').addClass('yellow');
                    jQuery('body').addClass('yellow');
                    jQuery('a').addClass('yellow');
                    jQuery('#h_movie_content').addClass('yellow');
                    jQuery('h1').addClass('yellow');
                    jQuery('#stripe-wrap').addClass('yellow');
                    jQuery('#footer-back').addClass('yellow');
                    jQuery('#mainmenu').addClass('yellow');
                    jQuery('#showalljobs').addClass('yellow');
                    jQuery('#welcomeTitle').addClass('yellow');
                    jQuery('#videoTitle').addClass('yellow');
                    jQuery('#viewallbutton').addClass('yellow');
                    jQuery('#latestejobspaneltitle').addClass('yellow');
                    jQuery('#module-top').addClass('yellow');
                    jQuery('#module-bottom').addClass('yellow');
                    jQuery('#hometopdivider').addClass('yellow');
                    jQuery("#stripe-wrap").css({
                        "background-image": "url(img/yellow/yellowstripes-home.png)"
                    });
                    jQuery('#prevButton').addClass('jcarousel-prev jcarousel-prev-horizontal yellow');
                    jQuery('#nextButton').addClass('jcarousel-next jcarousel-next-horizontal yellow');
                    $.post("includes/themesession.php", {
                        colour: 'yellow'
                    });
                }
                jQuery('#small-module a').addClass('arrows');
            };
            jQuery('#jobalertstab').mouseover(function () {
                jQuery('#jobalertstab.inactive').css({
                    backgroundPosition: '0px 8px'
                });
                jQuery(this).css('cursor', 'pointer');
            });
            jQuery('#jobalertstab').mouseout(function () {
                jQuery('#jobalertstab.inactive').css({
                    backgroundPosition: '0px 5px'
                });
                jQuery(this).css('cursor', 'auto');
            });
            jQuery('#applytab').mouseover(function () {
                jQuery('#applytab.inactive').css({
                    backgroundPosition: '0px 8px'
                });
                jQuery(this).css('cursor', 'pointer');
            });
            jQuery('#applytab').mouseout(function () {
                jQuery('#applytab.inactive').css({
                    backgroundPosition: '0px 5px'
                });
                jQuery(this).css('cursor', 'auto');
            });
            jQuery('#forwardtab').mouseover(function () {
                jQuery('#forwardtab.inactive').css({
                    backgroundPosition: '0px 8px'
                });
                jQuery(this).css('cursor', 'pointer');
            });
            jQuery('#forwardtab').mouseout(function () {
                jQuery('#forwardtab.inactive').css({
                    backgroundPosition: '0px 5px'
                });
                jQuery(this).css('cursor', 'auto');
            });
            jQuery('#helptab').mouseover(function () {
                jQuery('#helptab.inactive').css({
                    backgroundPosition: '0px 8px'
                });
                jQuery(this).css('cursor', 'pointer');
            });
            jQuery('#helptab').mouseout(function () {
                jQuery('#helptab.inactive').css({
                    backgroundPosition: '0px 5px'
                });
                jQuery(this).css('cursor', 'auto');
            });
            jQuery('#speccvtab').mouseover(function () {
                jQuery('#speccvtab.inactive').css({
                    backgroundPosition: '0px 8px'
                });
                jQuery(this).css('cursor', 'pointer');
            });
            jQuery('#speccvtab').mouseout(function () {
                jQuery('#speccvtab.inactive').css({
                    backgroundPosition: '0px 5px'
                });
                jQuery(this).css('cursor', 'auto');
            });
            jQuery('#speccvtab').click(function () {
                if (Browser.Version() < 7) {
                    jQuery('#speccvmodule').css({
                        display: 'inline'
                    });
                    jQuery('#jobaalertsmodule').css({
                        display: 'none'
                    });
                }
                else {
                    jQuery('#speccvmodule').fadeIn('slow');
                    jQuery('#jobaalertsmodule').fadeOut('slow');
                }
                jQuery('#speccvtab').removeClass();
                jQuery('#speccvtab').addClass('active');
                jQuery('#jobalertstab').removeClass();
                jQuery('#jobalertstab').addClass('inactive');
                jQuery('#speccvtab').css({
                    backgroundPosition: '0px 0px'
                });
                jQuery('#jobalertstab').css({
                    backgroundPosition: '0px 5px'
                });
            });
            jQuery('#jobalertstab').click(function () {
                if (Browser.Version() < 7) {
                    jQuery('#speccvmodule').css({
                        display: 'none'
                    });
                    jQuery('#jobaalertsmodule').css({
                        display: 'inline'
                    });
                }
                else {
                    jQuery('#speccvmodule').fadeOut('slow');
                    jQuery('#jobaalertsmodule').fadeIn('slow');
                }
                jQuery('#jobalertstab').removeClass();
                jQuery('#jobalertstab').addClass('active');
                jQuery('#speccvtab').removeClass();
                jQuery('#speccvtab').addClass('inactive');
                jQuery('#jobalertstab').css({
                    backgroundPosition: '0px 0px'
                });
                jQuery('#speccvtab').css({
                    backgroundPosition: '0px 5px'
                });
            });
            jQuery('#applytab').click(function () {
                if (Browser.Version() < 7) {
                    jQuery('#applymodule').css({
                        display: 'inline'
                    });
                    jQuery('#helpmodule').css({
                        display: 'none'
                    });
                    jQuery('#forwardmodule').css({
                        display: 'none'
                    });
                }
                else {
                    jQuery('#applymodule').fadeIn('slow');
                    jQuery('#helpmodule').fadeOut('slow');
                    jQuery('#forwardmodule').fadeOut('slow');
                }
                jQuery('#applytab').removeClass();
                jQuery('#applytab').addClass('active');
                jQuery('#forwardtab').removeClass();
                jQuery('#forwardtab').addClass('inactive');
                jQuery('#helptab').removeClass();
                jQuery('#helptab').addClass('inactive');
                jQuery('#applytab').css({
                    backgroundPosition: '0px 0px'
                });
                jQuery('#helptab').css({
                    backgroundPosition: '0px 5px'
                });
                jQuery('#forwardtab').css({
                    backgroundPosition: '0px 5px'
                });
            });
            jQuery('#helptab').click(function () {
                if (Browser.Version() < 7) {
                    jQuery('#helpmodule').css({
                        display: 'inline'
                    });
                    jQuery('#applymodule').css({
                        display: 'none'
                    });
                    jQuery('#forwardmodule').css({
                        display: 'none'
                    });
                }
                else {
                    jQuery('#helpmodule').fadeIn('slow');
                    jQuery('#applymodule').fadeOut('slow');
                    jQuery('#forwardmodule').fadeOut('slow');
                }
                jQuery('#helptab').removeClass();
                jQuery('#helptab').addClass('active');
                jQuery('#forwardtab').removeClass();
                jQuery('#forwardtab').addClass('inactive');
                jQuery('#applytab').removeClass();
                jQuery('#applytab').addClass('inactive');
                jQuery('#helptab').css({
                    backgroundPosition: '0px 0px'
                });
                jQuery('#applytab').css({
                    backgroundPosition: '0px 5px'
                });
                jQuery('#forwardtab').css({
                    backgroundPosition: '0px 5px'
                });
            });
            jQuery('#forwardtab').click(function () {
                if (Browser.Version() < 7) {
                    jQuery('#forwardmodule').css({
                        display: 'inline'
                    });
                    jQuery('#applymodule').css({
                        display: 'none'
                    });
                    jQuery('#helpmodule').css({
                        display: 'none'
                    });
                }
                else {
                    jQuery('#forwardmodule').fadeIn('slow');
                    jQuery('#applymodule').fadeOut('slow');
                    jQuery('#helpmodule').fadeOut('slow');
                }
                jQuery('#forwardtab').removeClass();
                jQuery('#forwardtab').addClass('active');
                jQuery('#helptab').removeClass();
                jQuery('#helptab').addClass('inactive');
                jQuery('#applytab').removeClass();
                jQuery('#applytab').addClass('inactive');
                jQuery('#forwardtab').css({
                    backgroundPosition: '0px 0px'
                });
                jQuery('#applytab').css({
                    backgroundPosition: '0px 5px'
                });
                jQuery('#helptab').css({
                    backgroundPosition: '0px 5px'
                });
            });
            $('div.fadehover').hover(function () {
                var fade = $('> div', this);
                fade.css({
                    display: 'block'
                });
                fade.prev().children('img').css({
                    visibility: 'hidden'
                });
            }, function () {
                var fade = $('> div', this);
                fade.css({
                    display: 'none'
                });
                fade.prev().children('img').css({
                    visibility: 'visible'
                });
            });
            // Top menu effects
            var $mainmenu = $("#" + menuid + ">ul");
            $mainmenu.children("li").children("a").each(function (j) {
                if ($(this).closest("li").attr("id") != "current_parent") {
                    $(this).hover(function () {
                        $('#current_parent').find("ul").css({
                            visibility: 'hidden'
                        });
                        $('#current_parent').children("a").removeClass();
                        $('#current_parent').children("a").addClass("deselected");
                        if ($(this).closest("li").attr("id") != "current") {
                            $('#current').children("a").removeClass();
                            $('#current').children("a").addClass("deselected");
                        }
                    }, function () {
                        $('#current_parent').find("ul").css({
                            visibility: 'visible'
                        });
                        $('#current_parent').children("a").removeClass();
                        if ($(this).closest("li").attr("id") != "current_parent") {
                            $('#current').children("a").removeClass();
                        }
                    });
                }
            });
            $mainmenu.children("li").children("ul").children("li").find("a").each(function (j) {
                $(this).hover(function () {
                    if ($(this).closest("li").closest("ul").closest("li").attr("id") != "current_parent") {
                        $('#current_parent').children("a").removeClass();
                        $('#current_parent').children("a").addClass("deselected");
                        $('#current').children("a").removeClass();
                        $('#current').children("a").addClass("deselected");
                    }
                    $(this).parent().next().find("span").removeClass("sepVis");
                    $(this).parent().next().find("span").addClass("sepNotVis");
                }, function () {
                    $(this).parent().next().find("span").removeClass("sepNotVis");
                    $(this).parent().next().find("span").addClass("sepVis");
                    if ($(this).closest("li").closest("ul").closest("li").attr("id") != "current_parent") {
                        $('#current_parent').children("a").removeClass();
                        $('#current').children("a").removeClass();
                    }
                });
            });
            var $headers = $mainmenu.find("ul").parent();
            $headers.each(function (i) {
                var $curobj = $(this);
                var $subul = $(this).find('ul:eq(0)');
                this._dimensions = {
                    h: $curobj.find('a:eq(0)').outerHeight()
                };
                this.istopheader = $curobj.parents("ul").length == 1 ? true : false;
                if (!this.istopheader) {
                    $subul.css({
                        left: 0,
                        top: this._dimensions.h
                    });
                }
                var $innerheader = $curobj.children('a').eq(0);
                $innerheader = ($innerheader.children().eq(0).is('span')) ? $innerheader.children().eq(0) : $innerheader;
                var config = {
                    sensitivity: 1,
                    // number = sensitivity threshold ( must be 1 or higher )
                    interval: 5,
                    // number = milliseconds for onMouseOver polling interval
                    over: bringDown,
                    // function = onMouseOver callback ( REQUIRED )
                    timeout: 1,
                    // number = milliseconds delay before onMouseOut
                    out: bringUp // function = onMouseOut callback ( REQUIRED )
                };
                $curobj.hoverIntent(config);
                function bringDown() {
                    var parentId = $(this).closest("li").attr("id");
                    var $targetul = $(this).children("ul:eq(0)");
                    if (parentId != "current_parent") {
                        $('#current_parent').children("ul").slideUp(droplinemenu.animateduration.out);
                    }
                    if ($targetul.queue().length <= 1) {
                        if (this.istopheader) {
                            if (browserName != "hackpos") {
                                $targetul.css({
                                    top: $mainmenu.offset().top + this._dimensions.h
                                });
                            }
                            else {
                                $targetul.css({
                                    top: $mainmenu.offset().top + this._dimensions.h
                                });
                            }
                        }
                        if (document.all && !window.XMLHttpRequest) {
                            $mainmenu.find('ul').css({
                                overflow: (this.istopheader) ? 'hidden' : 'visible'
                            });
                        }
                        var $subnavs = $(this).find("li");
                        $subnavs.each(function (f) {});
                        $targetul.css({
                            float: 'left'
                        });
                        $targetul.closest("li").find("span").addClass("hoveredTop");
                        $targetul.slideDown(droplinemenu.animateduration.over);
                    }
                }
                function bringUp() {
                    var $targetul = $(this).children("ul:eq(0)");
                    var parentId = $(this).closest("li").attr("id");
                    if (parentId != "current_parent") {
                        $targetul.slideUp(droplinemenu.animateduration.out);
                        $targetul.closest("li").find("span").removeClass();
                        $targetul.closest("li").find("span").addClass("sepVis");
                        $('#current_parent').children("ul").slideDown(droplinemenu.animateduration.over);
                        if ($('#current_parent').length) {
                            $('#current_parent').children("ul").slideDown(droplinemenu.animateduration.over);
                        }
                    }
                }
            });
            $mainmenu.find("ul").css({
                display: 'none',
                visibility: 'visible'
            });
            if ($('#current_parent').length) {
                $('#current_parent').children("ul").css({
                    position: 'absolute',
                    top: 38
                });
                var $subnavs = $('#current_parent').find("li");
                $(window).load(function () {
                    $subnavs.each(function (f) {
                        $(this).css({
                            display: "inline-block"
                        });
                    });
                });
                $('#current_parent').children("ul").slideDown(droplinemenu.animateduration.over);
            }
        });
    }
};
