// This file contains all Get Inspired article data by category

/***************************************************
*********************** CLASSES ********************
****************************************************/

/* -------- Class Article -------- */
var Article = Class.create();

Article.prototype = {
  HOMEPAGE_ARTICLE_TAG_FORMAT: "cm_sp=THD_Marketing-_-Ideas_at_Home-_-homepage-_-{0}_issue_{1}",
  RIGHTNAV_ARTICLE_TAG_FORMAT: "cm_sp=THD_Marketing-_-Ideas_at_Home-_-right_navigation-_-{0}_issue_{1}",
  ARCHIVE_ARTICLE_TAG_FORMAT: "cm_sp=THD_Marketing-_-Ideas_at_Home-_-{0}_archive-_-issue_{1}",
  
  initialize: function(tabImageUrl, articleHed, articleDek, longDesc, articleUrl, rightNavDesc, slideShow) {
    this.tabImageUrl = tabImageUrl;
    this.articleHed = articleHed;
    this.articleDek = articleDek;
    this.longDesc = longDesc;
    this.articleUrl = articleUrl;
    this.rightNavDesc = rightNavDesc;
    this.slideShow = slideShow;
    this.category = null;
    this.issue = null;
  },
  
  articleLink: function() {
    with (this) 
      return articleUrl + "?" + String.format(HOMEPAGE_ARTICLE_TAG_FORMAT, category.tagName, issue);
  },
  
  archiveArticleLink: function() {
    with (this) 
      return articleUrl + "?" + String.format(ARCHIVE_ARTICLE_TAG_FORMAT, category.tagName, issue);
  },
  
  rightNavArticleLink: function() {
    with (this) 
      return "../" + articleUrl + "?" + String.format(RIGHTNAV_ARTICLE_TAG_FORMAT, category.tagName, issue);
  },
  
  currentArticleView: function() {
    with (this) {
      return String.format('<a href="{0}"><img class="primary" src="{1}" alt="{2}" /></a>'
		                          + '<p class="subhead">{2}</p>'
		                          + '<p class="copy">{3}</p>'
		                          + '<p class="copy"><a href="{0}" class="morelink" style="margin-left:0px;"><img src="images/graphics/readmore.gif" alt="Read More" style="padding-top:3px;"/></a></p>',
		                       articleLink(), tabImageUrl, articleHed, articleDek);
		  return html;
		}
  },
  
  archiveArticleView: function(lastArticleInRowCssClass) {
    with (this) {
      return String.format( '\n\t<div class="archiveArticle {4}">' +
                              '\n\t\t<a href="{0}">' +
                                '\n\t\t\t<img class="primary" src="{1}" alt="{2}" />' +
                              '\n\t\t</a>' +
		                          '\n\t\t<p class="subhead">{2}</p>' +
		                          '\n\t\t<p class="copy">{3}</p>' +
		                          '\n\t\t<p class="copy">' +
		                            '\n\t\t\t<a href="{0}" class="morelink" style="margin-left:0px;">' +
		                            '\n\t\t\t<img src="images/graphics/readmore.gif" alt="Read More"/></a>' +
		                          '\n\t\t</p>' +
		                        '\n\t</div>',
		                       archiveArticleLink(), tabImageUrl, articleHed, articleDek, lastArticleInRowCssClass);
		  return html;
		}
  },
  
  moreArticlesView: function() {
    with (this) {
      return String.format('<li><img class="littlearrow" src="images/graphics/icon_arrow_orange_small.gif" alt="&gt;" />'
                              + '<a href="{0}">{1}</a></li>',
                           articleLink(), longDesc);
    }
  },
  
  emailArticleLink: function() {
    with (this) {
      var emailText = String.format("mailto:?subject={0}"
                          + "&amp;body=Get Inspired at HomeDepot.com.\n\nThe article:\n{0}\n{1}\n"
                          + "has been sent to you by a friend. You can read the article online at: "
                          + "http://www6.homedepot.com/ideasathome/{4}?cm_sp=THD_Marketing-_-Ideas_at_Home-_-{2}_issue_{3}-_-email_article",
                           articleHed, articleDek, category.tagName, issue, articleUrl); 
        emailText = encodeURI(emailText);
        var emailLink = String.format("<a href='{0}'/>"
                          + "<img style='margin:10px 0;' src='../images/graphics/emailarticle.gif' alt='Email Article' /></a>"
                          , emailText);
        return emailLink;
    }
  },
  
    emailArticleLinkSpecific: function(hed, dek) {
    with (this) {
        var emailText = String.format("mailto:?subject={0}&amp;body=Get Inspired at HomeDepot.com.\n\nThe article:\n{0}\n{1}\n"
                          + "has been sent to you by a friend. You can read the article online at: "
                          + "http://www6.homedepot.com/ideasathome/{4}?cm_sp=THD_Marketing-_-Ideas_at_Home-_-{2}_issue_{3}-_-email_article",
                          hed, dek, category.tagName, issue, articleUrl);
        emailText = encodeURI(emailText);
        var emailLink = String.format("<a href='{0}'/>"
                          + "<img style='margin:10px 0;' src='../images/graphics/emailarticle.gif' alt='Email Article' /></a>"
                          , emailText);
        return emailLink;
        }
       },
  
  emailArticleLinkNew: function() {
    with (this) {
      var emailText = String.format("mailto:?subject={0}"
                          + "&amp;body=Get Inspired at HomeDepot.com.%0A%0AThe article:%0A{0}%0A{1}%0A"
                          + "has been sent to you by a friend. You can read the article online at: "
                          + "http://www6.homedepot.com/ideasathome/{4}?cm_sp=THD_Marketing-_-Ideas_at_Home-_-{2}_issue_{3}-_-email_article",
                           escape(articleHed), escape(articleDek), category.tagName, issue, articleUrl); 
        var emailLink = String.format("<a href='{0}'/>"
                          + "<img style='padding-left:10px;padding-right:10px;' src='../images/graphics/email.gif' alt='Email Article' /></a>"
                          , emailText);
        return emailLink;
    }
  },
  
  emailArticleLinkSpecificNew: function(hed, dek) {
    with (this) {
        var emailText = String.format("mailto:?subject={0}&amp;body=Get Inspired at HomeDepot.com.\n\nThe article:\n{0}\n{1}\n"
                          + "has been sent to you by a friend. You can read the article online at: "
                          + "http://www6.homedepot.com/ideasathome/{4}?cm_sp=THD_Marketing-_-Ideas_at_Home-_-{2}_issue_{3}-_-email_article",
                          hed, dek, category.tagName, issue, articleUrl);
        emailText = encodeURI(emailText);
        var emailLink = String.format("<a href='{0}'/>"
                          + "<img style='padding-left:10px;padding-right:10px;' src='../images/graphics/email.gif' alt='Email Article' /></a>"
                          , emailText);
        return emailLink;
        }
       }

};

/* -------- Class ArticleSlideShow -------- */
var ArticleSlideShow = Class.create();

