var AMC_RSS = function(feedURL, entryLimit, targetElement, cssClassName, optionalCSS){
    this.feed = feedURL;
    this.limit = entryLimit;
    this.target = targetElement;
    this.cssClass = cssClassName;
    this.cssLink = optionalCSS;
    var appendTo = document.getElementsByTagName('body')[0];
    if (typeof this.cssLink != 'undefined' && typeof this.cssLink != undefined) {
        var newLink = document.createElement('link');
        newLink.rel = 'stylesheet';
        newLink.type = 'text/css';
        newLink.href = this.cssLink;
        appendTo.appendChild(newLink);
    }
    var url = 'feed=' + this.feed + '&limit=' + this.limit + '&target=' + this.target + '&class=' + this.cssClass;
    var newScript = document.createElement('script');
    newScript.type = 'text/javascript';
    newScript.src = 'http://blogs.amctv.com/rss-reader.php?' + url;
    appendTo.appendChild(newScript);
}
jQuery(document).ready(function(){
var boxOfficetopTen = new AMC_RSS('http://www.filmcritic.com/misc/emporium.nsf/(RSSrecentreviews-AMC10)?OpenAgent&.xml', '10', 'latestReviewsFeed', 'latest-reviews');
var thisWeekDvd = new AMC_RSS('http://www.filmcritic.com/misc/emporium.nsf/(RSSrecentvideoreviews-AMC10)?OpenAgent&.xml', '10', 'thisWeekFeed', 'this-week-dvd');
});
