﻿$(function() {

    var totalWidth = 0;
    $("#tab-pager li").each(function() {
        totalWidth += $(this).width();
    });
    $("#tab-pager ul").css("width", totalWidth).css("margin", "0 auto");


    $(".rotator-more-info").click(function(e) {
        $(this).parent().css({ width: "316px" });
        $(this).parent().css({ height: "200px" });
        $(this).css({ display: "none" });
        return false;
    });

    $(".rotator-slide-info").mouseleave(function(e) {
        //alert("Hello");
        $(this).css({ width: "" });
        $(this).css({ height: "" });
        $(".rotator-slide-info a:last-child").css({ display: "" });
    });

    $("#tabRotatorContent2").css({ display: "none" });
    $("#tabRotatorContent3").css({ display: "none" });
    $("#tabRotator1").click(function() {
        $("#tabRotator1").addClass("active");
        $("#tabRotator2").removeClass("active");
        $("#tabRotator3").removeClass("active");
        $("#tabRotatorContent1").css({ display: "" });
        $("#tabRotatorContent2").css({ display: "none" });
        $("#tabRotatorContent3").css({ display: "none" });
    });
    $("#tabRotator2").click(function() {
        $("#tabRotator1").removeClass("active");
        $("#tabRotator2").addClass("active");
        $("#tabRotator3").removeClass("active");
        $("#tabRotatorContent1").css({ display: "none" });
        $("#tabRotatorContent2").css({ display: "" });
        $("#tabRotatorContent3").css({ display: "none" });
    });
    $("#tabRotator3").click(function() {
        $("#tabRotator1").removeClass("active");
        $("#tabRotator2").removeClass("active");
        $("#tabRotator3").addClass("active");
        $("#tabRotatorContent1").css({ display: "none" });
        $("#tabRotatorContent2").css({ display: "none" });
        $("#tabRotatorContent3").css({ display: "" });
    });

});