$(document).ready(function () {

    var h = $(window).height() / 2;
    var w = $(window).width() / 2;
    var leftH = h + 80;
    $("#main-content .right").css({ "height": leftH });
    $('#main-content .right').jScrollPane();

    var feedH = h - 330;
    $("#bio-wrapper .feed").css({ "height": feedH });

    $('.links').jScrollPane();
    $('.feed').jScrollPane();
    $('#background > div').hide();
    $("body").append('<div style="display: none;" id="preloader"></div>');
    for (var i = 1; i <= 3; i++) {
        $("#preloader").append(
    '<img src="images/home' + i + '.png" alt="" />' +
    '<img src="images/about' + i + '.png" alt="" />' +
    '<img src="images/corporate' + i + '.png" alt="" />' +
    '<img src="images/searchjobs' + i + '.png" alt="" />' +
    '<img src="images/recruiter' + i + '.png" alt="" />' +
    '<img src="images/contact' + i + '.png" alt="" />' +
    '<img src="images/HotJob2.png" alt="" />'

    );
    }

    for (var i = 1; i <= 6; i++) {
        $("#preloader").append('<img src="images/slide' + i + '.jpg" alt="" />');
    }


    QueryLoader.init();

    ////////////////////////////// IF IE CLICK ////////////////////////////////


    ////////////////////////////// HOME CLICK ////////////////////////////////
    $("a.home").click(function () {
        $("body").css({ "background": "#6fb3cc" });
        ////////////////////////////// flipping effects /////////////////////////////
        $("#slide1").flip({
            direction: 'tb', speed: 400, color: '#6fb3cc', content: '<div style="background:url(images/slide1.jpg);width:2360px;height:163px;"></div>',
            onAnimation: function () {
                $("#slide1").fadeOut("fast");
                $("#slide1").fadeIn(300);
            }
        });

        setTimeout(function () {
            $("#slide2").flip({
                direction: 'tb', speed: 400, color: '#6fb3cc', content: '<div style="background:url(images/slide1.jpg) 0px -163px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide2").fadeOut("fast");
                    $("#slide2").fadeIn(300);
                }

            });
        }, 200);

        setTimeout(function () {
            $("#slide3").flip({
                direction: 'tb', speed: 400, color: '#6fb3cc', content: '<div style="background:url(images/slide1.jpg) 0px -326px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide3").fadeOut("fast");
                    $("#slide3").fadeIn(300);
                }


            });
        }, 500);


        setTimeout(function () {
            $("#slide4").flip({ direction: 'tb', speed: 400, color: '#6fb3cc', content: '<div style="background:url(images/slide1.jpg) 0px -489px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide4").fadeOut("fast");
                    $("#slide4").fadeIn(300);
                }

            });
        }, 700);

        setTimeout(function () {
            $("#slide5").flip({ direction: 'tb', speed: 400, color: '#6fb3cc', content: '<div style="background:url(images/slide1.jpg) 0px -652px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide5").fadeOut("fast");
                    $("#slide5").fadeIn(300);
                }

            });
        }, 900);

        setTimeout(function () {
            $("#slide6").flip({ direction: 'tb', speed: 400, color: '#6fb3cc', content: '<div style="background:url(images/slide1.jpg) 0px -815px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide6").fadeOut("fast");
                    $("#slide6").fadeIn(300);
                }

            });
        }, 1100);

        setTimeout(function () {
            $("#slide7").flip({ direction: 'tb', speed: 400, color: '#6fb3cc', content: '<div style="background:url(images/slide1.jpg) 0px -978px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide7").fadeOut("fast");
                    $("#slide7").fadeIn(300);
                }

            });
        }, 1300);

        setTimeout(function () {
            $("#slide8").flip({ direction: 'tb', speed: 400, color: '#6fb3cc', content: '<div style="background:url(images/slide1.jpg) 0px -1141px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide8").fadeOut("fast");
                    $("#slide8").fadeIn(300);
                }

            });
        }, 1500);

        setTimeout(function () {
            $("#slide9").flip({ direction: 'tb', speed: 400, color: '#6fb3cc', content: '<div style="background:url(images/slide1.jpg) 0px -1304px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide9").fadeOut("fast");
                    $("#slide9").fadeIn(300);
                }

            });
        }, 1700);

        setTimeout(function () {
            $("#slide10").flip({ direction: 'tb', speed: 400, color: '#6fb3cc', content: '<div style="background:url(images/slide1.jpg) 0px -1467px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide10").fadeOut("fast");
                    $("#slide10").fadeIn(300);
                }

            });
        }, 1900);

        ////////////////////////////// end flipping effects /////////////////////////////



        $("#main-content").fadeOut('fast');
        $("#main-content > div").hide();
        if ($.browser.msie) {
            $("#main-content .right p").hide();
            $("#main-content .right h1").hide();
        }
        $("#main-content").fadeIn(500, function () {
            var h = $(window).height() / 2;
            var leftH = h - 80;
            $("#main-content .right").css({ "height": leftH });
            $('#main-content .right').jScrollPane();
            $("#home").fadeIn(100);
            var h = $(window).height() / 2;
            var leftH = h - 80;
            $("#main-content .right").css({ "height": leftH });
            $('#main-content .right').jScrollPane();

            if (h <= 357) {
                var leftH = h - 10;
                $("#main-content .white-wrapper").css({ "height": leftH });
                $("#main-content .left").css({ "height": leftH + 40 });
                var reset = h - 120;
                $("#main-content .right").css({ "height": reset });
                $(".jScrollPaneContainer").height(h - 10);
                $('#main-content .right').jScrollPane();

            }
            if ($.browser.msie) {
                setTimeout(function () { $("#main-content .right h1").show(); }, 700);
                setTimeout(function () { $("#main-content .right p").show(); }, 700);
            }

        });

    });


    ////////////////////////////// end Home Click ///////////////////////////// 


    ////////////////////////////// ABOUT CLICK ////////////////////////////////  
    $("a.about").click(function () {

        $("body").css({ "background": "#bbbbb3" });
        ////////////////////////////// flipping effects /////////////////////////////
        $("#slide1").flip({
            direction: 'tb', speed: 400, color: '#bbbbb3', content: '<div style="background:url(images/slide2.jpg);width:2360px;height:163px;"></div>',
            onAnimation: function () {
                $("#slide1").fadeOut("fast");
                $("#slide1").fadeIn(300);
            }
        });

        setTimeout(function () {
            $("#slide2").flip({
                direction: 'tb', speed: 400, color: '#bbbbb3', content: '<div style="background:url(images/slide2.jpg) 0px -163px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide2").fadeOut("fast");
                    $("#slide2").fadeIn(300);
                }

            });
        }, 200);

        setTimeout(function () {
            $("#slide3").flip({
                direction: 'tb', speed: 400, color: '#bbbbb3', content: '<div style="background:url(images/slide2.jpg) 0px -326px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide3").fadeOut("fast");
                    $("#slide3").fadeIn(300);
                }


            });
        }, 500);


        setTimeout(function () {
            $("#slide4").flip({ direction: 'tb', speed: 400, color: '#bbbbb3', content: '<div style="background:url(images/slide2.jpg) 0px -489px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide4").fadeOut("fast");
                    $("#slide4").fadeIn(300);
                }

            });
        }, 700);

        setTimeout(function () {
            $("#slide5").flip({ direction: 'tb', speed: 400, color: '#bbbbb3', content: '<div style="background:url(images/slide2.jpg) 0px -652px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide5").fadeOut("fast");
                    $("#slide5").fadeIn(300);
                }

            });
        }, 900);

        setTimeout(function () {
            $("#slide6").flip({ direction: 'tb', speed: 400, color: '#bbbbb3', content: '<div style="background:url(images/slide2.jpg) 0px -815px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide6").fadeOut("fast");
                    $("#slide6").fadeIn(300);
                }

            });
        }, 1100);

        setTimeout(function () {
            $("#slide7").flip({ direction: 'tb', speed: 400, color: '#bbbbb3', content: '<div style="background:url(images/slide2.jpg) 0px -978px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide7").fadeOut("fast");
                    $("#slide7").fadeIn(300);
                }

            });
        }, 1300);

        setTimeout(function () {
            $("#slide8").flip({ direction: 'tb', speed: 400, color: '#bbbbb3', content: '<div style="background:url(images/slide2.jpg) 0px -1141px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide8").fadeOut("fast");
                    $("#slide8").fadeIn(300);
                }

            });
        }, 1500);

        setTimeout(function () {
            $("#slide9").flip({ direction: 'tb', speed: 400, color: '#bbbbb3', content: '<div style="background:url(images/slide2.jpg) 0px -1304px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide9").fadeOut("fast");
                    $("#slide9").fadeIn(300);
                }

            });
        }, 1700);

        setTimeout(function () {
            $("#slide10").flip({ direction: 'tb', speed: 400, color: '#bbbbb3', content: '<div style="background:url(images/slide2.jpg) 0px -1467px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide10").fadeOut("fast");
                    $("#slide10").fadeIn(300);
                }

            });
        }, 1900);

        ////////////////////////////// end flipping effects /////////////////////////////


        $("#main-content").fadeOut('fast');
        $("#main-content > div").hide();

        if ($.browser.msie) {
            $("#main-content .right p").hide();
        }
        $("#main-content").fadeIn(500, function () {

            $("#about").fadeIn(100);
            var h = $(window).height() / 2;
            var leftH = h - 80;
            $("#main-content .right").css({ "height": leftH });
            $('#main-content .right').jScrollPane();
            if (h <= 357) {
                var leftH = h - 10;
                $("#main-content .white-wrapper").css({ "height": leftH });
                $("#main-content .left").css({ "height": leftH + 40 });
                var reset = h - 120;
                $("#main-content .right").css({ "height": reset });
                $(".jScrollPaneContainer").height(h - 10);
                //$('#main-content .right').jScrollPane();

            }
            $('#main-content .right').jScrollPane();

            if ($.browser.msie) {
                setTimeout(function () { $("#main-content .right p").show(); }, 700);
                $('#main-content .right').jScrollPane();
            }


        });


    });

    $("a.corp").click(function () {
        $("body").css({ "background": "#147bc6" });
        ////////////////////////////// flipping effects /////////////////////////////
        $("#slide1").flip({
            direction: 'tb', speed: 400, color: '#147bc6', content: '<div style="background:url(images/slide3.jpg);width:2360px;height:163px;"></div>',
            onAnimation: function () {
                $("#slide1").fadeOut("fast");
                $("#slide1").fadeIn(300);
            }
        });

        setTimeout(function () {
            $("#slide2").flip({
                direction: 'tb', speed: 400, color: '#147bc6', content: '<div style="background:url(images/slide3.jpg) 0px -163px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide2").fadeOut("fast");
                    $("#slide2").fadeIn(300);
                }

            });
        }, 200);

        setTimeout(function () {
            $("#slide3").flip({
                direction: 'tb', speed: 400, color: '#147bc6', content: '<div style="background:url(images/slide3.jpg) 0px -326px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide3").fadeOut("fast");
                    $("#slide3").fadeIn(300);
                }


            });
        }, 500);


        setTimeout(function () {
            $("#slide4").flip({ direction: 'tb', speed: 400, color: '#147bc6', content: '<div style="background:url(images/slide3.jpg) 0px -489px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide4").fadeOut("fast");
                    $("#slide4").fadeIn(300);
                }

            });
        }, 700);

        setTimeout(function () {
            $("#slide5").flip({ direction: 'tb', speed: 400, color: '#147bc6', content: '<div style="background:url(images/slide3.jpg) 0px -652px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide5").fadeOut("fast");
                    $("#slide5").fadeIn(300);
                }

            });
        }, 900);

        setTimeout(function () {
            $("#slide6").flip({ direction: 'tb', speed: 400, color: '#147bc6', content: '<div style="background:url(images/slide3.jpg) 0px -815px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide6").fadeOut("fast");
                    $("#slide6").fadeIn(300);
                }

            });
        }, 1100);

        setTimeout(function () {
            $("#slide7").flip({ direction: 'tb', speed: 400, color: '#147bc6', content: '<div style="background:url(images/slide3.jpg) 0px -978px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide7").fadeOut("fast");
                    $("#slide7").fadeIn(300);
                }

            });
        }, 1300);

        setTimeout(function () {
            $("#slide8").flip({ direction: 'tb', speed: 400, color: '#147bc6', content: '<div style="background:url(images/slide3.jpg) 0px -1141px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide8").fadeOut("fast");
                    $("#slide8").fadeIn(300);
                }

            });
        }, 1500);

        setTimeout(function () {
            $("#slide9").flip({ direction: 'tb', speed: 400, color: '#147bc6', content: '<div style="background:url(images/slide3.jpg) 0px -1304px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide9").fadeOut("fast");
                    $("#slide9").fadeIn(300);
                }

            });
        }, 1700);

        setTimeout(function () {
            $("#slide10").flip({ direction: 'tb', speed: 400, color: '#147bc6', content: '<div style="background:url(images/slide3.jpg) 0px -1467px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide10").fadeOut("fast");
                    $("#slide10").fadeIn(300);
                }

            });
        }, 1900);

        ////////////////////////////// end flipping effects /////////////////////////////

        $("#main-content").fadeOut('fast');
        $("#main-content > div").hide();

        if ($.browser.msie) {
            $("#main-content .right p").hide();
        }
        $("#main-content").fadeIn(500, function () {
            $("#corp").fadeIn(100);
            var h = $(window).height() / 2;
            var leftH = h - 80;
            $("#main-content .right").css({ "height": leftH });
            $('#main-content .right').jScrollPane();

            if (h <= 357) {
                var leftH = h -10;
                $("#main-content .white-wrapper").css({ "height": leftH });
                $("#main-content .left").css({ "height": leftH + 40 });
                var reset = h - 120;
                $("#main-content .right").css({ "height": reset });
                $(".jScrollPaneContainer").height(h-10);
                $('#main-content .right').jScrollPane();

            }

            if ($.browser.msie) {
                setTimeout(function () { $("#main-content .right p").show(); }, 700);
            }
        });


    });

    $("a.search").click(function () {
        $("body").css({ "background": "#1c87b3" });
        ////////////////////////////// flipping effects /////////////////////////////
        $("#slide1").flip({
            direction: 'tb', speed: 400, color: '#1c87b3', content: '<div style="background:url(images/slide4.jpg);width:2360px;height:163px;"></div>',
            onAnimation: function () {
                $("#slide1").fadeOut("fast");
                $("#slide1").fadeIn(300);
            }
        });

        setTimeout(function () {
            $("#slide2").flip({
                direction: 'tb', speed: 400, color: '#1c87b3', content: '<div style="background:url(images/slide4.jpg) 0px -163px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide2").fadeOut("fast");
                    $("#slide2").fadeIn(300);
                }

            });
        }, 200);

        setTimeout(function () {
            $("#slide3").flip({
                direction: 'tb', speed: 400, color: '#1c87b3', content: '<div style="background:url(images/slide4.jpg) 0px -326px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide3").fadeOut("fast");
                    $("#slide3").fadeIn(300);
                }


            });
        }, 500);


        setTimeout(function () {
            $("#slide4").flip({ direction: 'tb', speed: 400, color: '#1c87b3', content: '<div style="background:url(images/slide4.jpg) 0px -489px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide4").fadeOut("fast");
                    $("#slide4").fadeIn(300);
                }

            });
        }, 700);

        setTimeout(function () {
            $("#slide5").flip({ direction: 'tb', speed: 400, color: '#1c87b3', content: '<div style="background:url(images/slide4.jpg) 0px -652px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide5").fadeOut("fast");
                    $("#slide5").fadeIn(300);
                }

            });
        }, 900);

        setTimeout(function () {
            $("#slide6").flip({ direction: 'tb', speed: 400, color: '#1c87b3', content: '<div style="background:url(images/slide4.jpg) 0px -815px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide6").fadeOut("fast");
                    $("#slide6").fadeIn(300);
                }

            });
        }, 1100);

        setTimeout(function () {
            $("#slide7").flip({ direction: 'tb', speed: 400, color: '#1c87b3', content: '<div style="background:url(images/slide4.jpg) 0px -978px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide7").fadeOut("fast");
                    $("#slide7").fadeIn(300);
                }

            });
        }, 1300);

        setTimeout(function () {
            $("#slide8").flip({ direction: 'tb', speed: 400, color: '#1c87b3', content: '<div style="background:url(images/slide4.jpg) 0px -1141px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide8").fadeOut("fast");
                    $("#slide8").fadeIn(300);
                }

            });
        }, 1500);

        setTimeout(function () {
            $("#slide9").flip({ direction: 'tb', speed: 400, color: '#1c87b3', content: '<div style="background:url(images/slide4.jpg) 0px -1304px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide9").fadeOut("fast");
                    $("#slide9").fadeIn(300);
                }

            });
        }, 1700);

        setTimeout(function () {
            $("#slide10").flip({ direction: 'tb', speed: 400, color: '#1c87b3', content: '<div style="background:url(images/slide4.jpg) 0px -1467px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide10").fadeOut("fast");
                    $("#slide10").fadeIn(300);
                }

            });
        }, 1900);

        ////////////////////////////// end flipping effects /////////////////////////////

        $("#main-content").fadeOut('fast');
        $("#main-content > div").hide();

        if ($.browser.msie) {
            $("#main-content .right p").hide();
        }
        $("#main-content").fadeIn(500, function () {
            $("#search").fadeIn(100);
            var h = $(window).height() / 2;
            var leftH = h - 80;
            $("#main-content .right").css({ "height": leftH });
            $('#main-content .right').jScrollPane();

            if (h <= 357) {
                var leftH = h - 10;
                $("#main-content .white-wrapper").css({ "height": leftH });
                $("#main-content .left").css({ "height": leftH + 40 });
                var reset = h - 120;
                $("#main-content .right").css({ "height": reset });
                $(".jScrollPaneContainer").height(h - 10);
                $('#main-content .right').jScrollPane();

            }
            if ($.browser.msie) {
                setTimeout(function () { $("#main-content .right p").show(); }, 700);
            }
        });

    });

    $("a.can").click(function () {
        $("body").css({ "background": "#85b4ba" });
        ////////////////////////////// flipping effects /////////////////////////////
        $("#slide1").flip({
            direction: 'tb', speed: 400, color: '#85b4ba', content: '<div style="background:url(images/slide5.jpg);width:2360px;height:163px;"></div>',
            onAnimation: function () {
                $("#slide1").fadeOut("fast");
                $("#slide1").fadeIn(300);
            }
        });

        setTimeout(function () {
            $("#slide2").flip({
                direction: 'tb', speed: 400, color: '#85b4ba', content: '<div style="background:url(images/slide5.jpg) 0px -163px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide2").fadeOut("fast");
                    $("#slide2").fadeIn(300);
                }

            });
        }, 200);

        setTimeout(function () {
            $("#slide3").flip({
                direction: 'tb', speed: 400, color: '#85b4ba', content: '<div style="background:url(images/slide5.jpg) 0px -326px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide3").fadeOut("fast");
                    $("#slide3").fadeIn(300);
                }


            });
        }, 500);


        setTimeout(function () {
            $("#slide4").flip({ direction: 'tb', speed: 400, color: '#85b4ba', content: '<div style="background:url(images/slide5.jpg) 0px -489px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide4").fadeOut("fast");
                    $("#slide4").fadeIn(300);
                }

            });
        }, 700);

        setTimeout(function () {
            $("#slide5").flip({ direction: 'tb', speed: 400, color: '#85b4ba', content: '<div style="background:url(images/slide5.jpg) 0px -652px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide5").fadeOut("fast");
                    $("#slide5").fadeIn(300);
                }

            });
        }, 900);

        setTimeout(function () {
            $("#slide6").flip({ direction: 'tb', speed: 400, color: '#85b4ba', content: '<div style="background:url(images/slide5.jpg) 0px -815px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide6").fadeOut("fast");
                    $("#slide6").fadeIn(300);
                }

            });
        }, 1100);

        setTimeout(function () {
            $("#slide7").flip({ direction: 'tb', speed: 400, color: '#85b4ba', content: '<div style="background:url(images/slide5.jpg) 0px -978px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide7").fadeOut("fast");
                    $("#slide7").fadeIn(300);
                }

            });
        }, 1300);

        setTimeout(function () {
            $("#slide8").flip({ direction: 'tb', speed: 400, color: '#85b4ba', content: '<div style="background:url(images/slide5.jpg) 0px -1141px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide8").fadeOut("fast");
                    $("#slide8").fadeIn(300);
                }

            });
        }, 1500);

        setTimeout(function () {
            $("#slide9").flip({ direction: 'tb', speed: 400, color: '#85b4ba', content: '<div style="background:url(images/slide5.jpg) 0px -1304px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide9").fadeOut("fast");
                    $("#slide9").fadeIn(300);
                }

            });
        }, 1700);

        setTimeout(function () {
            $("#slide10").flip({ direction: 'tb', speed: 400, color: '#85b4ba', content: '<div style="background:url(images/slide5.jpg) 0px -1467px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide10").fadeOut("fast");
                    $("#slide10").fadeIn(300);
                }

            });
        }, 1900);

        ////////////////////////////// end flipping effects /////////////////////////////

        $("#main-content").fadeOut('fast');
        $("#main-content > div").hide();

        if ($.browser.msie) {
            $("#bio-wrapper").hide();
        }

        
        $("#main-content").fadeIn(500, function () {
            $("#can").fadeIn(100);
            var h = $(window).height() / 2;
            var leftH = h - 80;
            $("#main-content .right").css({ "height": leftH });
            $('#main-content .right').jScrollPane();
            if (h <= 357) {
                var leftH = h - 10;
                $("#main-content .white-wrapper").css({ "height": leftH });
                $("#main-content .left").css({ "height": leftH + 40 });
                var reset = h - 120;
                $("#main-content .right").css({ "height": reset });
                $(".jScrollPaneContainer").height(h - 10);
                $('#main-content .right').jScrollPane();

            }
            if ($.browser.msie) {
                setTimeout(function () { $("#bio-wrapper").show(); }, 700);
            }
        });

    });

    $("a.contact").click(function () {

        $("body").css({ "background": "#000" });
        ////////////////////////////// flipping effects /////////////////////////////
        $("#slide1").flip({
            direction: 'tb', speed: 400, color: '#000', content: '<div style="background:url(images/slide6.jpg);width:2360px;height:163px;"></div>',
            onAnimation: function () {
                $("#slide1").fadeOut("fast");
                $("#slide1").fadeIn(300);
            }
        });

        setTimeout(function () {
            $("#slide2").flip({
                direction: 'tb', speed: 400, color: '#000', content: '<div style="background:url(images/slide6.jpg) 0px -163px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide2").fadeOut("fast");
                    $("#slide2").fadeIn(300);
                }

            });
        }, 200);

        setTimeout(function () {
            $("#slide3").flip({
                direction: 'tb', speed: 400, color: '#000', content: '<div style="background:url(images/slide6.jpg) 0px -326px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide3").fadeOut("fast");
                    $("#slide3").fadeIn(300);
                }


            });
        }, 500);


        setTimeout(function () {
            $("#slide4").flip({ direction: 'tb', speed: 400, color: '#000', content: '<div style="background:url(images/slide6.jpg) 0px -489px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide4").fadeOut("fast");
                    $("#slide4").fadeIn(300);
                }

            });
        }, 700);

        setTimeout(function () {
            $("#slide5").flip({ direction: 'tb', speed: 400, color: '#000', content: '<div style="background:url(images/slide6.jpg) 0px -652px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide5").fadeOut("fast");
                    $("#slide5").fadeIn(300);
                }

            });
        }, 900);

        setTimeout(function () {
            $("#slide6").flip({ direction: 'tb', speed: 400, color: '#000', content: '<div style="background:url(images/slide6.jpg) 0px -815px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide6").fadeOut("fast");
                    $("#slide6").fadeIn(300);
                }

            });
        }, 1100);

        setTimeout(function () {
            $("#slide7").flip({ direction: 'tb', speed: 400, color: '#000', content: '<div style="background:url(images/slide6.jpg) 0px -978px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide7").fadeOut("fast");
                    $("#slide7").fadeIn(300);
                }

            });
        }, 1300);

        setTimeout(function () {
            $("#slide8").flip({ direction: 'tb', speed: 400, color: '#000', content: '<div style="background:url(images/slide6.jpg) 0px -1141px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide8").fadeOut("fast");
                    $("#slide8").fadeIn(300);
                }

            });
        }, 1500);

        setTimeout(function () {
            $("#slide9").flip({ direction: 'tb', speed: 400, color: '#000', content: '<div style="background:url(images/slide6.jpg) 0px -1304px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide9").fadeOut("fast");
                    $("#slide9").fadeIn(300);
                }

            });
        }, 1700);

        setTimeout(function () {
            $("#slide10").flip({ direction: 'tb', speed: 400, color: '#000', content: '<div style="background:url(images/slide6.jpg) 0px -1467px;width:2360px;height:163px;"></div>',

                onAnimation: function () {
                    $("#slide10").fadeOut("fast");
                    $("#slide10").fadeIn(300);
                }

            });
        }, 1900);

        ////////////////////////////// end flipping effects /////////////////////////////

        $("#main-content").fadeOut('fast');
        $("#main-content > div").hide();

        if ($.browser.msie) {
            $("#main-content .right").hide();
            $("#main-content .right p").hide();
        }
        $("#main-content").fadeIn(500, function () {
            $("#contact").fadeIn(100);
            var h = $(window).height() / 2;
            var leftH = h - 80;
            $("#main-content .right").css({ "height": leftH });
            $('#main-content .right').jScrollPane();

            if (h <= 357) {
                var leftH = h - 10;
                $("#main-content .white-wrapper").css({ "height": leftH });
                $("#main-content .left").css({ "height": leftH + 40 });
                var reset = h - 120;
                $("#main-content .right").css({ "height": reset });
                $(".jScrollPaneContainer").height(h - 10);
                $('#main-content .right').jScrollPane();

            }
            if ($.browser.msie) {
                setTimeout(function () { $("#main-content .right").show(); }, 700);
                setTimeout(function () { $("#main-content .right p").show(); }, 700);
            }
        });
    });




    //adds highlight class
    $('div.menu a').click(function () {
        $('div.menu a').removeClass("highlight");


        $(this).addClass('highlight');

    });

    //Adds class to current selection onload
    var pound = window.location.href.slice(window.location.href.indexOf('#'));

    if (pound == '/') {
        $('.home').addClass("highlight");

        $("#main-content").fadeOut('fast');
        $("#main-content > div").hide();
        $("#main-content").fadeIn(1, function () {
            $("#home").fadeIn(1);
            var h = $(window).height() / 2;
            var leftH = h - 80;
            $("#main-content .right").css({ "height": leftH });
            $('#main-content .right').jScrollPane();

            if (h <= 357) {
                var leftH = h - 10;
                $("#main-content .white-wrapper").css({ "height": leftH });
                $("#main-content .left").css({ "height": leftH + 40 });
                var reset = h - 120;
                $("#main-content .right").css({ "height": reset });
                $(".jScrollPaneContainer").height(h - 10);
                $('#main-content .right').jScrollPane();

            }
        });
    }

    else if (pound == '#home') {
        $('.home').addClass("highlight");
        $("#main-content").fadeOut('fast');
        $("#main-content > div").hide();
        $("#main-content").fadeIn(1, function () {
            $("#home").fadeIn(1);
            var h = $(window).height() / 2;
            var leftH = h - 80;
            $("#main-content .right").css({ "height": leftH });
            $('#main-content .right').jScrollPane();

            if (h <= 357) {
                var leftH = h - 10;
                $("#main-content .white-wrapper").css({ "height": leftH });
                $("#main-content .left").css({ "height": leftH + 40 });
                var reset = h - 120;
                $("#main-content .right").css({ "height": reset });
                $(".jScrollPaneContainer").height(h - 10);
                $('#main-content .right').jScrollPane();

            }
        });
    }

    else if (pound == '#about-us') {
        $('.about').addClass("highlight");
        $('.about').click();
    }

    else if (pound == '#corporate-assistance') {
        $('.corp').addClass("highlight");
        $('.corp').click();
    }

    else if (pound == '#recruiter-profiles') {
        $('.can').addClass("highlight");
        $('.can').click();
    }

    else if (pound == '#search-jobs') {
        $('.search').addClass("highlight");
        $('.search').click();
    }

    else if (pound == '#contact-us') {
        $('.contact').addClass("highlight");
        $('.contact').click();
    } else {
        $('.home').addClass("highlight");
        $('.home').click();

    }

    //Jobs
    $('#main-content .left .button').click(function () {
        $.blockUI({ message: $('#job_pop'), css: { width: '680px', padding: '10px', top: '20px'} });
        $("div.hj-content").jScrollPane();
    });

    $('#exit').click(function () {
        $.unblockUI();
        return false;
    });

    //Scroll Planes

    //Bio Section
    $("div.people a:last").css({ "border-right": "none" });
    $("div.people a:first").addClass('highlight');
    $("#bio-wrapper > div").not(":first").hide();


    $("div.people a").click(function () {

        $("div.people a").removeClass('highlight');
        $(this).addClass('highlight');
        var idToLoad = $(this).attr("id").split('-');
        $("#bio-wrapper").find("div:visible").fadeOut("fast", function () {
            $(this).parent().find("#" + idToLoad[0]).fadeIn();
            $("#" + idToLoad[0]).children().fadeIn();
            $('.right_content').jScrollPane();
            $("#" + idToLoad[0] + " div").show();
            $("#" + idToLoad[0] + " .links").jScrollPane();
            $("#" + idToLoad[0] + " .feed").jScrollPane();


        });

    });


    //Resizes
    var w = $(window).width() / 2;
    var h = $(window).height() / 2;


    var w = $(window).width() / 2;
    var h = $(window).height() / 2;


    var portalH = h + 150;

    if (w <= 720) {
        var portalW = w + 500;
        var portalL = -$(window).width() / 6 + 60;
    } else if (w > 720 && w < 1400) {
        var portalW = w + 500;
        var portalL = -$(window).width() / 5 + 60;
    } else {
        var portalW = w + 700;
        var portalL = -$(window).width() / 4;
    }

    if (h <= 466) {
        var portalH = h + 150;
    }

    if (h <= 357) {
        var portalH = h + 30;
    }

    $("#jobPortal").css({ "height": portalH });
    $("#jobPortal").css({ "width": portalW });
    $("#jobPortal").css({ "margin-left": portalL });

    var jobs = w - 350;
    $.blockUI.defaults.css.left = jobs;


    var footer = w - 425;
    $("#footer .wrap").css({ "margin-left": footer });
    //$("#footer-top").css({"margin-left":footer});


    var feedH = h + 100;
    $("#bio-wrapper .feed").css({ "height": feedH });

    var job_popupH = h;
    $("#job_pop").css({ "height": job_popupH });
    $("div.hj-content").css({ "height": job_popupH - 100 });

    var backwrap = w - 1150;
    $('#background').css({ "margin-left": backwrap });


    if (h >= 381) {
        var profileH = h + 100;
        $("#main-content .profile-wrapper .left").css({ "height": profileH });
    }

    $(window).resize(function () {

        var h = $(window).height() / 2;
        var w = $(window).width() / 2;

        var w = $(window).width() / 2;
        var h = $(window).height() / 2;

        var portalH = h + 150;

        if (w <= 720) {
            var portalW = w + 500;
            var portalL = -$(window).width() / 6 + 60;
        } else if (w > 720 && w < 1400) {
            var portalW = w + 500;
            var portalL = -$(window).width() / 5 + 60;
        } else {
            var portalW = w + 700;
            var portalL = -$(window).width() / 4;
        }

        if (h <= 466) {
            var portalH = h + 150;
        }

        $("#jobPortal").css({ "height": portalH });
        $("#jobPortal").css({ "width": portalW });
        $("#jobPortal").css({ "margin-left": portalL });

        var jobs = w - 350;
        $.blockUI.defaults.css.left = jobs;

        var backwrap = w - 1150;
        $('#background').css({ "margin-left": backwrap });

        var job_popupH = h;
        $("#job_pop").css({ "height": job_popupH });
        $("div.hj-content").css({ "height": job_popupH - 100 });

        var footer = w - 425;
        $("#footer .wrap").css({ "margin-left": footer })
    });


    //fixees dotted random border
    $("a").bind("focus", function () {
        if (this.blur) this.blur();
    });

    $(".jScrollPaneContainer").bind("focus", function () {
        if (this.blur) this.blur();
    });

    $("#exit").bind("focus", function () {
        if (this.blur) this.blur();
    });

    setTimeout(function () { $('#background > div').fadeIn(); }, 2000);


    //Iframe redirects

    $("a.recjobID").click(function () {
        var title = $(this).attr("title");
        var url = "http://services.skyfirmjobs.net/testapp/default.aspx?d=1002&jid=";
        window.frames["jobPortal"].location.href = url + title;
        $('.search').click();

    });


    $("a.by-jobID").click(function () {
        var title = $(this).attr("title");
        var url = "http://services.skyfirmjobs.net/testapp/default.aspx?d=1002&jid=";
        window.frames["jobPortal"].location.href = url + title;
        $('.search').click();
        $.unblockUI();

    });

    $("a.by-type").click(function () {
        var url = "http://services.skyfirmjobs.net/testapp/default.aspx?d=1002&f=by-type";
        window.frames["jobPortal"].location.href = url;
        $('.search').click();
        $.unblockUI();
    });

    $("a.by-region").click(function () {
        var url = "http://services.skyfirmjobs.net/testapp/default.aspx?d=1002&f=by-region";
        window.frames["jobPortal"].location.href = url;
        $('.search').click();
        $.unblockUI();
    });

    $("a.by-experience").click(function () {
        var url = "http://services.skyfirmjobs.net/testapp/default.aspx?d=1002&f=by-experience";
        window.frames["jobPortal"].location.href = url;
        $('.search').click();
        $.unblockUI();
    });

    $("a.view_page").click(function () {
        var title = $(this).attr("title");
        var url = "http://services.skyfirmjobs.net/testapp/default.aspx?d=1002&r=";
        window.frames["jobPortal"].location.href = url + title;
        $('.search').click();

    });

    var jid = window.location.href.slice(window.location.href.indexOf('?'));

    if (jid.length > 4) {
        var newjid = jid.substring(5);



        var url = "http://services.skyfirmjobs.net/testapp/default.aspx?d=1002&jid=";
        window.frames["jobPortal"].location.href = url + newjid;
        $('.search').click();

        setTimeout(function () { $("#home").hide(); }, 700);
    }


});                    //End Global Function


