﻿function hideFade() {
    var fb = new Array('foot', 'globalNav', 'aboutContent', 'servicesContent', 'workContent', 'contactContent');

    for (var i = 0; i < fb.length; i++) {
        $('#' + (fb[i])).hide();
    }
}

$(document).ready(function () {
    hideFade();
    $('#globalNav').delay(2000).slideDown(500, footfade);

});

function footfade() {
    $('#foot').delay(500).fadeIn(300);
}

function mouseOver(id) {
    if ($.browser.msie) {
        if (id == 'about') {
            $('#about').animate({ left: '+=15px' }, 400);
        }
        if (id == 'services') {
            $('#services').animate({ left: '+=15px' }, 400);
        }
        if (id == 'work') {
            $('#work').animate({ left: '+=15px' }, 400);
        }
        if (id == 'contact') {
            $('#contact').animate({ left: '+=15px' }, 400);
        }
    }
    else {
        if (id == 'about') {
            $('#about').animate({ left: '+=15px', opacity: 0.7 }, 400);
        }
        if (id == 'services') {
            $('#services').animate({ left: '+=15px', opacity: 0.7 }, 400);
        }
        if (id == 'work') {
            $('#work').animate({ left: '+=15px', opacity: 0.7 }, 400);
        }
        if (id == 'contact') {
            $('#contact').animate({ left: '+=15px', opacity: 0.7 }, 400);
        }
    }
}

function mouseOut(id) {
    if ($.browser.msie) {
        if (id == 'about') {
            $('#about').animate({ left: '-=15px' }, 300);
        }
        if (id == 'services') {
            $('#services').animate({ left: '-=15px' }, 300);
        }
        if (id == 'work') {
            $('#work').animate({ left: '-=15px' }, 300);
        }
        if (id == 'contact') {
            $('#contact').animate({ left: '-=15px' }, 300);
        }
    }
    else {
        if (id == 'about') {
            $('#about').animate({ left: '-=15px', opacity: 1 }, 400);
        }
        if (id == 'services') {
            $('#services').animate({ left: '-=15px', opacity: 1 }, 400);
        }
        if (id == 'work') {
            $('#work').animate({ left: '-=15px', opacity: 1 }, 400);
        }
        if (id == 'contact') {
            $('#contact').animate({ left: '-=15px', opacity: 1 }, 400);
        }
    }
}

function fadeOutContent() {
    var fb = new Array('blankContent', 'aboutContent', 'servicesContent', 'workContent', 'contactContent');

    for (var i = 0; i < fb.length; i++) {
        $('#' + (fb[i])).hide();
    }
}

function OnClick(id) {
    if (id == 'about') {
        fadeOutContent();
        $('#aboutContent').fadeIn(300);
    }
    if (id == 'services') {
        fadeOutContent();
        $('#servicesContent').fadeIn(300);
    }
    if (id == 'work') {
        fadeOutContent();
        $('#workContent').fadeIn(300);
    }
    if (id == 'contact') {
        fadeOutContent();
        $('#contactContent').fadeIn(300);
    }
}
