﻿/// <reference path="jquery-1.6.2.min.js" />

$(document).ready(function () {

    var image1 = new Image();
    var image2 = new Image();
    var image3 = new Image();
    var image4 = new Image();
    var image5 = new Image();
    var image6 = new Image();
	var image7 = new Image();

    image1.src = "images/logo-network-on.gif";
    image2.src = "images/logo-offest-on.gif";
    image3.src = "images/logo-records-on.gif";
    image4.src = "images/logo-worldwide-on.gif";
    image5.src = "images/jae-sino.png";
    image6.src = "images/edu-color.png";
	image7.src = "images/karma-hover.png";



    $('#slider').nivoSlider({

        effect: 'fade',
        pauseTime: 6000,
        controlNav: false,
        directionNav: false,
        pauseOnHover: false

    });


    $(".courtain-slider").animate({ width: "530px" }, 1000, function () {

        $(".courtain").css("width", "0px");

        $(".courtain-slider").animate({ width: "0px" }, 1000);

    });

    $(".courtain-big-slider").animate({ width: "530px" }, 1000, function () {

        $(".courtain-big").css("width", "0px");
        $(".courtain-big-slider").animate({ width: "0px" }, 1000);

    });

    $(".courtain-big-slider-99").animate({ width: "530px" }, 1000, function () {


        $(".courtain-big-slider-99").animate({ width: "0px" }, 1000, function () {

            $(".courtain-big-99").css("width", "0px");
        
        });

    });

    $(".courtain-big-slider-2").animate({ width: "842px" }, 1000, function () {

        $(".courtain-big-2").css("width", "0px");
        //$(".bm-slider").css("opacity", "1");
        $(".courtain-big-slider-2").animate({ width: "0px" }, 1000);

    });

    $(".courtain-big-slider-2-bm").animate({ width: "842px" }, 1000, function () {

        $(".courtain-big-2-bm").css("width", "0px");
        //$(".bm-slider").css("opacity", "1");
        $(".courtain-big-slider-2-bm").animate({ width: "0px" }, 1000);

    });

    $(".header > ul > li").mouseover(function (e) {

        var menuId = $(this).attr("id");

        $("#" + menuId + ">a").css("color", "#D24628");

        $("#" + menuId + " ul a:last").css("border", "none");
        $("#" + menuId + " ul").css({ "display": "block" });

    }).mouseout(function (e) {

        var menuId = $(this).attr("id");

        $("#" + menuId + ">a").css("color", "#EFF2AF");

        $("#" + menuId + " ul").css({ "display": "none" });

    });

});

function chkFields() {

    if (document.frmMailing.name.value == "") {
        alert("Enter name!");
        document.frmMailing.name.focus();
        return false;
    }

    if (document.frmMailing.country.value == "") {
        alert("Enter country!");
        document.frmMailing.country.focus();
        return false;
    }

    if (document.frmMailing.email.value == "") {
        alert("Enter email!");
        document.frmMailing.email.focus();
        return false;
    }

    if (document.frmMailing.email.value.indexOf("@") == "-1") {
        alert("Enter valid email!");
        document.frmMailing.email.focus();
        return false;
    }

    return true;
}
