Shadowbox.init({language: 'en',players:  ['iframe']});

$(document).ready(
function()
{ 

    $("#a1").mouseover(
            function(){
                $(this).children("li").children("a").css({color:"#f7941e"});
            });
    $("#a2").mouseover(
            function(){
                $(this).children("li").children("a").css({color:"#3d799f"});
                $("#top-schedule-submenu").css({display:"block"});
            });
    $("#a3").mouseover(
            function(){
                $(this).children("li").children("a").css({color:"#a7bf08"});
            });
    $("#a4").mouseover(
            function(){
                $(this).children("li").children("a").css({color:"#ef4035"});
            });
    $("#a5").mouseover(
            function(){
                $(this).children("li").children("a").css({color:"#f7941e"});
            });
    $("#a6").mouseover(
            function(){
                $(this).children("li").children("a").css({color:"#b0c61c"});
            });
    $("#a7").mouseover(
            function(){
                $(this).children("li").children("a").css({color:"#3d799f"});
            });

    // Dropdown for classes and schedules

    $("#a2").mouseout(
            function(){
                $("#top-schedule-submenu").css({display:"none"});
            });

    $("#top-schedule-submenu").mouseover(
            function(){
                $(this).css({display:"block"});
            });

    $("#top-schedule-submenu").mouseout(
            function(){
                $(this).css({display:"none"});
            });

    $("#header #menu ul").mouseout(
            function(){
                $(this).children("li").children("a").css({color:"#481a1a"});
            });
    $(document).pngFix();
    var my_tooltip = $(".tooltip");
    window.setTimeout('\n\
            $(".class-1-active").animate({opacity: "hide" }, "slow");\n\
            $(".class-1-title").animate({opacity: "hide" }, "slow");\n\
            $("#class-1").animate({ opacity: "hide" }, "slow");\n\
            $("#class-2").animate({ opacity: "show" }, "slow");\n\
            $(".class-2-active").animate({ opacity: "show" }, "slow");\n\
            $(".class-2-title").animate({ opacity: "show" }, "slow");\n\
    ', 5000);

    $("#class-2").hide();
    $(".class-2-active").hide();
    $(".class-2-title").hide();
    $(".class-1-active").click(
        function(){
            $(this).animate({opacity: "hide" }, "slow");
            $(".class-1-title").animate({ opacity: "hide" }, "slow");
            $("#class-1").animate({ opacity: "hide" }, "slow");
            $("#class-2").animate({ opacity: "show" }, "slow");
            $(".class-2-active").animate({ opacity: "show" }, "slow");
            $(".class-2-title").animate({ opacity: "show" }, "slow");
            return false;
        });
   $(".class-2-active").click(
            function(){
                $(this).animate({ opacity: "hide" }, "slow");
                $(".class-2-title").animate({ opacity: "hide" }, "slow");
                $("#class-2").animate({ opacity: "hide" }, "slow");
                $("#class-1").animate({ opacity: "show" }, "slow");
                $(".class-1-active").animate({ opacity: "show" }, "slow");
                $(".class-1-title").animate({ opacity: "show" }, "slow");
                return false;
         });
   
   $(".class-entity, .programs_item").mouseover(
            function(){
                my_tooltip.css({display:"none"}).show();}).mousemove(
                    function(kmouse){
                        my_tooltip.css({left:kmouse.pageX+15, top:kmouse.pageY+15});}).mouseout(function(){my_tooltip.hide();}).click(function(){Shadowbox.open({content:$(this).find("a").attr("href"),player:"iframe",height:515,width:740});});});

$(document).ready(function(){$('#form_subscribe').submit(function() {
                 var queryString = $('#form_subscribe').formSerialize();
                 $.getJSON($('#form_subscribe').attr("action"), queryString,function(data){
                     if (data.error=="1") {$("#message").empty();$("#message").hide();$("#message").append(data.message);$("#message").animate({ opacity: "show" }, "slow"); } else { $(".form_shadow").empty();$(".form_shadow").hide();$(".form_shadow").append("<p style='width:300px;text-align:center'>"+data.message+"</p>");$(".form_shadow").animate({ opacity: "show" }, "slow"); }
          
                    });
        return false;
        }); });
