$('document').ready(function () {

    $('a.js-popup-slideshow').click(function () {
        window.open(this.href, 'slideshow', 'menubar=no,resizable=no,scrollbars=no,status=no,width=881,height=483');
        return false;
    });

    $('a.js-popup-privacy').click(function () {
        window.open(this.href, 'privacy', 'menubar=no,resizable=yes,scrollbars=yes,status=no,width=400,height=483');
	      return false;
    });

    // Scale contact-info text if it's too large
    var contactInfo = $('#contact-info');
    while (contactInfo.height() > 28) {
        contactInfo.css({ 'font-size': (contactInfo.css('font-size').replace('px','') - 0.25) + 'px' });
    }
	
    // IE patching
    if ($.browser.msie) {
        $('li, dd').hover(function () { 
            $(this).addClass('hover'); 
        }, function () { 
            $(this).removeClass('hover'); 
        });
        $('ul li:last-child, dl dd:last-child').addClass('last-child');
    }
});

