$(document).ready(function () {   
    $(function () {
        var careersConfig = {
            "settings": {
                "forceflash": true,
                "flash": {
                    "swfUrl": "/berkeley/media/assets/scripts/video/VideoPlayer-Large.swf",
                    "id": "video_careers_home_player",
                    "width": "960",
                    "height": "540",
                    "version": "9.0.0",
                    "expressInstallSwfurl": "/berkeley/media/assets/scripts/video/expressInstall.swf",
                    "flashvars": {
                        "type": "file",
                        "playlist": "/berkeley/media/assets/scripts/video/playlist-careers.json"
                    },
                    "params": {
                        "wmode": "transparent",
                        "allowfullscreen": "false",
                        "allowscriptaccess": "always"
                    },
                    "attributes": {}
                }
            }
        }
        Landlord.loadVideoPlayer(careersConfig);
    });
    $('#video_careers_home_open').click(function () {
        $("#video_careers_home_holder .grid_6").animate({ marginLeft: "-360px" }, 500);
        $("#video_careers_home_holder").animate({ height: "540px" }, 500);

        $("#video_careers_home_open").hide();
        $("#video_careers_home_close").show();        
    });
    $('#video_careers_home_close').click(function () {
        $("#video_careers_home_holder .grid_6").animate({ marginLeft: "10px" }, 500);
        $("#video_careers_home_holder").animate({ height: "509px" }, 500);
        
        $("#video_careers_home_open").show();
        $("#video_careers_home_close").hide();
    });

});