ArticleSlideShow.prototype = {

  PREV_SLIDE_OFF: "<img src='../images/graphics/prev_page_flat_off.gif' alt='Previous Slide' />",
  PREV_SLIDE_ON: "<a href='#' onclick='showPrevSlide();return false;' class='prevSlideLink'><img src='../images/graphics/prev_page_flat_on.gif' alt='Previous Slide' /></a>",
  PREV_SLIDE: "<a href='#' onclick='showPrevSlide();return false;' class='prevSlideLink'><img src='../images/graphics/prev_page_flat_on.gif' alt='Previous Slide' /></a>",//"<div class='prevSlide'><img src='../images/graphics/prev_page_flat_off.gif' alt='Previous Slide' /></div>",
  NEXT_SLIDE_OFF: "<img src='../images/graphics/next_page_flat_off.gif' alt='Next Slide' />",
  NEXT_SLIDE_ON: "<a href='#' onclick='showNextSlide();return false;' class='nextSlideLink'><img src='../images/graphics/next_page_flat_on.gif' alt='Next Slide' /></a>",
  NEXT_SLIDE: "<div class='nextSlide'><a href='#' onclick='showNextSlide();return false;' class='nextSlideLink'><img src='../images/graphics/next_page_flat_on.gif' alt='Next Slide' /></a></div>",
  PAGE_NUM_INNER: "{0} OF {1}",
  PAGE_NUM: "<span class='pageNum'>{0} OF {1}</span>",
  VERTICAL_DIVIDER: "<img src='../images/graphics/short_vertical_divider.gif' alt='' class='verticalDivider' />",
  
  HERO_IMAGE: "<img id='slideShowHeroImg' src='{0}' alt='' />",
  HED: "<p id='slideShowHed'>{0}</p>",
  DEK: "<div id='slideShowDek'>{0}</div>",
  
  LARGER_IMAGE_LINK_OFF: "<img src='../images/graphics/larger_image_blank.gif' alt='Larger Image' />",
  LARGER_IMAGE_LINK_ON: "<a href='#' onclick='showLargerImg();return false;'><img src='../images/graphics/larger_image_on.gif' alt='Larger Image' /></a>",
  LARGER_IMAGE_LINK: "<div class='largerImgLink'>{0}</div>",
  LARGER_IMAGE: "<img id='largerImg' src='{0}' alt='' />",
  PREV_LARGER_IMG_OFF: "<img src='../images/graphics/prev_page_flat_off.gif' alt='Previous Image' />",
  PREV_LARGER_IMG_ON: "<a href='#' onclick='showPrevLargerImg();return false;' class='prevLargerImgLink'><img src='../images/graphics/prev_page_flat_on.gif' alt='Previous Image' /></a>",
  PREV_LARGER_IMG: "<div class='prevLargerImg'>{0}</div>",
  NEXT_LARGER_IMG_OFF: "<img src='../images/graphics/next_page_flat_off.gif' alt='Next Image' />",
  NEXT_LARGER_IMG_ON: "<a href='#' onclick='showNextLargerImg();return false;' class='nextLargerImgLink'><img src='../images/graphics/next_page_flat_on.gif' alt='Next Image' /></a>",
  NEXT_LARGER_IMG: "<div class='nextLargerImg'>{0}</a></div>",
  LARGER_IMG_CLOSE: "<a href='#' onclick='closeLargerImg();return false;'><img id='largerImgClose' src='../images/graphics/close.gif' alt='Close'/></a>",

  initialize: function() {
    this.slideShowItems = new Array();
    var SlideShowIndex = Get_Cookie('SlideShowIndex');
    if (SlideShowIndex == null)
    {
        SlideShowIndex = 0;  
    }
    this.activeSlideIndex = SlideShowIndex; // Removed: to keep track of slideShow state  0; 
    this.activeLargerImgIndex = 0;
  },
  
  addSlideShowItem: function(slideShowItem) {
    this.slideShowItems.push(slideShowItem);
  },
  
  generateHtml: function() {
    with (this) {
        var activeSlideIndex = Get_Cookie('SlideShowIndex');
        if (this.activeSlideIndex == null)
        {
            this.activeSlideIndex = 0;  
        }
            
      var currSlide = slideShowItems[activeSlideIndex];
      var html = generateNavMenu();
      html += String.format(HERO_IMAGE, currSlide.heroImg);
      html += generateNavMenu();
      html += String.format(HED, currSlide.hed);
      html += String.format(DEK, currSlide.dek);
      $('slideShowContainer').innerHTML = html;
      $('largerImgOverlay').innerHTML = generateLargerImageHtml();
    }
  },
  
  generateLargerImageHtml: function() {
    with (this) {
      var currSlide = slideShowItems[activeSlideIndex];
      var html = generateLargerImgNavMenu() + LARGER_IMG_CLOSE +
              String.format(LARGER_IMAGE, currSlide.largerImg) +
              generateLargerImgNavMenu();
      return html;
    }
  },
  
  generateNavMenu: function() {
    with (this) {
    
        var tmp = Get_Cookie('SlideShowIndex');
        if (tmp == null || tmp == '0')
        {
            tmp = 0;  
        }
        var SlideIndex = tmp*1;  // converting to a number so it's not concatenated as a string
        SlideIndex = SlideIndex+1;
        if ( SlideIndex >slideShowItems.length)
            slideShowItems.length=1
            
            
      var pageNumHtml = String.format(PAGE_NUM, SlideIndex, slideShowItems.length);
      var largerImgLink = "";
      if (slideShowItems[0].hasLargerImg())
        largerImgLink = String.format(LARGER_IMAGE_LINK, LARGER_IMAGE_LINK_ON);
      else
        largerImgLink = String.format(LARGER_IMAGE_LINK, LARGER_IMAGE_LINK_OFF);
      var html = "<div class='slideShowNav'>" +
                   PREV_SLIDE + VERTICAL_DIVIDER + pageNumHtml + VERTICAL_DIVIDER +
                   NEXT_SLIDE + VERTICAL_DIVIDER + largerImgLink +
                 "</div>";
      return html;
    }
  },
  generateLargerImgNavMenu: function() {
    with (this) {
        var SlideIndex = Get_Cookie('SlideShowIndex');
        if (SlideIndex == null)
        {
            SlideIndex = 0;  
        }
        SlideIndex = SlideIndex*1;
        SlideIndex = SlideIndex++;
      var pageNumHtml = String.format(PAGE_NUM, SlideIndex, slideShowItems.length);
      var nextLargerImgLink = "";
      if (getNextLargerImgIndex() > activeLargerImgIndex)
        nextLargerImgLink = String.format(NEXT_LARGER_IMG, NEXT_LARGER_IMG_ON);
      else
        nextLargerImgLink = String.format(NEXT_LARGER_IMG, NEXT_LARGER_IMG_OFF);
      var prevLargerImgLink = String.format(PREV_LARGER_IMG, PREV_LARGER_IMG_OFF);
      var html = "<div class='slideShowNav'>" +
                   PREV_LARGER_IMG + VERTICAL_DIVIDER + pageNumHtml +
                   VERTICAL_DIVIDER + nextLargerImgLink +
                 "</div>";
      return html;
    }
  },
  
  showNextSlide: function() {
    with (this) {
      incSlideShowIndex();
      updateActiveSlide();
    }
  },
  showPrevSlide: function() {
    with (this) {
      decSlideShowIndex();
      updateActiveSlide();
    }
  },
  
  updateActiveSlide: function() {
    with (this) {
        var tmp = Get_Cookie('SlideShowIndex');
        if (tmp == null)
        {
            tmp = 0;  
        }
        var SlideIndex = tmp*1;  // converting to a number so it's not concatenated as a string

      
      
      var currSlide = slideShowItems[SlideIndex];
      //Update navigation menu items
      var nextSlideDivs = document.getElementsByClassName("nextSlide", "slideShowContainer");
      nextSlideDivs.each(function(div) {
        //if (activeSlideIndex + 1 >= slideShowItems.length)
        //  div.innerHTML = NEXT_SLIDE_OFF;
        //else

          div.innerHTML = NEXT_SLIDE_ON;
      });
      var prevSlideDivs = document.getElementsByClassName("prevSlide", "slideShowContainer");
      prevSlideDivs.each(function(div) {
        //if (activeSlideIndex == 0)
        //  div.innerHTML = PREV_SLIDE_OFF;
        //else        
          div.innerHTML = PREV_SLIDE_ON;
      });
      var pageNums = document.getElementsByClassName("pageNum", "slideShowContainer");
      pageNums.each(function(element) {
        element.innerHTML = String.format(PAGE_NUM_INNER, SlideIndex + 1, slideShowItems.length);
      });
      var largerImgLinks = document.getElementsByClassName("largerImgLink", "slideShowContainer");
      largerImgLinks.each(function(element) {
        if (currSlide.hasLargerImg())
          element.innerHTML = String.format(LARGER_IMAGE_LINK, LARGER_IMAGE_LINK_ON);
        else
          element.innerHTML = String.format(LARGER_IMAGE_LINK, LARGER_IMAGE_LINK_OFF);
      });
      //Update Hed and Dek of next slide
      $('slideShowHeroImg').src = currSlide.heroImg;
      $('slideShowHed').innerHTML = currSlide.hed;
      $('slideShowDek').innerHTML = currSlide.dek;
    }
  },
  
  incSlideShowIndex: function() {
    with (this) {
        var tmp = Get_Cookie('SlideShowIndex');
        if (tmp == null)
        {
            tmp = 0;  
        }
        var SlideIndex = tmp*1;
      if (SlideIndex + 1 >= slideShowItems.length)
        SlideIndex = 0;
      else
        SlideIndex++;
      
      Set_Cookie('SlideShowIndex', SlideIndex, '', '/', '', '');
    }
  },
  decSlideShowIndex: function() {
    with (this) {
        var tmp = Get_Cookie('SlideShowIndex');
        if (tmp == null)
        {
            tmp = 0;  
        }
        var SlideIndex = tmp*1;      
        if (SlideIndex == 0)
        SlideIndex = slideShowItems.length - 1;
      else
        SlideIndex--;
      Set_Cookie('SlideShowIndex', SlideIndex, '', '/', '', '');        
    }
  },
  
  displayLargerImg: function() {
    with (this) {
      activeLargerImgIndex = activeSlideIndex;
      updateActiveLargerImg();
      $('largerImgOverlay').style.display = "block";
    }
  },
  
  showNextLargerImg: function() {
    with (this) {
      activeLargerImgIndex = getNextLargerImgIndex();
      updateActiveLargerImg();
    }
  },
  showPrevLargerImg: function() {
    with (this) {
      activeLargerImgIndex = getPrevLargerImgIndex();
      updateActiveLargerImg();
    }
  },
  
  updateActiveLargerImg: function() {
    with (this) {
      var nextLargerImgDivs = document.getElementsByClassName("nextLargerImg", "largerImgOverlay");
      nextLargerImgDivs.each(function(div) {
        if (getNextLargerImgIndex() > activeLargerImgIndex)
          div.innerHTML = NEXT_LARGER_IMG_ON;
        else
          div.innerHTML = NEXT_LARGER_IMG_OFF;
      });
      var prevLargerImgDivs = document.getElementsByClassName("prevLargerImg", "largerImgOverlay");
      prevLargerImgDivs.each(function(div) {
        if (getPrevLargerImgIndex() < activeLargerImgIndex)
          div.innerHTML = PREV_LARGER_IMG_ON;
        else
          div.innerHTML = PREV_LARGER_IMG_OFF;
      });
      var pageNums = document.getElementsByClassName("pageNum", "largerImgOverlay");
      pageNums.each(function(element) {
        element.innerHTML = String.format(PAGE_NUM_INNER, activeLargerImgIndex + 1, slideShowItems.length);
      });
      var currSlide = slideShowItems[activeLargerImgIndex];
      $('largerImg').src = currSlide.largerImg;
    }
  },

  getNextLargerImgIndex: function() {
    with (this) {
      var result = activeLargerImgIndex;
      if (result + 1 >= slideShowItems.length)
        result = 0;
      else
        result++;
      var currSlide = slideShowItems[result];
      while (!currSlide.hasLargerImg() && result != activeLargerImgIndex)
      {
        if (result + 1 >= slideShowItems.length)
          result = 0;
        else
          result++;
        currSlide = slideShowItems[result];
      }
      return result;
    }
  },
  getPrevLargerImgIndex: function() {
    with (this) {
      var result = activeLargerImgIndex;
      if (result == 0)
        result = slideShowItems.length - 1;
      else
        result--;
      var currSlide = slideShowItems[result];
      while (!currSlide.hasLargerImg() && result != activeLargerImgIndex)
      {
        if (result == 0)
          result = slideShowItems.length - 1;
        else
          result--;
        currSlide = slideShowItems[result];
      }
      return result;
    }
  }
  
};

/* -------- Class SlideShowItem -------- */
var ArticleSlideShowItem = Class.create();

ArticleSlideShowItem.prototype = {

  initialize: function(heroImg, largerImg, hed, dek) {
    this.heroImg = heroImg;
    this.largerImg = largerImg;
    this.hed = hed;
    this.dek = dek;
  },
  
  hasLargerImg: function() {
    return this.largerImg != "";
  }
};

/* -------- Class Category -------- */
var Category = Class.create();

Category.prototype = {

  HOMEPAGE_ARCHIVE_URL_FORMAT: "archive.html?category={0}&cm_sp=THD_Marketing-_-Ideas_at_Home-_-homepage-_-{1}_archive",
  RIGHTNAV_ARCHIVE_URL_FORMAT: "../archive.html?category={0}&cm_sp=THD_Marketing-_-Ideas_at_Home-_-right_navigation-_-{1}_archive",
  
  initialize: function(id, name, tagName, archiveLinkText, archiveTitle, landingpage) {
    this.id = id;
    this.name = name;
    this.tagName = tagName;
    this.archiveLinkText = archiveLinkText;
    this.archiveTitle = archiveTitle;
    this.landingpage = landingpage;
    this.articles = new Array();
  },
  
  addArticle: function(issue, article) {
    article.category = this;
    article.issue = issue;
    this.articles.push(article);
  },
  
  getArticle: function(issue) {
    for (var i = 0; i < this.articles.length; i++)
      if (this.articles[i].issue == issue)
        return this.articles[i];
    return null;
  },
  
  currentArticleHtml: function() {
    var currentArticle = this.articles[this.articles.length - 1];
    return currentArticle.currentArticleView();
  },
  
  moreArticlesHtml: function() {
    var html = '';
    for (var i = this.articles.length - 2; i >= Math.max(this.articles.length - 6, 0); i--) { // skip the current Article
      html += this.articles[i].moreArticlesView();
    }
    // add link to archive page
    if (this.articles.length > 6)
      html += String.format('<li><img class="littlearrow" src="images/graphics/icon_arrow_orange_small.gif" alt="" />'
                              + '<a href="{0}" style="color:#EE8B22;">{1}</a></li>',
                            this.homepageArchiveLink(), this.archiveLinkText);
                             
    return html;
  },
  
  homepageArchiveLink: function() {
    with(this)
      return String.format(HOMEPAGE_ARCHIVE_URL_FORMAT, id, tagName);
  },
  
  rightNavArchiveLink: function() {
    with(this)
      return String.format(RIGHTNAV_ARCHIVE_URL_FORMAT, id, tagName);
  }

};

