$(document).ready(function(){
  pixelsilk2.renderSkin({skin: '[' + '[Menu1]' + ']', path: null}, function(html) {
    $('#subNavigation').html(html);
    var sections = $('#subNavigation div');
    var topElements = $('#Menu li:not(.separator)');
    for (z = 0; z < sections.length; z++) {
       var li = topElements[z];
       var lihtml = li.innerHTML;
       li.innerHTML = lihtml + sections[z].innerHTML;
    }
    $('#Menu').navMenu({
      menuWidth: 275,
      containerElement:  "#container",
      containerWidth:  1200,
      menuElement: "ul",
      rightArrow: ' »'
    });
    
  //  pixelsilk2.renderSkin({skin: '[[HighlandsDirectory]]'}, function(skin){
  //    if(skin != ""){
  //      $("#Menu > li:eq(5) > ul").prepend(skin);
  //    }
  //  });
  });
  
  var itemLength = 0;
  $('#Menu li').each(function() {
        itemLength += parseInt($(this).width() + 5);
  });
  
  
    
  $('#navigation').width(itemLength);
  
  if($('#content .right').height() > $('#content .left').height())
  {
    $('#content .left').height($('#content .right').height());
  }
  
  
  
  $("#smartSolutions a").click(function(){
      window.open($(this).attr('href'), 'newWindow', '');
      return false;
  });
});
