﻿ function slideSwitchTop() {
         var $active = $('#SlideTopBanner div.active');
        
         if ( $active.length == 0 ) $active = $('#SlideTopBanner div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#SlideTopBanner div:first');
        
         // uncomment below to pull the divs randomly
         // var $sibs = $active.siblings();
         // var rndNum = Math.floor(Math.random() * $sibs.length );
         // var $next = $( $sibs[ rndNum ] );        
         $active.addClass('last-active');        
         $next.css({opacity: 0.0})
         .addClass('active')
         .animate({opacity: 1.0}, 1000, function() {
         $active.removeClass('active last-active');
         });
        }
        
        $(function() {
         setInterval( "slideSwitchTop()", 15000 );
        }); 
        
        
 //Slide banner 410x70 
        function slideSwitch410x70() {
         var $active = $('#Slide410x70 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide410x70 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide410x70 div: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( "slideSwitch410x70()", 15000 );
        }); 
 //Slide banner 410x120 
        function slideSwitch410x120() {
         var $active = $('#Slide410x120 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide410x120 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide410x120 div: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( "slideSwitch410x120()", 15000 );
        }); 
        
        //Slide banner 410x150 
        function slideSwitch410x150() {
         var $active = $('#Slide410x150 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide410x150 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide410x150 div: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( "slideSwitch410x150()", 15000 );
        }); 
 //Slide banner 202x202 1 
        function slideSwitch202x202_1 () {
         var $active = $('#Slide202x202_1 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide202x202_1 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide202x202_1 div: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( "slideSwitch202x202_1()", 15000 );
        }); 
  
//Slide banner 202x202 2
         function slideSwitch202x202_2 () {
         var $active = $('#Slide202x202_2 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide202x202_2 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide202x202_2 div: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( "slideSwitch202x202_2()", 15000 );
        }); 

//Slide banner 202x202 3
        function slideSwitch202x202_3 () {
         var $active = $('#Slide202x202_3 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide202x202_3 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide202x202_3 div: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( "slideSwitch202x202_3()", 15000 );
        });
//Slide banner 202x202 4
        function slideSwitch202x202_4 () {
         var $active = $('#Slide202x202_4 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide202x202_4 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide202x202_4 div: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( "slideSwitch202x202_4()", 15000 );
        });

//Slide banner 570x100 1
        function slideSwitch570x100_1 () {
         var $active = $('#Slide570x100_1 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide570x100_1 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide570x100_1 div: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( "slideSwitch570x100_1()", 15000 );
        });

//Slide banner 570x100 2
        function slideSwitch570x100_2 () {
         var $active = $('#Slide570x100_2 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide570x100_2 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide570x100_2 div: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( "slideSwitch570x100_2()", 15000 );
        });
//Slide banner 570x100 3
        function slideSwitch570x100_3 () {
         var $active = $('#Slide570x100_3 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide570x100_3 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide570x100_3 div: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( "slideSwitch570x100_3()", 15000 );
        });
//Slide banner 290x140
        function slideSwitch290x140 () {
         var $active = $('#Slide290x140 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide290x140 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide290x140 div: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( "slideSwitch290x140()", 15000 );
        });
//Slide banner 230x145
        function slideSwitch230x145 () {
         var $active = $('#Slide230x145 div.active');
        
         if ( $active.length == 0 ) $active = $('#Slide230x145 div:last');
        
         // use this to pull the divs in the order they appear in the markup
         var $next = $active.next().length ? $active.next()
         : $('#Slide230x145 div: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( "slideSwitch230x145()", 15000 );
        });
        

