﻿$(document).ready(function(){
    $('#topmenu div:not(.active)').filter(':not(.left)').filter(':not(.right)').
    filter(':not(.center)').hover(
        function () {
            $(this).addClass('active');
        },
        function () {
            $(this).removeClass('active');
        }
        );

    $("#tools .link:not(.active)").hover(
        function () {
            $(this).addClass('active');
        },
        function () {
            $(this).removeClass('active');
        }
        );

    $("#tools .link").click(function() {
        window.location.href = $(this).find('a').attr('href');
    })

    if ($('#news2_wrapper').length) {
        $('#news2_wrapper').sc_slider2({
            titles: {
                next: 'Далее',
                prev: 'Назад',
                pause: 'пауза'
            },
            slideInterval: 5000,
            animateInterval: 1000,
            autostart: true
        });
    }
	if ($('#news_wrapper').length) {
        $('#news_wrapper').sc_slider({
            titles: {
                next: 'Далее',
                prev: 'Назад',
                pause: 'пауза'
            },
            slideInterval: 3000,
            animateInterval: 1000,
            autostart: true
        });
    }
});