/* -------- Class GetInspiredCategories -------- */
var GetInspiredCategories = Class.create();

GetInspiredCategories.prototype = {
  
  FEATURE_CAT_ID: 1,
  TRENDS_CAT_ID: 2,
  PRODUCT_INNOVATION_CAT_ID: 3,
  SMART_LIVING_CAT_ID: 4,
  
  initialize: function() {
    this.Feature = new Category(this.FEATURE_CAT_ID, "Feature", "feature", "See More Features", 
                                  "More Features", "feature/index.html");
    this.Trends = new Category(this.TRENDS_CAT_ID, "Trends to Watch", "trends", "See More Trends", 
                                  "More Trends to Watch", "trendstowatch/index.html");
    this.ProductInnovation = new Category(this.PRODUCT_INNOVATION_CAT_ID, "Product Innovation", "product_innovation", "See More Innovations", 
                                  "More Product Innovation", "productinnovation/index.html");
    this.SmartLiving = new Category(this.SMART_LIVING_CAT_ID, "Smart Living", "smart_living", "See More Smart Living", 
                                  "More Smart Living", "smartliving/index.html");
    this.categoryArray = new Array(this.Feature, this.Trends, this.ProductInnovation, this.SmartLiving);
  },
  
  getCategory: function(categoryId) {
    with (this) {
      switch(categoryId) {
        case FEATURE_CAT_ID:
          return Feature;
        case TRENDS_CAT_ID:
          return Trends;
        case PRODUCT_INNOVATION_CAT_ID:
          return ProductInnovation;
        case SMART_LIVING_CAT_ID:
          return SmartLiving;
      }
    }
  },
  
  rightNavMenuHtml: function(categoryId, issue) {
    var menuText = new Array();
	  var menuURL = new Array();
	  var menuString = '';
	  var subMenuInsert = categoryId;

	  menuText[0] = 'Back to Get Inspired';
	  menuURL[0] = '../index.html?cm_sp=THD_Marketing-_-Ideas_at_Home-_-right_navigation-_-home'+HomeDepot.linkParamsAppended;

	  menuText[1] = 'Feature';
	  menuURL[1] = '../feature/index.html?cm_sp=THD_Marketing-_-Ideas_at_Home-_-right_navigation-_-feature'+HomeDepot.linkParamsAppended;

	  menuText[2] = 'Trends to Watch';
	  menuURL[2] = '../trendstowatch/index.html?cm_sp=THD_Marketing-_-Ideas_at_Home-_-right_navigation-_-trends'+HomeDepot.linkParamsAppended;

	  menuText[3] = 'Product Innovation';
	  menuURL[3] = '../productinnovation/index.html?cm_sp=THD_Marketing-_-Ideas_at_Home-_-right_navigation-_-product_innovation'+HomeDepot.linkParamsAppended;

	  menuText[4] = 'Smart Living';
	  menuURL[4] = '../smartliving/index.html?cm_sp=THD_Marketing-_-Ideas_at_Home-_-right_navigation-_-smart_living'+HomeDepot.linkParamsAppended;

	  menuString += '<div id="rightnav">';
	  menuString += '<a href="../index.html?cm_sp=THD_Marketing-_-Ideas_at_Home-_-right_navigation-_-home'+HomeDepot.linkParamsAppended+'"><img style="margin-bottom:2px;" src="../images/headers/hdr_rightnav_getinspired.gif" alt="Get Inspired" /></a>';
	  menuString += '<ul id="navitems">';
	  for (i=0;i<=menuText.length-1;i++) {
		  var inStyle = '';
		  if (i==categoryId) {inStyle=' class="in"';}
		  var arrowcolor = i == categoryId ? 'grey' : 'orange';
		  inStyle=' onmouseover="rollOn(this,\'on\');" onmouseout="rollOn(this,\'\');"';
		  menuString += '<li'+inStyle+'><img src="../images/graphics/icon_arrow_'+arrowcolor+'_large.gif" alt="&gt;" /><a href="'+menuURL[i]+'">'+menuText[i]+'</a></li>';

		  if (i==subMenuInsert && subMenuInsert!=0) {
			  menuString += '<li style="text-indent:0;padding:0;background:#FFFFFF;"><ul id="subnavitems"></ul></li>';
		  }
	  }
	  menuString += '</ul>';
	  menuString += '</div>';
	  
	  return menuString;
  },
  
  rightNavSubmenuHtml: function(categoryId, issue) {
	  var submenuString = '';
	  var category = this.getCategory(categoryId);

	  for (i=category.articles.length-1;i>=Math.max(category.articles.length-6, 0);i--) {
		  var inStyle = '';
		  var linktext = '';
		  currArticle = category.articles[i];
		  if (currArticle.issue==issue) {
			  inStyle=' class="subin"';
			  linktext = currArticle.rightNavDesc;
		  } else {
			  linktext = '<a href="'+currArticle.rightNavArticleLink()+HomeDepot.linkParamsAppended+'">'+currArticle.rightNavDesc+'</a>';
		  }
		  submenuString += '<li'+inStyle+'>'+linktext+'</li>';
	  }
	  
	  // Add archives link
	  if (category.articles.length > 6)
	    submenuString += String.format('<li><a href="{0}" style="font:11px Arial;color:#EE8B22;text-decoration:none;">{1}</a></li>', 
	                                    category.rightNavArchiveLink(), category.archiveLinkText);
	    
    return submenuString;
  }
};

/* -------- Class HomepageFeaturesArchive -------- */
var HomepageFeaturesArchive = Class.create();

HomepageFeaturesArchive.prototype = {
  
  initialize: function() {
    this.FeaturesArray = new Array();
  },
  
  currentFeatureHtml: function(index) {
    with (this) {
      var currFeatureUrl = FeaturesArray[FeaturesArray.length - index];
      if (currFeatureUrl != null) {
        return getUrl(currFeatureUrl);
      }
      return null;
    }
  },
  
  arhiveIndexHtml: function(index) {
    var LIVE_LINK_FORMAT = '<a id="topsection_feature_{0}_link" href="javascript:writeHomepageFeature({0});"><img src="images/graphics/feature{0}.gif" /></a>';
    var DEAD_LINK_FORMAT = '<img src="images/graphics/feature{0}_on.gif" />';
    var indexHtml = '';
  
    for (var i = 1; i <= 6; i++) {
      if (i == index) {
        indexHtml += String.format(DEAD_LINK_FORMAT, i);
      } else {
        indexHtml += String.format(LIVE_LINK_FORMAT, i);
      }
    }
    return indexHtml;  
  }
};

/* -------- Class ArticleArchive -------- */
var ArticleArchive = Class.create();

ArticleArchive.prototype = {
  PAGE_SIZE: 12,
  
  initialize: function() {
  },
  
  archiveArticleHtml: function(currentCategory, pageNum) {
    var ARTICLES_PER_ROW = 4;
    var LAST_ARTICLE_IN_ROW_CSS_CLASS = 'lastArticleInRow';
    var resultHtml = '';
    
    var numArticles = currentCategory.articles.length;
    var articleRows = new Array();
    var start = numArticles - 1;
    var end = 0;
    if (pageNum != null) { // Page selected (i.e. do not show all articles)
      start -= this.PAGE_SIZE * (pageNum - 1)
      end = Math.max(start - this.PAGE_SIZE + 1, 0);
    }
    
    for (var i = start; i >= Math.max(end, 0); i--) { // iterating in reverse to get most recent articles first
      if ((numArticles - i) % ARTICLES_PER_ROW == 0)
        articleRows[numArticles-i-1] = currentCategory.articles[i].archiveArticleView(LAST_ARTICLE_IN_ROW_CSS_CLASS);
      else 
        articleRows[numArticles-i-1] = currentCategory.articles[i].archiveArticleView("");
    }

    // Group the articles into the number of articles required per row
    resultHtml += '<div class="archiveArticleRow">';
    var j = 0;
    while (articleRows[j] == null)
      j++;
    resultHtml += articleRows[j];
    for (j += 1; j < articleRows.length; j++) {
      if (j % ARTICLES_PER_ROW == 0) {
        resultHtml += '</div>';
        resultHtml += '<div class="archiveArticleRow">';
      }
      resultHtml += articleRows[j];
    }
    resultHtml += '</div>';
    
    return resultHtml;
  },
  
  numArchivePages: function(activeCategory) {
    return Math.ceil(activeCategory.articles.length/this.PAGE_SIZE);
  },
  
  navigationHtml: function(allCategories, activeCategory, pageNum, pageIndexChangeFunctionName) {
    with (this) {
      var archivePagesWrapper = '<div id="archivePages">';
      var delimiter = '<span class="delimiter">|</span>';
      var html = archiveCategoryLinkHtml(allCategories, activeCategory);
      if (numArchivePages(activeCategory) > 1) {// more than one page, show page and show all
        if (pageNum == null) // Show All selected
          html += archivePagesWrapper + '<span>' + showAllHtml(pageIndexChangeFunctionName, pageNum) + '</span></div>';
        else
          html += archivePagesWrapper + pagerHtml(activeCategory, pageNum, pageIndexChangeFunctionName) 
                    + '<span>' + delimiter + showAllHtml(pageIndexChangeFunctionName, pageNum) + '</span></div>';
      }
      return html;
    }
  },
  
  archiveCategoryLinkHtml: function(allCategories, activeCategory) {
    var CATEGORY_ARCHIVE_LIVE_LINK_FORMAT = '<a href="archive.html?category={0}&cm_sp=THD_Marketing-_-Ideas_at_Home-_-{1}_archive-_-{2}_archive">{3}</a>';
    var CATEGORY_ARCHIVE_DEAD_LINK_FORMAT = '{0}';
    var delimitor = '';
    var html = '<div id="archiveCatTitles">';
    for (var i = 0; i < allCategories.categoryArray.length; i++) {
      var currentCategory = allCategories.categoryArray[i];
      if (currentCategory.id == activeCategory.id)
        html += delimitor + String.format(CATEGORY_ARCHIVE_DEAD_LINK_FORMAT, currentCategory.name.toUpperCase());
      else
        html += delimitor + String.format(CATEGORY_ARCHIVE_LIVE_LINK_FORMAT, 
                                          currentCategory.id, activeCategory.tagName, currentCategory.tagName, 
                                          currentCategory.name.toUpperCase());
      delimitor = '<span class="delimiter">|</span>';
    }
    html += "</div>";
    return html;
  },
  
  pagerHtml: function(activeCategory, pageNum, pageIndexChangeFunctionName) {
    var PAGER_FORMAT = '{0} <span>PAGE {1} OF {2}</span> {3}';
    var PREV_LIVE_URL_FORMAT = '<a href="javascript:{0}({1});"><img src="images/graphics/prev_page_live.gif" alt="Previous page"/></a>';
    var PREV_DEAD_URL = '<img src="images/graphics/prev_page_dead.gif" alt="Previous page"/>';
    var NEXT_LIVE_URL_FORMAT = '<a href="javascript:{0}({1});"><img src="images/graphics/next_page_live.gif" alt="Next page"/></a>';
    var NEXT_DEAD_URL = '<img src="images/graphics/next_page_dead.gif" alt="Next page"/>';
    var numPages = this.numArchivePages(activeCategory);
    
    var prevHtml = String.format(PREV_LIVE_URL_FORMAT, pageIndexChangeFunctionName, pageNum-1);
    var nextHtml = String.format(NEXT_LIVE_URL_FORMAT, pageIndexChangeFunctionName, pageNum+1);
    if (pageNum == 1) // first page, disable prev
      prevHtml = PREV_DEAD_URL;
    if (pageNum == numPages) // last page, disable next
      nextHtml = NEXT_DEAD_URL;
      
    return String.format(PAGER_FORMAT, prevHtml, pageNum, numPages, nextHtml);
  },
  
  showAllHtml: function(pageIndexChangeFunctionName, pageNum) {
    var SHOW_ALL_URL_FORMAT = '<a href="javascript:{0}({1});">{2}</a>';
    var linkText = "SHOW ALL";
    var newPageNum = '';
    if (pageNum == null) { // Show All selected
      linkText = "SHOW MOST RECENT";
      newPageNum = 1;
    }
    return String.format(SHOW_ALL_URL_FORMAT, pageIndexChangeFunctionName, newPageNum, linkText);
  }
};


