function adjustStyle(width) {
    width = parseInt(width);
    if (width < 481) {
        $("#slim").attr("href", "iphone.css");
    } else if ((width >= 481) && (width < 801)) {
        $("#slim").attr("href", "slim.css");
    } else {
       $("#slim").attr("href", "style.css"); 
    }
}

$(function() {
    adjustStyle($(this).width());
    $(window).resize(function() {
        adjustStyle($(this).width());
    });
});
