﻿$(document).ready(function () {
    $("body form#aspnetForm").children("div").css("height", "100%");
    $('div.productBox:last-child').css('border-bottom', '0');

    //$('div.menuheader ul li:first a').addClass('menuActiveA');
    //$('div.menuheader ul li:first').addClass('menuActiveL');


    //menu hover 
    $('div.menuheader ul li').hover(
    function () {
        $(this).addClass('menuHover');
    },
    function () {
        $(this).removeClass('menuHover');
    });

    //main page catalog click
    $('div.mainCatalog').click(
    function () {
        window.location = "/catalog.aspx";
    });

    //sidevar video div click
    $('div.sideVideo').click(
    function () {
        window.location = "/Videos/List.aspx";
    });
    //catalog items hover 
    $('div.catalog ul:eq(0) li a').hover(
    function () {
        $(this).addClass('pink');
    },
    function () {
        $(this).removeClass('pink');
    });

    $('div.catalog ul:eq(1) li a').hover(
    function () {
        $(this).addClass('green');
    },
    function () {
        $(this).removeClass('green');
    });

    //Video
    $('div.vid').hover(
    function () {
        $(this).css('background-color', '#D7E6E1');
    },
    function () {
        $(this).css('background-color', 'white');
    });




    //index scrolling news
    $(function () {
        function fadingScroller($el) {
            $el.animate({ 'opacity': 0 }, 3000);
            $el.hide('slow', function () {
                $el.parent().append($el);
                $el.show();
                $el.animate({ 'opacity': 1 },3000);
                setTimeout(function ($el) {
                    return function () {
                        fadingScroller($($el.selector));
                    };
                } ($el), 3000);
            });
        }
        fadingScroller($('.itembottom div:first'));
    });





});



