﻿function SlideBanerTop() {
            var $active = $('#ads_top div.active');
            if ($active.length == 0) $active = $('#ads_top div:last');
            var $next = $active.next().length ? $active.next() : $('#ads_top 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("SlideBanerTop()", 15000);
        });
        //Top Right
        function SlideTopRight() {
            var $active = $('#ads_top_right div.active');
            if ($active.length == 0) $active = $('#ads_top_right div:last');
            var $next = $active.next().length ? $active.next() : $('#ads_top_right 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("SlideTopRight()", 15000);
        });
function SlideBanerMap() {
            var $active = $('#ads_map div.active');
            if ($active.length == 0) $active = $('#ads_map div:last');
            var $next = $active.next().length ? $active.next() : $('#ads_map 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("SlideBanerMap()", 15000);
        });
        //Top Right
        function SlideTopRight() {
            var $active = $('#ads_top_right div.active');
            if ($active.length == 0) $active = $('#ads_top_right div:last');
            var $next = $active.next().length ? $active.next() : $('#ads_top_right 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("SlideTopRight()", 15000);
        });
        //Right 1
        function SlideRight1() {
            var $active = $('.ads_right div.active');
            if ($active.length == 0) $active = $('.ads_right div:last');
            var $next = $active.next().length ? $active.next() : $('.ads_right 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("SlideRight1()", 15000);
        });
        //Right 2
        function SlideRight2() {
            var $active = $('#most_read_ads div.active');
            if ($active.length == 0) $active = $('#most_read_ads div:last');
            var $next = $active.next().length ? $active.next() : $('#most_read_ads 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("SlideRight2()", 15000);
        });
        //Right 3
        function SlideRight3() {
            var $active = $('#family_medicine_cabinet_ads div.active');
            if ($active.length == 0) $active = $('#family_medicine_cabinet_ads div:last');
            var $next = $active.next().length ? $active.next() : $('#family_medicine_cabinet_ads 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("SlideRight3()", 15000);
        });