/***************************************************
*********************** GLOBALS ********************
****************************************************/
var GetInspired = new GetInspiredCategories();
var HomepageArchive = new HomepageFeaturesArchive();
var Archive = new ArticleArchive(GetInspired);


/***************************************************
*********************** DATA ***********************
****************************************************/

/* ------- Homepage Archive Data ------- */
HomepageArchive.FeaturesArray[10] = "home/issue10.html";
HomepageArchive.FeaturesArray[11] = "home/issue11.html";
HomepageArchive.FeaturesArray[12] = "home/issue13.html";
HomepageArchive.FeaturesArray[13] = "home/issue14.html";
HomepageArchive.FeaturesArray[14] = "home/issue16.html";
HomepageArchive.FeaturesArray[15] = "home/issue17.html";
HomepageArchive.FeaturesArray[16] = "home/issue18.html";
HomepageArchive.FeaturesArray[17] = "home/issue19.html";
HomepageArchive.FeaturesArray[18] = "home/issue20.html";
HomepageArchive.FeaturesArray[19] = "home/issue21.html";
HomepageArchive.FeaturesArray[20] = "home/issue22.html";
HomepageArchive.FeaturesArray[21] = "home/issue23.html";
HomepageArchive.FeaturesArray[22] = "home/issue24.html";
HomepageArchive.FeaturesArray[23] = "home/issue25.html";
HomepageArchive.FeaturesArray[24] = "home/issue26.html";
HomepageArchive.FeaturesArray[25] = "home/issue27.html";
HomepageArchive.FeaturesArray[26] = "home/issue28.html";
HomepageArchive.FeaturesArray[27] = "home/issue29.html";
HomepageArchive.FeaturesArray[28] = "home/issue30.html";
HomepageArchive.FeaturesArray[29] = "home/issue31.html";
HomepageArchive.FeaturesArray[30] = "home/issue32.html";
HomepageArchive.FeaturesArray[31] = "home/issue33.html";
HomepageArchive.FeaturesArray[32] = "home/issue34.html";

/* ------- Article Data ------- */

// Feature
GetInspired.Feature.addArticle(1, new Article("images/tabs/tab_feature.jpg", // tabImageUrl
                                       "Creating Your Outdoor Oasis", // articleHed
                                       "How to use indoor décor inspiration outdoors", // articleDek
                                       "Creating Your Outdoor Oasis", // longDesc
                                       "feature/issue1.html", // articleUrl
                                       "Creating Your Outdoor Oasis") // rightNavDesc)
                              );
GetInspired.Feature.addArticle(2, new Article("images/tabs/tab_grill.jpg", // tabImageUrl
                                       "The Thrill of the Grill", // articleHed
                                       "How to be the best backyard chef you can be", // articleDek
                                       "Your Guide to Great Grilling", // longDesc
                                       "feature/issue2.html", // articleUrl
                                       "Your Guide to Great Grilling") // rightNavDesc)
                              );
GetInspired.Feature.addArticle(4, new Article("images/tabs/tab_boldpaint.jpg", // tabImageUrl
                                       "Boldly Go", // articleHed
                                       "Hot hues in paint are making a comeback", // articleDek
                                       "Bold Paint Colors Make a Comeback", // longDesc
                                       "feature/issue4.html", // articleUrl
                                       "Bold Paint Colors Make a Comeback") // rightNavDesc)
                              );
GetInspired.Feature.addArticle(5, new Article("images/tabs/tab_gardenprune.jpg", // tabImageUrl
                                       "Midsummer Garden Tune-Up", // articleHed
                                       "Great ways to give your garden a mid-season boost", // articleDek
                                       "A Mid-Summer Garden Tune-Up Guide", // longDesc
                                       "feature/issue5.html", // articleUrl
                                       "A Mid-Summer Garden Tune-Up Guide") // rightNavDesc)
                              );
GetInspired.Feature.addArticle(7, new Article("images/tabs/tab_kitchen2.gif", // tabImageUrl
                                       "Kitchen Comebacks", // articleHed
                                       "The latest news in kitchen design gives a nod to colorful nostalgia", // articleDek
                                       "The Latest Kitchen Trend is a Colorful Classic", // longDesc
                                       "feature/issue7.html", // articleUrl
                                       "The Latest Kitchen Trend is a Colorful Classic") // rightNavDesc)
                              );
GetInspired.Feature.addArticle(9, new Article("images/tabs/tab_cleanup.gif", // tabImageUrl
                                       "Fall In!", // articleHed
                                       "Get your garden ready for fall", // articleDek
                                       "Get Your Garden Ready for Fall", // longDesc
                                       "feature/issue9.html", // articleUrl
                                       "Get Your Garden Ready for Fall") // rightNavDesc)
                              );
GetInspired.Feature.addArticle(10, new Article("images/tabs/tab_tooltime.gif", // tabImageUrl
                                       "Tool Time", // articleHed
                                       "Update Your Toolbox and get tuned in to the latest DIY helpers", // articleDek
                                       "Update Your Tool Box", // longDesc
                                       "feature/issue10.html", // articleUrl
                                       "Tool Time - Get Tuned in to the Latest DIY Helpers") // rightNavDesc)
                              );
GetInspired.Feature.addArticle('12d', new Article("images/tabs/tab_holidaystyle12d.jpg", // tabImageUrl
                                       "Fine Dining", // articleHed
                                       "10 easy ways to glam up your dining room", // articleDek
                                       "Get your dining room ready for a festive feast", // longDesc
                                       "feature/issue12d.html", // articleUrl
                                       "Holiday Style – Dining Room") // rightNavDesc)
                              );
                             
GetInspired.Feature.addArticle(17, new Article("images/tabs/tab_guiding_light.jpg", // tabImageUrl
                                       "Guiding Light", // articleHed
                                       "Choose the right lighting for every room in your house", // articleDek
                                       "Choose the right lighting for every room in your house", // longDesc
                                       "feature/issue17.html", // articleUrl
                                       "Choose the right lighting for every room in your house") // rightNavDesc)
                              );   

GetInspired.Feature.addArticle(19, new Article("images/tabs/tab_sweet_dreams.jpg", // tabImageUrl
                                       "Sweet Dreams", // articleHed
                                       "Makeover ideas for a rejuvenating master bedroom", // articleDek
                                       "Makeover ideas for a rejuvenating master bedroom", // longDesc
                                       "feature/issue19.html", // articleUrl
                                       "Makeover ideas for a restful master bedroom") // rightNavDesc)
                              );   
                                                                                                                     

GetInspired.Feature.addArticle(20, new Article("images/tabs/tab_kidding_around.jpg", // tabImageUrl
                                       "Kidding Around", // articleHed
                                       "Create a family-friendly space for everyone to enjoy", // articleDek
                                       "Create a family-friendly space for everyone to enjoy", // longDesc
                                       "feature/issue20.html", // articleUrl
                                       "Create a family-friendly space for everyone to enjoy") // rightNavDesc)
                              );

GetInspired.Feature.addArticle(21, new Article("images/tabs/tab_welcome_spring.jpg", // tabImageUrl
                                       "Welcome Spring", // articleHed
                                       "Décor updates that will transform your home this season", // articleDek
                                       "Décor updates that will transform your home this season", // longDesc
                                       "feature/issue21.html", // articleUrl
                                       "Décor updates that will transform your home this season") // rightNavDesc)
                              );

GetInspired.Feature.addArticle(22, new Article("images/tabs/tab_double-duty_dining_rooms.jpg", // tabImageUrl
                                       "Double-Duty Dining Rooms", // articleHed
                                       "Turn your dining room into a multi-tasking space", // articleDek
                                       "Turn your dining room into a multi-tasking space", // longDesc
                                       "feature/issue22.html", // articleUrl
                                       "Turn your dining room into a multi-tasking space") // rightNavDesc)
                              );

GetInspired.Feature.addArticle(23, new Article("images/tabs/tab_better_your_basement.jpg", // tabImageUrl
                                       "Better Your Basement", // articleHed
                                       "Take your basement from basic to brilliant with these easy fix-ups", // articleDek
                                       "Take your basement from basic to brilliant with these easy fix-ups", // longDesc
                                       "feature/issue23.html", // articleUrl
                                       "Take your basement from basic to brilliant with these easy fix-ups") // rightNavDesc)
                              );

GetInspired.Feature.addArticle(24, new Article("images/tabs/tab_it_s_easy_being_green.jpg", // tabImageUrl
                                       "It's Easy Being Green", // articleHed
                                       "Ease up on the environment by keeping waste to a minimum", // articleDek
                                       "Ease up on the environment by keeping waste to a minimum", // longDesc
                                       "feature/issue24.html", // articleUrl
                                       "Ease up on the environment by keeping waste to a minimum") // rightNavDesc)
                              );

GetInspired.Feature.addArticle(25, new Article("images/tabs/tab_give_mom_a_break.jpg", // tabImageUrl
                                       "Give Mom a Break", // articleHed
                                       "Make this a Mother's Day to remember with a special project", // articleDek
                                       "Make this a Mother's Day to remember with a special project", // longDesc
                                       "feature/issue25.html", // articleUrl
                                       "Make this a Mother's Day to remember with a special project") // rightNavDesc)
                              );

GetInspired.Feature.addArticle(26, new Article("images/tabs/tab_it's_time_to_plant.jpg", // tabImageUrl
                                       "It's Time to Plant", // articleHed
                                       "Create a dazzling garden by combining annuals and perennials", // articleDek
                                       "Create a dazzling garden by combining annuals and perennials", // longDesc
                                       "feature/issue26.html", // articleUrl
                                       "Create a dazzling garden by combining annuals and perennials") // rightNavDesc)
                              );

