﻿// JScript File


function displaySplash()
{
    $("#wrapper").after("<div id=\"splash\"></div>");
    $("#splash").hide();
    $("#splash").css(
            {
                "position": "absolute",
                "top": "0", 
                "left": "0",
                "width": "950px",
                "height":"437px",
                "background-color": "#fff",
                "background-image": "url(Images/Backgrounds/splash.jpg)",
                "z-index": "5",
                "cursor": "pointer",
                "display": "block"
            }
        )
    
//    $("#splash").append("<img id=\"splash-title\" src=\"Images/logo.png\" />");
//    $("#splash-title").css(
//            {
//                "position": "absolute",
//                "top": "150px", 
//                "left": "350px",
//                "width": "233px",
//                "height":"46px",
//                "z-index": "6"
//            }
//        )
//        
//    $("#splash").append("<div id=\"splash-copy\"></div>");
    
    
//    $("#splash-copy").append("<p>There are many ways to train and exercise your body and everyone is as different as they’re unique. </p>");
//    $("#splash-copy").append("<p>That’s why, whatever you want to do in the gym, a personal trainer will help you get the maximum out of your exercise programme. </p>");
//    $("#splash-copy").append("<p>It’s the best choice for anyone who respects their body and values their time.</p>");
//    $("#splash-copy").append("<p><u>Enter</u> &gt;</p>");
//    
//    $("#splash-copy").css(
//        {
//            "position": "absolute",
//                "top": "250px", 
//                "width": "950px",
//                "height":"200px",
//                "z-index": "6",
//                "font-weight": "bold",
//                "color": "#fff",
//                "font-size": "1.1em",
//                "line-height": "2em",
//                "text-align": "center"
//        }
//    )
    
    /*fade in*/
    $("#splash").click(removeSplash);
    $("#splash").hide();
    
    $("#splash").fadeIn(1500, 
        function()
        {
            $("#wrapper").attr("style", "");
            $("#wrapper").css("display", "block");
            $("#wrapper").css("visibility", "inherit");
        }
    );
    
}

function removeSplash()
{
    /*pause*/
    /*$("#wrapper")
    .animate
    (
        {"opacity":"1"},
        2000,
        function()
        {*/
        
       /*
            $("#background").css("display", "inline");
            $("#main-header").css("display", "inline");
            $("#main-menu").css("display", "inline");
            $("#main-content-bg").css("display", "inline");
        */ 
        
            $("#splash")
            .animate({"opacity": "0"}, 1100,
                function()
                {
                    $("#splash").remove();
                }
            );
        /*}
   );*/
            
}


function displaySplashIE6()
{
    $("#wrapper").after("<div id=\"splash\"></div>");
    $("#splash").hide();
    $("#splash").css(
            {
                "position": "absolute",
                "top": "0", 
                "left": "0",
                "width": "950px",
                "height":"437px",
                "background-color": "#fff",
                "background-image": "url(Images/Backgrounds/splash.jpg)",
                "z-index": "5",
                "cursor": "pointer",
                "display": "block"
            }
        )
    $("#splash").click(removeSplashIE6);
    $("#splash").hide();
    
    $("#splash").show();

    $("#wrapper").attr("style", "");
    $("#wrapper").css("display", "block");
    $("#wrapper").css("visibility", "inherit");
        
}
function removeSplashIE6()
{

    $("#splash").remove();    
}
