var $j = jQuery.noConflict();

$j(document).ready(function () {

  $j('.Content #SideBarWrapper').prepend(
    $j('<div>', {id: 'SideBarTop'})
      .append($j('<a>', {href: '/'})
      .append($j('<img>', {src: '/assets/images/template/logo.gif', alt: 'Logo'})))
  );
  
  $j('.Content #SideBar').after(
    $j('<img>', {src: '/assets/images/template/logo-bottom.png', alt: 'Footer Graphic'})
  );
  
  $j('.Content #SideBarImage').after(
    $j('<img>', {id: 'PhotoBottom', src: '/assets/images/template/photo-bottom.png', alt: 'Photo Bottom Graphic'})
  );
  
  $j('.Home #SideBar').append(
    $j('<img>', {src: '/assets/images/template/logo.gif', alt: 'Logo'})
  );
  
  $j('.Popup').click(function(event){
    event.preventDefault();
    window.open(this.href);
  });

});

$j(window).load(function(){
  if($j('#Content').height() < $j('#SideBarWrapper').height() - 200)
    $j('#Content').height($j('#SideBarWrapper').height() - 200);
  
});