GetInspired.Feature.addArticle(27, new Article("images/tabs/tab_play_it_safe_outside.jpg", // tabImageUrl
                                       "Play it Safe Outside", // articleHed
                                       "Make outdoor safety a priority for your family this summer", // articleDek
                                       "Make outdoor safety a priority for your family this summer", // longDesc
                                       "feature/issue27.html", // articleUrl
                                       "Make outdoor safety a priority for your family this summer") // rightNavDesc)
                              );

GetInspired.Feature.addArticle(28, new Article("images/tabs/tab_on_the_move.jpg", // tabImageUrl
                                       "On the Move", // articleHed
                                       "Get your home sale-ready and plan your packing ahead of time", // articleDek
                                       "Get your home sale-ready and plan your packing ahead of time", // longDesc
                                       "feature/issue28.html", // articleUrl
                                       "Get your home sale-ready and plan your packing ahead of time") // rightNavDesc)
                              );
GetInspired.Feature.addArticle(29, new Article("images/tabs/tab_foyerstretch.gif", // tabImageUrl
                                             "Get Set for Back to School", // articleHed
                                             "Tackle the busy back-to-school season and get organized", // articleDek
                                             "Tackle the busy back-to-school season and get organized", // longDesc
                                             "feature/issue29.html", // articleUrl
                                             "Get Set for Back to School") // rightNavDesc)
                                  );
GetInspired.Feature.addArticle(30, new Article("images/tabs/tab_americanpastime.jpg", // tabImageUrl
                                       "All-American Pastime", // articleHed
                                       "How to score a touchdown at your next tailgate party", // articleDek
                                       "Learn how to tailgate in style", // longDesc
                                       "feature/issue30.html", // articleUrl
                                       "Learn how to tailgate in style") // rightNavDesc)
                              );
GetInspired.Feature.addArticle(31, new Article("images/tabs/tab_getfiresmart.jpg", // tabImageUrl
                                             "Get Fire Smart", // articleHed
                                             "Make your home safe for National Fire Safety Month", // articleDek
                                             "Make your home safe for National Fire Safety Month", // longDesc
                                             "feature/issue31.html", // articleUrl
                                             "Get Fire Smart &ndash; Make Your Home Safe") // rightNavDesc)
                                  );
GetInspired.Feature.addArticle(32, new Article("images/tabs/tab_holidaystyle12e.jpg", // tabImageUrl
                                       "Warm Welcome", // articleHed
                                       "Greet guests with an inviting and stylish first impression", // articleDek
                                       "Greet guests with an inviting and stylish first impression", // longDesc
                                       "feature/issue32.html", // articleUrl
                                       "Greet guests with an inviting and stylish first impression") // rightNavDesc)
                                    );
GetInspired.Feature.addArticle(33, new Article("images/tabs/tab_familyfriendlykitchens_33.jpg", // tabImageUrl
                                       "All in the Family", // articleHed
                                       "Turn the hub of the house into a multitasking space", // articleDek
                                       "Turn the hub of the house into a multitasking space", // longDesc
                                       "feature/issue33.html", // articleUrl
                                       "Make your kitchen family friendly") // rightNavDesc)
                              );   
GetInspired.Feature.addArticle(34, new Article("images/tabs/tab_resolutionready.jpg", // tabImageUrl
                                       "Resolution Ready", // articleHed
                                       "Tackle these simple fix-ups and start the New Year right", // articleDek
                                       "Tackle these simple fix-ups and start the New Year right", // longDesc
                                       "feature/index.html", // articleUrl
                                       "New Year’s resolutions you’ll want to make") // rightNavDesc)
                              );   




// Trends to Watch

GetInspired.Trends.addArticle(2, new Article("images/tabs/tab_tub.jpg", // tabImageUrl
                                        "Splish Splash", // articleHed
                                        "Bathrooms are the home’s new sanctuary", // articleDek
                                        "The Latest in Bath Trends", // longDesc
                                        "trendstowatch/issue2.html", // articleUrl
                                        "The Latest in Bath Trends") // rightNavDesc)
                               );
GetInspired.Trends.addArticle(3, new Article("images/tabs/tab_kitchen.jpg", // tabImageUrl
                                        "What’s Cooking?", // articleHed
                                        "The hottest trends in kitchens work with the way we live today", // articleDek
                                        "The Top 5 Kitchen Trends", // longDesc
                                        "trendstowatch/issue3.html", // articleUrl
                                        "The Top 5 Kitchen Trends") // rightNavDesc)
                               );
GetInspired.Trends.addArticle(4, new Article("images/tabs/tab_ceilingfans.jpg", // tabImageUrl
                                        "It’s a Breeze", // articleHed
                                        "Keeping your cool at home with the latest designs in fans", // articleDek
                                        "Fans - Keeping Your Cool at Home", // longDesc
                                        "trendstowatch/issue4.html", // articleUrl
                                        "Fans - Keeping Your Cool at Home") // rightNavDesc)
                               );
GetInspired.Trends.addArticle(5, new Article("images/tabs/tab_slippers.jpg", // tabImageUrl
                                        "Your At-Home Resort", // articleHed
                                        "Looking to get away? Look no further than your own backyard", // articleDek
                                        "Creating Your Resort at Home", // longDesc
                                        "trendstowatch/issue5.html", // articleUrl
                                        "Creating Your Resort at Home") // rightNavDesc)
                               );
GetInspired.Trends.addArticle(6, new Article("images/tabs/tab_fans.jpg", // tabImageUrl
                                        "Beat the Heat in Eco-Style", // articleHed
                                        "Try these earth-friendly ways to chill out", // articleDek
                                        "Eco-Friendly Ways to Beat the Heat", // longDesc
                                        "trendstowatch/issue6.html", // articleUrl
                                        "Eco-Friendly Ways to Beat the Heat") // rightNavDesc)
                               );
GetInspired.Trends.addArticle(7, new Article("images/tabs/tab_counters.gif", // tabImageUrl
                                        "Multiple-Personality Kitchens", // articleHed
                                        "Cabinetry and countertops are mixing it up", // articleDek
                                        "Mixing up Materials in Your Custom Kitchen", // longDesc
                                        "trendstowatch/issue7.html", // articleUrl
                                        "Mixing up Materials in Your Custom Kitchen") // rightNavDesc)
                               );
GetInspired.Trends.addArticle(9, new Article("images/tabs/tab_classicgaragedoor.jpg", // tabImageUrl
                                       "Front and Center", // articleHed
                                       "The latest garage door trends have an old-fashioned appeal", // articleDek
                                       "The latest garage door trends have an old-fashioned appeal", // longDesc
                                       "trendstowatch/issue9.html", // articleUrl
                                       "The Latest Garage Door Trends Have an Old-Fashioned Appeal") // rightNavDesc)
                              );    
//GetInspired.Trends.addArticle(10, new Article("images/tabs/tab_flooring.gif", // tabImageUrl
//                                       "Under Foot", // articleHed
//                                       "Trends in flooring have taken a lifestyle turn with ease and endless choices", // articleDek
//                                       "New trends in flooring", // longDesc
//                                       "trendstowatch/issue10.html", // articleUrl
//                                       "New trends in flooring") // rightNavDesc)
//                              );
GetInspired.Trends.addArticle(13, new Article("images/tabs/tab_winterwarmup.jpg", // tabImageUrl
                                       "Winter Warm-Up", // articleHed
                                       "The season’s coziest<br />décor trends", // articleDek
                                       "The season’s coziest<br />décor trends", // longDesc
                                       "trendstowatch/issue13.html", // articleUrl
                                       "Winter’s coziest trends") // rightNavDesc)
                              );
/*var trendsSlideShow14 = new ArticleSlideShow();
trendsSlideShow14.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_circularsaw.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "The DIYer", // hed
                                       "<a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100012830&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100012830'>RIDGID 7 1/4 in. Circular Saw</a>: For the serious DIYer, this heavy-duty tool features guides for better accuracy, cuts angles and lightweight blades.<Br /><a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100596872&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100596872'>Makita 18V Compact 2-Piece Combo Kit</a>: Makita has taken its lithium-ion cordless tool series and made it even better. This two-piece drill kit gives you the best power-to-weight ratio of any compact driver-drill or impact driver on the market. Plus, you'll get two times more work over the life of the battery thanks to lithium-ion's increased charge cycle.") // dek
                              );
trendsSlideShow14.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_remote.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "The High-Tech Enthusiast", // hed
                                       "<a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100591161&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100591161'>Logitech Advanced Universal Remote</a>: Make life more convenient and let them control their home entertainment universe with the touch of a button.<br /><a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100597177&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100597177'>Black & Decker Power to Go</a>: Give your loved ones the power to stay connected all the time with this cordless AC/USB power supply/recharger.") // dek
                              );
trendsSlideShow14.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_grill.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "The Entertainer", // hed
                                       "<a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100497240&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100497240'>Fiesta Stainless Steel 3-Burner Grill</a>: This electric grill is ready to party with a built-in ice bucket, condiment tray and storage bin, plus an interior grill light to get cooking after dark.<br /><a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100013366&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100013366'>Pegasus Dual Sunflower Showerhead</a>: Their bathroom will never be the same with the ultimate in rain-shower experiences, in high-gloss polished chrome.") // dek
                              );
trendsSlideShow14.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_inflator.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "The One Who Has Everything", // hed
                                       "<a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100497865&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100497865'>Black & Decker Air Station Portable Inflator</a>: This handy, self-adjusting tool instantly inflates everything from tires to air mattresses – just plug it in.<br /><a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100520313&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100520313'>Tricod Digital Photo Frame</a>: Let them relive happy memories, create a personal slide show and play videos to their own soundtrack.") // dek
                              );
trendsSlideShow14.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_leafblower.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "The Outdoor Enthusiast", // hed
                                       "<a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100530552&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100530552'>Toro Electric Ultra Leaf Blower</a>: They’ll make short work of yard-duty chores with this handheld mulcher, blower and vacuum all in one.<br /><a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100491620&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100491620'>Dual 3-Way Indoor/Outdoor Speakers</a>: Give them the gift of music – outdoors – with clear, weatherproof sound.") // dek
                              );
trendsSlideShow14.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_rug.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "The Sports Fan", // hed
                                       "<a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=navigation&id=a75f17d3-de18-45b1-85aa-4e9ef62155b9&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-College_Football_Rug'>College Football Rug</a>: Help them cheer on their favorite team and decorate their room with the home field area rug – complete with end zones and team logo.<br /><a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100588901&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_14-_-100588901'>Panasonic Ultra Mini Camcorder</a>: This super-compact digital video recorder, with 32x optical zoom, will help them capture and replay all the action.") // dek
                              );                                                            
GetInspired.Trends.addArticle(14, new Article("images/tabs/tab_makingalist.jpg", // tabImageUrl
                                       "Making a List", // articleHed
                                       "Great gift ideas for every personality", // articleDek
                                       "Great gift ideas for every personality", // longDesc
                                       "trendstowatch/issue14.html", // articleUrl
                                       "Great Gift Ideas for Every Personality", // rightNavDesc
                                       trendsSlideShow14)
                              ); 
*/
//GetInspired.Trends.addArticle(15, new Article("images/tabs/tab_health.jpg", // tabImageUrl
//                                       "To Your Health", // articleHed
//                                       "Smart solutions for making your home a healthier place", // articleDek
//                                       "Smart solutions for making your home a healthier place", // longDesc
//                                       "trendstowatch/issue15.html", // articleUrl
//                                       "Make Your Home a Healthier Place") // rightNavDesc)
                              //);        
