$(function () {
  $('<li><a href="/">home</a></li><li class="separator">&nbsp;&gt;&nbsp;</li>').prependTo('#breadcrumbs');
  
  $('#summary hr:last-child').hide();
  
  $("aside a#newsletter, #newsletterLnk").fancybox({
    'zoomSpeedIn': 500,
    'zoomSpeedOut': 500,
    'overlayOpacity': 0.8,
    'overlayColor': '#000',
    'transitionIn': 'fade',
    'transitionOut': 'fade',
    'speedIn': 600,
    'speedOut': 600,
    'width': 440,
    'height': 360,
    'autoScale': false,
    'type': 'iframe',
    'padding': 0,
    'scrolling': 'no'
  });
  
  /*if (window.PIE) {
    $("header nav #mainMenu li:hover, header nav #mainMenu li li:last-child, header nav #mainMenu li li:last-child a:hover, header nav div, header nav div a:hover, header nav div a:active, header nav div li.current a, article, #mainContent, #news ul, #newsletterSubscribePage div, #newsletterSubscribePage input[type='text'], #newsletterSubscribePage input[type='submit'], .readAll, #news ul article, #gallery #content article, aside div, aside #faqMenu, footer section a, .orbit-caption").each(function() {
        PIE.attach(this);
    });
  }*/
  
});

$(window).load(function(){
  $('#slideshow').orbit({
  animation: 'fade',
  animationSpeed: 800,
  timer: true,
  advanceSpeed: 4000, 
  pauseOnHover: false,
  startClockOnMouseOut: false, 	 // if clock should start on MouseOut
  startClockOnMouseOutAfter: 1000, 	 // how long after MouseOut should the timer start again
  directionalNav: false,
  captions: true,
  captionAnimation: 'slideOpen',
  captionAnimationSpeed: 800,
  bullets: true 
  });
});

function closeFancy(){
  $.fancybox.close();
}
