
/* THIS IS FOR THE HOME PAGE || IT USES DIFFERENT CSS */

function slideSwitch() {
    var $active = $('#phoneNumber span.active');

    if ( $active.length == 0 ) $active = $('#phoneNumber span:last');

    var $next =  $active.next().length ? $active.next()
        : $('#phoneNumber span:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 5000 );
});


/* THIS IS FOR THE INTERIOR PAGES || IT USES DIFFERENT CSS */

function slideSwitchInterior() {
    var $active = $('#phoneNumberInt span.active');

    if ( $active.length == 0 ) $active = $('#phoneNumberInt span:last');

    var $next =  $active.next().length ? $active.next()
        : $('#phoneNumberInt span:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitchInterior()", 5000 );
});