GetInspired.Trends.addArticle(17, new Article("images/tabs/tab_brightside.jpg", // tabImageUrl
                                       "The Bright Side", // articleHed
                                       "Simple decor tricks to help you beat the winter blues", // articleDek
                                       "Simple decor tricks to help you beat the winter blues", // longDesc
                                       "trendstowatch/issue17.html", // articleUrl
                                       "Simple décor tricks to help you beat the winter blah") // rightNavDesc)
                              );                                

GetInspired.Trends.addArticle(18, new Article("images/tabs/tab_bathroomhaven.jpg", // tabImageUrl
                                       "Bathroom Haven", // articleHed
                                       "The hottest bathroom trends for 2009", // articleDek
                                       "The hottest bathroom trends for 2009", // longDesc
                                       "trendstowatch/issue18.html", // articleUrl
                                       "The hottest bathroom trends for 2009") // rightNavDesc)
                              );                                


GetInspired.Trends.addArticle(19, new Article("images/tabs/tab_getrichquick.jpg", // tabImageUrl
                                       "Get Rich Quick", // articleHed
                                       "Tips and tricks for painting with rich colors", // articleDek
                                       "Tips and tricks for painting with rich colors", // longDesc
                                       "trendstowatch/issue19.html", // articleUrl
                                       "Tips and tricks for painting with rich colors") // rightNavDesc)
                              );                                

/* TRENDS - Patio Panache */
var trendsSlideShow20 = new ArticleSlideShow();
trendsSlideShow20.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_nature_chairs.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "At One with Nature", // hed
                                       "With its relaxed and rustic look and feel, the <a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=keyword&id=nature%20retreat&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_20-_-BrightSide'>Nature's Retreat</a> collection by Thomasville lends an air of calm to any backyard. The chairs are made from FSC-certified eucalyptus wood frames with all-weather wicker, while the wood table top is rounded out with decorative turned table legs.") // dek
                              );
trendsSlideShow20.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_veranda_deck.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Long-Lasting Beauty", // hed
                                       "Eliminate the need to waterproof, re-stain or replace rotted deck boards ever again. New Veranda composite decking and railing is a strong and durable alternative to traditional wood decks. Available exclusively at The Home Depot, <a href='http://www.verandadeck.com/' target='_blank'>Veranda</a> decking cuts and fastens like regular wood and comes in natural-looking shades.") // dek
                              );
trendsSlideShow20.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_seat_cushion.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Sleek and Contemporary", // hed
                                       "Framed with rust-proof aluminum and coated slate patina, the <a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=keyword&id=Summer%20Silhouette&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_20-_-BrightSide'>Summer Silhouette</a> collection by Thomasville exudes both luxury and comfort. The stylish chair cushions and pillows are both reversible and weather-resistant.") // dek
                              );
trendsSlideShow20.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_stone_patio.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Beauty From the Ground Up", // hed
                                       "Take a walkway, path or patio from boring to stunning with new Natural Stone Landscape. This do-it-yourself paver system comes pre-mounted, allowing for simple installation.") // dek
                              );
trendsSlideShow20.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_patio_set.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Entertain on a Grand Scale", // hed
                                       "The <a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=keyword&id=Tobago&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_20-_-BrightSide'>Tobago</a> collection features a generously-sized table, perfect for hosting a crowd. Plush chair cushions offer the ultimate comfort and are constructed of 100% Marquesa fabric, known for its stain-resistant properties. A durable, rustproof aluminum finish and a table top with inlaid cast tiles complete the ornate design.") // dek
                              );
trendsSlideShow20.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_planters.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Add Some Green", // hed
                                       "<a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=commerce&id=Planters&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_20-_-Planters'>Planters, urns and window boxes</a> can spruce up any patio. Smaller containers filled with cheerful annuals add a splash of color to an otherwise empty spot, while larger containers planted with small evergreens or trellises of ivy can help create privacy or shade.  ") // dek
                              );  
                              
trendsSlideShow20.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_seating.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Affordable Luxury", // hed
                                       "Featuring a comfortable deep-seating design, the Santa Rosa collection by <a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100599013&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_20-_-Hampton_Bay'>Hampton Bay</a> provides the ultimate sanctuary on a summer day. Available exclusively to The Home Depot, you'll love bringing home this high-end look for less.") // dek
                              ); 
                              
trendsSlideShow20.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_heating.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Stay Toasty", // hed
                                       "Extend the use of your patio from spring through to fall with the help of outdoor heating devices. From <a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=navigation&id=2e2d0f93-3d1a-4744-944b-59077609ec3b&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends_to_Watch-_-Issue_20-_-Fire_Pits_Patio_Heaters'>electric patio heaters to outdoor fireplaces and chimeneas</a>, you'll stay warm and cozy even when there's a nip in the air.") // dek
                              );                                                           

GetInspired.Trends.addArticle(21, new Article("images/tabs/tab_the_silver_screen_comes_home.jpg", // tabImageUrl
                                       "VIP Theater", // articleHed
                                       "Learn how to transform your 'TV room' into a home theater", // articleDek
                                       "Learn how to transform your 'TV room' into a home theater", // longDesc
                                       "trendstowatch/issue21.html", // articleUrl
                                       "Learn how to transform your 'TV room' into a home theater") // rightNavDesc)
                              );

GetInspired.Trends.addArticle(22, new Article("images/tabs/tab_island_living.jpg", // tabImageUrl
                                       "Island Living", // articleHed
                                       "A versatile and stylish island is a stellar kitchen feature", // articleDek
                                       "A versatile and stylish island is a stellar kitchen feature", // longDesc
                                       "trendstowatch/issue22.html", // articleUrl
                                       "A versatile and stylish island is a stellar kitchen feature") // rightNavDesc)
                              ); 
GetInspired.Trends.addArticle(23, new Article("images/tabs/tab_flooring.gif", // tabImageUrl
                                       "Under Foot", // articleHed
                                       "Find flooring choices for every room of your home", // articleDek
                                       "New trends in flooring", // longDesc
                                       "trendstowatch/issue23.html", // articleUrl
                                       "New trends in flooring") // rightNavDesc)
                              );
                              
GetInspired.Trends.addArticle(24, new Article("images/tabs/tab_health_24.jpg", // tabImageUrl
                                       "To Your Health", // articleHed
                                       "Make your home a healthier and more welcoming place", // articleDek
                                       "Make your home a healthier and more welcoming place", // longDesc
                                       "trendstowatch/issue24.html", // articleUrl
                                       "Make Your Home a Healthier Place") // rightNavDesc)
                              );

GetInspired.Trends.addArticle(25, new Article("images/tabs/tab_patio_panache_25.jpg", // tabImageUrl
                                       "Patio Panache", // articleHed
                                       "Entertain and kick back in style with the latest patio trends", // articleDek
                                       "Entertain and kick back in style with the latest patio trends", // longDesc
                                       "trendstowatch/issue20.html", // articleUrl
                                       "Entertain and kick back in style with the latest patio trends", // rightNavDesc
									   trendsSlideShow20)
                              );

GetInspired.Trends.addArticle(26, new Article("images/tabs/tab_dressed_to_impress.jpg", // tabImageUrl
                                       "Dressed to Impress", // articleHed
                                       "Give neglected windows an update with stylish coverings", // articleDek
                                       "Give neglected windows a new look with stylish coverings to suit any taste and budget", // longDesc
                                       "trendstowatch/issue26.html", // articleUrl
                                       "Give neglected windows a new look with stylish coverings to suit any taste and budget") // rightNavDesc)
                              );
							  
var trendsSlideShow27 = new ArticleSlideShow();
trendsSlideShow27.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_brass_light.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Add an Antique Feel to Your Home", // hed
                                       "Bring out the best in your bathroom with the <a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100440965&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends-_-Issue_27-_-Let_There_Be_Light'>Hampton Bay Freemont Three-Light Bath Bar</a> in antique bronze. Inspired by European design, the three-light bathbar is stylishly adorned with Etruscan glass and a scrolling wrought iron frame. Family coordinates are also available.") // dek
                              );
trendsSlideShow27.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_rect_light.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Opt for Energy-Efficient Illumination", // hed
                                       "Create a cohesive look in your living space with an energy-efficient light fixture. Lithonia Lighting’s 15 In. 2-Light Residental Low Profile Fixture is ideal for use in closets, laundry areas, pantries and hallways. This decorative fluorescent fixture is suitable for ceiling- or wall-mount and provides soft, pleasing illumination.") // dek
                              );
trendsSlideShow27.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_chandelier.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "A Touch of Traditional Elegance", // hed
                                       "Add a uniquely stunning feature to your dining space. Delicately beaded crystal and finely ribbed droplets adorn a silverleaf frame in Allure’s 16-Light Chandelier. It also comes with a complimentary ceiling mount and wall sconce.") // dek
                              );
trendsSlideShow27.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_pot_light.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Find the Details in Your Décor", // hed
                                       "Highlight your room’s best décor accents. Halo’s 6-Pack 7 1/4 In. White Baffle White Trim can be adjusted and controlled to achieve precise lighting. This light does an excellent job minimizing glare and reducing brightness. It’s most often used for general downlighting, but can also be used to accent objects hanging on a wall.") // dek
                              );
trendsSlideShow27.addSlideShowItem(new ArticleSlideShowItem(
                                       "../images/primaryimages/slideshow_primaryimage_vanity_light.jpg", // hero image
                                       "", // larger image (if applicable)
                                       "Bathed in Light", // hed
                                       "Make your bath and vanity area a luxurious oasis. The <a href='http://www.homedepot.com/webapp/wcs/stores/servlet/BuildLinkToHomeDepot?linktype=product&id=100468514&cm_sp=THD_Marketing-_-Ideas_at_Home-_-Trends-_-Issue_27-_-Let_There_Be_Light'>Prismatic Glass Collection’s Chrome 7-Light Wall Bracket</a> adds sparkle and glamour to your bath or powder room. The polished chrome vanity light features brass accents and shell-pattern endcaps.") // dek
                              );
GetInspired.Trends.addArticle(27, new Article("images/tabs/tab_let_there_be_light.jpg", // tabImageUrl
                                       "Let There Be Light", // articleHed
                                       "Spruce up your indoor space with the latest options in interior lighting", // articleDek
                                       "Spruce up your indoor space with the latest options in interior lighting", // longDesc
                                       "trendstowatch/issue27.html", // articleUrl
                                       "Spruce up your indoor space with the latest options in interior lighting", // rightNavDesc)
									   trendsSlideShow27)
                              );

GetInspired.Trends.addArticle(28, new Article("images/tabs/tab_off_the_wall.jpg", // tabImageUrl
                                       "Off the Wall", // articleHed
                                       "Give walls a fast facelift with dramatic wallpaper", // articleDek
                                       "Give walls a fast facelift with dramatic wallpaper", // longDesc
                                       "trendstowatch/issue28.html", // articleUrl
                                       "Give walls a fast facelift with dramatic wallpaper") // rightNavDesc)
                              );
