﻿/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* ATweb for web development 2011
* Date: Sat Feb 13 22:33:48 2010 -0500
*/

var xx = 0;

$(document).bind('mousemove', function(e) {
    xx = e.pageX;
    //alert(xx);
    if (xx < 260 && xx > 595) {
        ClearSubs(5);
    }
});

function ShowSub(num) {
    ////jQuery.noConflict();
    $(document).ready(function() {






        //document.Fm.TxAre.value = 1280; 
        $("#TopMenuContainer").mouseleave(function(event) {
            ClearSubs(num);
        });
        $("#sub" + num).mouseover(function() {
            pause(num);


        });
        $("#sub" + num).mouseleave(function() {
            ClearSubs(num);
        });

        if (xx > 260 && xx < 595) {
            ClearSubs(num);
            $("#sub" + num).fadeIn("slow");
            //$(".diva").mouseover.die();
        }
    });
}


function pause(num) {
    $(".div" + num).css("width", parseInt($(".div" + num).width()));
    //$(".div" + num).css("opacity", 0.7);
    //    $(".div" + num).animate({ opacity: 0.7 }, 500);

}

function ClearSubs(num) {
    //jQuery.noConflict();
    $(".div" + num).css("width", parseInt($(".div" + num).width() + 20));
    $(".div" + num).removeAttr("style");
    $("#sub1").fadeOut("fast");
    $("#sub2").fadeOut("fast");
    $("#sub3").fadeOut("fast");
    $("#sub4").fadeOut("fast");
    $("#sub5").fadeOut("fast");
    $("#sub6").fadeOut("fast");
    $("#sub7").fadeOut("fast");
    //      $(".div" + num).animate({ opacity: 1 }, 0);
    //$(".div" + num).css("opacity", 1);


}

function getopacity(elem) {
    var ori = $(elem).css('opacity');
    var ori2 = $(elem).css('filter');
    if (ori2) {
        ori2 = parseInt(ori2.replace(')', '').replace('alpha(opacity=', '')) / 100;
        if (!isNaN(ori2) && ori2 != '') {
            ori = ori2;
        }
    }
    //alert(ori);
    return ori;
}

//function Load() {
//    var zoom = document.documentElement.clientWidth / window.innerWidth;
//    var zoomNew = 0;
//    //jQuery.noConflict();
//    $(document).ready(function() {
//        //jQuery.noConflict();
//        $(window).resize(function() {
//            zoomNew = document.documentElement.clientWidth / window.innerWidth;
//            //if (zoom != zoomNew) {
//            // zoom has changed
//            // adjust your fixed element
//            document.getElementById("mcs3_container").style.width = (parseInt(window.innerWidth) - 275) + "px";
//            document.getElementById("mcs3_container").style.height = (parseInt(window.innerHeight) - 245) + "px";
//            document.getElementById("Container").style.width = (parseInt(window.innerWidth) - 315) + "px";
//            document.getElementById("HoverContentTop").style.width = (parseInt(window.innerWidth) - 260) + "px";
//            document.getElementById("HoverContentBottom").style.width = (parseInt(window.innerWidth) - 260) + "px";
//            document.getElementById("HoverContentBottom").style.marginTop = (parseInt(window.innerHeight) - 235) + "px";
//            zoom = zoomNew;
//            //alert("sss");
//            //}
//        });
//    });

//    document.getElementById("mcs3_container").style.width = (parseInt(window.innerWidth) - 275) + "px";
//    document.getElementById("mcs3_container").style.height = (parseInt(window.innerHeight) - 245) + "px";
//    document.getElementById("Container").style.width = (parseInt(window.innerWidth) - 315) + "px";
//    document.getElementById("Content").innerHTML += "<div style='height:70px;'></div>";
//    document.getElementById("HoverContentTop").style.width = (parseInt(window.innerWidth) - 260) + "px";
//    document.getElementById("HoverContentBottom").style.width = (parseInt(window.innerWidth) - 260) + "px";
//    document.getElementById("HoverContentBottom").style.marginTop = (parseInt(window.innerHeight) - 235) + "px";


//}
