﻿$(document).ready(function() {

//Updated: 7/6/10; Copyright 2010 ImageSpan

    // Swap Features and Benefits table
    $('a.benefits').click(function() {
        $('table.second.features').hide();
        $('table.second.benefits').show();
        $('a.feature').css("backgroundImage", "url('../../images/Portal/solutions/tab1.jpg')");
        $('a.benefits').css("backgroundImage", "url('../../images/Portal/solutions/tab2.jpg')");
        $('a.feature').css("color", "#666666");
        $('a.benefits').css("color", "#11a0cf");
        $('.contactus').css("marginTop", "192px");
        $('.footnote').hide();
    }
    );

    $('a.feature').click(function() {
        $('table.second.benefits').hide();
        $('table.second.features').show();
        $('a.benefits').css("backgroundImage", "url('../../images/Portal/solutions/tab1.jpg')");
        $('a.feature').css("backgroundImage", "url('../../images/Portal/solutions/tab2.jpg')");
        $('a.benefits').css("color", "#666666");
        $('a.feature').css("color", "#11a0cf");
        $('.contactus').css("marginTop", "340px");
        $('.footnote').show();
    }
    );

    // Set parameters for slideshow
    $('.screens').before('<div id="nav">').cycle({
        fx: 'scrollLeft',
        speed: 'slow',
        timeout: 6500,
        pager: '#nav',
        pagerEvent: 'mouseover'
    });

    // Rename navigation elements
    $("#nav a").each(function(i) {
        if ($(this).html() == '7') {
            $(this).text("Global Payment Processing");
        }
        else if ($(this).html() == '6') {
            $(this).text("Automated Royalty Calculations");
        }
        else if ($(this).html() == '5') {
            $(this).text("Monetization");
        }
        else if ($(this).html() == '4') {
            $(this).text("Content Tracking");
        }
        else if ($(this).html() == '3') {
            $(this).text("Publishing");
        }
        else if ($(this).html() == '2') {
            $(this).text("Watermarking");
        }
        else {
            $(this).text("Content Upload");
        }
    });

});