GetInspired.Trends.addArticle(29, new Article("images/tabs/tab_organized.jpg", // tabImageUrl
                                       "Get Organized", // articleHed
                                       "10 ways to get back on track after a busy summer", // articleDek
                                       "10 ways to get back on track after a busy summer", // longDesc
                                       "trendstowatch/issue29.html", // articleUrl
                                       "10 ways to get organized for fall") // rightNavDesc)
                              );   
GetInspired.Trends.addArticle(31, new Article("images/tabs/tab_primarycolors.jpg", // tabImageUrl
                                        "Primary Colors", // articleHed
                                        "Paint and color trends have gone global with a worldly appeal", // articleDek
                                        "Primary Colors - Hot Colors are Coming From Cool Trends", // longDesc
                                        "trendstowatch/issue31.html", // articleUrl
                                        "Primary Colors - Hot Colors are Coming From Cool Trends") // rightNavDesc)
                               );
GetInspired.Trends.addArticle(32, new Article("images/tabs/tab_holidaystyle12b.jpg", // tabImageUrl
                                       "Freshen Up", // articleHed
                                       "Give the room that every guest will visit a quick facelift", // articleDek
                                       "Give the room that every guest will visit a quick facelift", // longDesc
                                       "trendstowatch/issue32.html", // articleUrl
                                       "Give the room that every guest will visit a quick facelift") // rightNavDesc)
                                    );
GetInspired.Trends.addArticle(33, new Article("images/tabs/tab_luxeforless.gif", // tabImageUrl
                                             "Luxe for Less", // articleHed
                                             "Up the glamour in your home with these fabulous-for-less ideas", // articleDek
                                             "Luxe for less – affordable décor ideas for your home", // longDesc
                                             "trendstowatch/issue33.html", // articleUrl
                                             "Luxe for Less – Affordable Décor Ideas for your Home") // rightNavDesc)
                                  );
GetInspired.Trends.addArticle(34, new Article("images/tabs/tab_wallswearing.jpg", // tabImageUrl
                                       "What the Walls are Wearing", // articleHed
                                       "Check out the latest in paint trends this season", // articleDek
                                       "Check out the latest in paint trends this season", // longDesc
                                       "trendstowatch/index.html", // articleUrl
                                       "Check out the season’s hottest paint trends") // rightNavDesc)
                              );                                
                                                   




// Product Innovation
GetInspired.ProductInnovation.addArticle(1, new Article("images/tabs/tab_productinnovation.jpg", // tabImageUrl
                                                 "Outdoor Power Equipment", // articleHed
                                                 "What women want—tools are catering to a whole new audience", // articleDek
                                                 "New in Outdoor Power Gear", // longDesc
                                                 "productinnovation/issue1.html", // articleUrl
                                                 "New in Outdoor Power Gear") // rightNavDesc)
                                        );
GetInspired.ProductInnovation.addArticle(5, new Article("images/tabs/tab_outdoorlighting.jpg", // tabImageUrl
                                                 "Brighten Up", // articleHed
                                                 "Outdoor lighting goes beyond the patio lantern", // articleDek
                                                 "The News in Outdoor Lighting Designs", // longDesc
                                                 "productinnovation/issue5.html", // articleUrl
                                                 "The News in Outdoor Lighting Designs") // rightNavDesc)
                                        );
GetInspired.ProductInnovation.addArticle(6, new Article("images/tabs/tab_indoors.jpg", // tabImageUrl
                                                 "Door to Door", // articleHed
                                                 "Stylish interior doors suit every room in the house", // articleDek
                                                 "Door Belles - Interior and Exterior Doors", // longDesc
                                                 "productinnovation/issue6.html", // articleUrl
                                                 "Door Belles - Interior and Exterior Doors") // rightNavDesc)
                                        );
GetInspired.ProductInnovation.addArticle(7, new Article("images/tabs/tab_dishwasher.gif", // tabImageUrl
                                                 "Dishing It Up", // articleHed
                                                 "Get ready for the next generation of kitchen cleanup appliances", // articleDek
                                                 "Dishing It Up – Kitchen cleanup appliances", // longDesc
                                                 "productinnovation/issue7.html", // articleUrl
                                                 "Dishing It Up – Kitchen cleanup appliances") // rightNavDesc)
                                        );
GetInspired.ProductInnovation.addArticle(8, new Article("images/tabs/tab_windows.jpg", // tabImageUrl
                                                 "Window Dressing", // articleHed
                                                 "Give your windows the designer treatment", // articleDek
                                                 "Window Dressing – Give Your Windows the Designer Treatment", // longDesc
                                                 "productinnovation/issue8.html", // articleUrl
                                                 "Window Dressing – Give Your Windows the Designer Treatment") // rightNavDesc)
                                        );
//GetInspired.ProductInnovation.addArticle(9, new Article("images/tabs/tab_doorlock.gif", // tabImageUrl
//                                                 "It’s a Lock", // articleHed
//                                                 "Intelligent innovations in home security are custom-made", // articleDek
//                                                 "Intelligent Innovations in Home Security are Custom-Made", // longDesc
//                                                 "productinnovation/issue9.html", // articleUrl
//                                                 "Intelligent Innovations in Home Security are Custom-Made") // rightNavDesc)
//                                        );
GetInspired.ProductInnovation.addArticle(10, new Article("images/tabs/tab_painting.gif", // tabImageUrl
                                                 "A Winter Coat", // articleHed
                                                 "A new mix makes the latest exterior-paint products perfect for right now", // articleDek
                                                 "Exterior paints are perfect for right now", // longDesc
                                                 "productinnovation/issue10.html", // articleUrl
                                                 "Exterior paints are perfect for right now") // rightNavDesc)
                                        );
GetInspired.ProductInnovation.addArticle(14, new Article("images/tabs/tab_heater.jpg", // tabImageUrl
                                                 "Turn Up the Heat", // articleHed
                                                 "Find the right heater for your<br />cold space", // articleDek
                                                 "Find the right heater for your<br />cold space", // longDesc
                                                 "productinnovation/issue14.html", // articleUrl
                                                 "Find the right heater for your cold space") // rightNavDesc)
                                        );
GetInspired.ProductInnovation.addArticle(15, new Article("images/tabs/tab_smart.jpg", // tabImageUrl
                                                 "Home Smart Home", // articleHed
                                                 "You don’t have to be tech wizard to have a tech-savvy home", // articleDek
                                                 "You don’t have to be tech wizard to have a tech-savvy home", // longDesc
                                                 "productinnovation/issue15.html", // articleUrl
                                                 "Wire your home for the 21st century") // rightNavDesc)
                                        );

GetInspired.ProductInnovation.addArticle(19, new Article("images/tabs/tab_drain_install.jpg", // tabImageUrl
                                                 "Innovative Drain Installation", // articleHed
                                                 "A DIY plumbing innovation anyone can install", // articleDek
                                                 "A DIY plumbing innovation anyone can install", // longDesc
                                                 "productinnovation/issue19.html", // articleUrl
                                                 "A DIY plumbing innovation anyone can install") // rightNavDesc)
                                        );                                        
  
GetInspired.ProductInnovation.addArticle(20, new Article("images/tabs/tab_fired_up.jpg", // tabImageUrl
                                                 "Fired Up", // articleHed
                                                 "Upgrade your grilling with infrared technology", // articleDek
                                                 "Upgrade your grilling with infrared technology", // longDesc
                                                 "productinnovation/issue20.html", // articleUrl
                                                 "Upgrade your grilling with infrared technology") // rightNavDesc)
                                        );             
GetInspired.ProductInnovation.addArticle(23, new Article("images/tabs/tab_doorlock.gif", // tabImageUrl
                                                 "It’s a Lock", // articleHed
                                                 "Intelligent innovations in home security are custom-made", // articleDek
                                                 "Intelligent Innovations in Home Security are Custom-Made", // longDesc
                                                 "productinnovation/issue23.html", // articleUrl
                                                 "Intelligent Innovations in Home Security are Custom-Made") // rightNavDesc)                           
                                        );


GetInspired.ProductInnovation.addArticle(27, new Article("images/tabs/tab_on_deck.jpg", // tabImageUrl
                                       "On Deck", // articleHed
                                       "What's new in decking?  Check out carefree composites", // articleDek
                                       "What's new in decking?  Check out carefree composites", // longDesc
                                       "productinnovation/issue27.html", // articleUrl
                                       "What's new in decking?  Check out carefree composites") // rightNavDesc)
                              );
							  
GetInspired.ProductInnovation.addArticle(28, new Article("images/tabs/tab_number_one_fan.jpg", // tabImageUrl
                                       "Number One Fan", // articleHed
                                       "Cool down your space with an easy-to-install ceiling fan", // articleDek
                                       "Cool down your space with an easy-to-install ceiling fan", // longDesc
                                       "productinnovation/issue28.html", // articleUrl
                                       "Cool down your space with an easy-to-install ceiling fan") // rightNavDesc)
                              );
GetInspired.ProductInnovation.addArticle(29, new Article("images/tabs/tab_washerdryer.jpg", // tabImageUrl
                                       "Laundro-matic", // articleHed
                                       "Modernize and make the most of your laundry room", // articleDek
                                       "Modernize and make the most of your laundry room", // longDesc
                                       "productinnovation/issue29.html", // articleUrl
                                       "Laundro-matic - Making the Most of Your Laundry Room") // rightNavDesc)
                              );
GetInspired.ProductInnovation.addArticle(32, new Article("images/tabs/tab_holidaystyle12a.jpg", // tabImageUrl
                                       "Form and Function", // articleHed
                                       "10 ways to get your kitchen ready for the season", // articleDek
                                       "10 ways to get your kitchen ready for the season", // longDesc
                                       "productinnovation/issue32.html", // articleUrl
                                       "10 ways to get your kitchen ready for the season") // rightNavDesc)
                              );                              
GetInspired.ProductInnovation.addArticle(33, new Article("images/tabs/tab_cooktops.jpg", // tabImageUrl
                                                 "Smart Ovens", // articleHed
                                                 "Induction and convection<br />cooking update", // articleDek
                                                 "Induction and convection<br />cooking update", // longDesc
                                                 "productinnovation/issue33.html", // articleUrl
                                                 "Induction and convection cooking update") // rightNavDesc)
                                        );      
GetInspired.ProductInnovation.addArticle(34, new Article("images/tabs/tab_place.jpg", // tabImageUrl
                                        "Everything in its Place", // articleHed
                                        "The newest storage solutions will have you organized in no time", // articleDek
                                        "The newest storage solutions will have you organized in no time", // longDesc
                                        "productinnovation/index.html", // articleUrl
                                        "Fool-proof storage solutions") // rightNavDesc)
                                );    


                                      
// Smart Living
GetInspired.SmartLiving.addArticle(1, new Article("images/tabs/tab_smartliving.jpg", // tabImageUrl
                                             "Get Set for Summer!", // articleHed
                                             "Try these 10 easy ideas for an instant update, indoors and out", // articleDek
                                             "Get Set for Summer!", // longDesc
                                             "smartliving/issue1.html", // articleUrl
                                             "Get Set for Summer!") // rightNavDesc)
                                  );
