var width;
var height;

var tempWidth;
var tempHeight;

$(document).ready(function() {
    width = $(window).width();
    height = $(window).height();
    $("#player").css("width", width);
    $("#player").css("height", height);
    $("#picBg").css("width", width);
    $("#picBg").css("height", height);
});

$(window).resize(function() {
    tempWidth = $(window).width();
    tempHeight = $(window).height();

    if (tempWidth > width) {
        $("#player").css("width", tempWidth);
        $("#picBg").css("width", tempWidth);
    }

    if (tempHeight > height) {
        $("#player").css("height", tempHeight);
        $("#picBg").css("height", tempHeight);
    }
});
