$(function() {
    
    // Open external links in blank browser windows
    
    $('a[rel="external"]').attr('target', '_blank');
    
    //reviews slide downs
    

    var $reviewsdt = $('dl#reviews > dt').addClass('contracted'),
        $reviewsdd = $('dl#reviews > dd').hide();
   
    // set <dt> toggle function to expand/contract the following <dd> element
     // and toggle the contracted CSS class to switch the icon
    $reviewsdt.toggle(function() {
      $(this).removeClass('contracted');
      $(this).next().slideDown();
      current
    }, function() {
      $(this).next().slideUp('normal',function() {
         $(this).prev().addClass('contracted') // class is added in the callback to chain events
      });
    });

    //    Popup windows
    
    $(".popup").fancybox({
        'width'             : '75%',
        'height'            : '75%',
        'autoScale'         : false,
        'transitionIn'  : 'elastic',
        'transitionOut' : 'elastic',
        'type'              : 'iframe'
    });
  
});
 