GetInspired.SmartLiving.addArticle(2, new Article("images/tabs/tab_curbappeal.jpg", // tabImageUrl
                                             "Face Value", // articleHed
                                             "10 easy ideas for adding instant curb appeal", // articleDek
                                             "Boost Your Home’s Curb Appeal", // longDesc
                                             "smartliving/issue2.html", // articleUrl
                                             "Boost Your Home’s Curb Appeal") // rightNavDesc)
                                  );
GetInspired.SmartLiving.addArticle(4, new Article("images/tabs/tab_ultimategarage.jpg", // tabImageUrl
                                             "Your Ultimate Garage", // articleHed
                                             "Easy tips to clear the clutter and get organized", // articleDek
                                             "Your Ultimate Garage", // longDesc
                                             "smartliving/issue4.html", // articleUrl
                                             "Your Ultimate Garage") // rightNavDesc)
                                  );
GetInspired.SmartLiving.addArticle(5, new Article("images/tabs/tab_frontdoor.jpg", // tabImageUrl
                                             "Making an Entrance", // articleHed
                                             "5 ways to update your front door", // articleDek
                                             "5 Ways to Update Your Front Door", // longDesc
                                             "smartliving/issue5.html", // articleUrl
                                             "5 Ways to Update Your Front Door") // rightNavDesc)
                                  );
GetInspired.SmartLiving.addArticle(6, new Article("images/tabs/tab_closet.jpg", // tabImageUrl
                                             "Closet Case", // articleHed
                                             "Custom-designed closets - why your wardrobe will love you", // articleDek
                                             "Closet Case - Custom Designed Closets", // longDesc
                                             "smartliving/issue6.html", // articleUrl
                                             "Closet Case - Custom Designed Closets") // rightNavDesc)
                                  );
GetInspired.SmartLiving.addArticle(7, new Article("images/tabs/tab_drawerknob.gif", // tabImageUrl
                                             "Instant Kitchen Update", // articleHed
                                             "Easy ways to refresh your kitchen that won’t break the bank", // articleDek
                                             "Fast and Affordable Kitchen Upgrades", // longDesc
                                             "smartliving/issue7.html", // articleUrl
                                             "Fast and Affordable Kitchen Upgrades") // rightNavDesc)
                                  );
GetInspired.SmartLiving.addArticle(9, new Article("images/tabs/tab_foyer.gif", // tabImageUrl
                                             "A New Beginning", // articleHed
                                             "Get your entryway set for the new season with these easy décor ideas", // articleDek
                                             "Give Your Entryway a New Beginning This Season", // longDesc
                                             "smartliving/issue9.html", // articleUrl
                                             "Give Your Entryway a New Beginning This Season") // rightNavDesc)
                                  );          
GetInspired.SmartLiving.addArticle(13, new Article("images/tabs/tab_wellprotected.jpg", // tabImageUrl
                                             "Well Protected", // articleHed
                                             "Secure your home<br />in 7 easy steps", // articleDek
                                             "Secure your home<br />in 7 easy steps", // longDesc
                                             "smartliving/issue13.html", // articleUrl
                                             "Secure your home in 7 easy steps") // rightNavDesc)
                                  );
GetInspired.SmartLiving.addArticle(14, new Article("images/tabs/tab_twoforone.jpg", // tabImageUrl
                                             "Two for One", // articleHed
                                             "Easy ways to create an instant guest room", // articleDek
                                             "Easy ways to create an instant guest room", // longDesc
                                             "smartliving/issue14.html", // articleUrl
                                             "Easy ways to create an instant guest room") // rightNavDesc)
                                  );         
//GetInspired.SmartLiving.addArticle(17, new Article("images/tabs/tab_eco_easy.jpg", // tabImageUrl
//                                       "Eco is Easy", // articleHed
//                                       "Simple ways to make your home a greener place", // articleDek
//                                       "Simple ways to make your home a greener place", // longDesc
//                                       "smartliving/issue17.html", // articleUrl
//                                       "Simple ways to make your home a greener place") // rightNavDesc)
                              //);                               
                              
GetInspired.SmartLiving.addArticle(18, new Article("images/tabs/tab_good_value.jpg", // tabImageUrl
                                       "Good Value", // articleHed
                                       "10 ways to improve the value of your home", // articleDek
                                       "10 ways to improve the value of your home", // longDesc
                                       "smartliving/issue18.html", // articleUrl
                                       "10 ways to improve the value of your home") // rightNavDesc)
                              );  
                                                           
GetInspired.SmartLiving.addArticle(20, new Article("images/tabs/tab_spring_garden.jpg", // tabImageUrl
                                             "Spring into the Garden", // articleHed
                                             "Get set for spring by following our helpful to-do list", // articleDek
                                             "Get set for spring by following our helpful to-do list", // longDesc
                                             "smartliving/issue20.html", // articleUrl
                                             "Get set for spring by following our helpful to-do list") // rightNavDesc)
                                  );

GetInspired.SmartLiving.addArticle(21, new Article("images/tabs/tab_time_to_tidy.jpg", // tabImageUrl
                                       "Time to Tidy", // articleHed
                                       "Get your house in shipshape for the season", // articleDek
                                       "Get your house in shipshape for the season", // longDesc
                                       "smartliving/issue21.html", // articleUrl
                                       "Get your house in shipshape for the season") // rightNavDesc)
                              );

GetInspired.SmartLiving.addArticle(22, new Article("images/tabs/tab_outdoor_order.jpg", // tabImageUrl
                                       "Outdoor Order", // articleHed
                                       "Great organizing solutions for your outdoor space", // articleDek
                                       "Great organizing solutions for your outdoor space", // longDesc
                                       "smartliving/issue22.html", // articleUrl
                                       "Great organizing solutions for your outdoor space") // rightNavDesc)
                              );

GetInspired.SmartLiving.addArticle(23, new Article("images/tabs/tab_get_wired.jpg", // tabImageUrl
                                       "Get Wired", // articleHed
                                       "Simple electrical projects you can do yourself", // articleDek
                                       "Simple electrical projects you can do yourself", // longDesc
                                       "smartliving/issue23.html", // articleUrl
                                       "Turn up the wow factor in your home with simple electrical projects") // rightNavDesc)
                              );
                              


GetInspired.SmartLiving.addArticle(25, new Article("images/tabs/tab_get_deck_smart.jpg", // tabImageUrl
                                       "Get Deck Smart", // articleHed
                                       "Take time to safeguard your deck as the season kicks off", // articleDek
                                       "Take time to safeguard your deck as the season kicks off", // longDesc
                                       "smartliving/issue25.html", // articleUrl
                                       "Take time to safeguard your deck as the season kicks off") // rightNavDesc)
                              );

GetInspired.SmartLiving.addArticle(26, new Article("images/tabs/tab_hit_the_deck.jpg", // tabImageUrl
                                       "Hit the Deck", // articleHed
                                       "Spruce up your deck in five <br />easy steps", // articleDek
                                       "Spruce up your deck in five easy steps", // longDesc
                                       "smartliving/issue26.html", // articleUrl
                                       "Spruce up your deck in five easy steps") // rightNavDesc)
                              );
							  
GetInspired.SmartLiving.addArticle(28, new Article("images/tabs/tab_hurricane.jpg", // tabImageUrl
                                       "To the Extreme", // articleHed
                                       "A simple plan to beat out severe summer weather", // articleDek
                                       "A simple plan to beat out severe summer weather", // longDesc
                                       "smartliving/issue28.html", // articleUrl
                                       "A simple plan to beat out severe summer weather") // rightNavDesc)
                              );
GetInspired.SmartLiving.addArticle(29, new Article("images/tabs/tab_closets.gif", // tabImageUrl
                                       "Fall In!", // articleHed
                                       "Get your garden ready for fall with easy cleanup tips", // articleDek
                                       "Get your garden ready for fall with easy cleanup tips", // longDesc
                                       "smartliving/issue30.html", // articleUrl
                                       "Get your garden ready for fall with easy cleanup tips") // rightNavDesc)
                              );
GetInspired.SmartLiving.addArticle(31, new Article("images/tabs/tab_eco_easy_24.jpg", // tabImageUrl
                                       "Eco is Easy", // articleHed
                                       "Simple ways to make your home a greener place", // articleDek
                                       "Simple ways to make your home a greener place", // longDesc
                                       "smartliving/issue31.html", // articleUrl
                                       "Simple ways to make your home a greener place") // rightNavDesc)
                              );
GetInspired.SmartLiving.addArticle(32, new Article("images/tabs/tab_holidaystyle12c.jpg", // tabImageUrl
                                       "Get Comfy", // articleHed
                                       "Transform your living room into a cozy yet elegant space", // articleDek
                                       "Transform your living room into a cozy yet elegant space", // longDesc
                                       "smartliving/issue32.html", // articleUrl
                                       "Transform your living room into a cozy yet elegant space") // rightNavDesc)
                              );
GetInspired.SmartLiving.addArticle(33, new Article("images/tabs/tab_breezethroughtheholidays.jpg", // tabImageUrl
                                       "Breeze Through the Holidays", // articleHed
                                       "Keep your cool this season by planning ahead", // articleDek
                                       "Keep your cool this season by planning ahead and staying organized", // longDesc
                                       "smartliving/issue33.html", // articleUrl
                                       "Tips for easy holiday entertaining") // rightNavDesc)
                              );        
GetInspired.SmartLiving.addArticle(34, new Article("images/tabs/tab_get_the_green_light2.jpg", // tabImageUrl
                                   "Get the Green Light", // articleHed
                                   "Eco-friendly lighting is good for the environment and your wallet", // articleDek
                                   "Eco-friendly lighting is good for the environment and your wallet", // longDesc
                                   "smartliving/index.html", // articleUrl
                                   "Eco-friendly lighting is good for the environment and your wallet") // rightNavDesc)
                          );
                                                    
                             

                              

// retrieve a cookie by name
// added because it can't reference Get_Cookie in cookie script window
function Get_Cookie( check_name ) 
{

	// first we'll split this cookie up into name/value pairs
	// note: document.cookie only returns name=value, not the other components
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	var cookie_name = '';
	var cookie_value = '';
	var b_cookie_found = false; // set boolean t/f default f
	
	for ( i = 0; i < a_all_cookies.length; i++ )
	{
		// now we'll split apart each name=value pair
		a_temp_cookie = a_all_cookies[i].split( '=' );
		
		
		// and trim left/right whitespace while we're at it
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
	
		// if the extracted name matches passed check_name
		if ( cookie_name == check_name )
		{
			b_cookie_found = true;
			// we need to handle case where cookie has no value but exists (no = sign, that is):
			if ( a_temp_cookie.length > 1 )
			{
				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
			}
			// note that in cases where cookie is initialized but no value, null is returned
			return cookie_value;
			break;
		}
		a_temp_cookie = null;
		cookie_name = '';
	}
	if ( !b_cookie_found )
	{
		return null;
	}
}	
