$(function() {
	$('.field, textarea').focus(function() {
        if(this.title==this.value) {
            this.value = '';
        }
    }).blur(function(){
        if(this.value=='') {
            this.value = this.title;
        }
    });

    $('#slider').jcarousel({
       auto: 7,
       scroll: 1,
       wrap: 'both' 
    });

    Cufon.replace('#slogan a', { fontFamily: 'HelveticaNeue Bold', textShadow: '0 1px 2px #000' });
    Cufon.replace('h3', { fontFamily: 'HelveticaNeue Bold'});
    Cufon.replace('h1, h2', 'h4', 'h5', 'h6', 'h7', { fontFamily: 'HelveticaNeue Condensed' });
    Cufon.replace('#navigation a, #sidebar .nav a', { fontFamily: 'HelveticaNeue Roman', hover: true });
    Cufon.replace('#slider p, #slider a', { fontFamily: 'HelveticaNeue Medium' });
    Cufon.replace('#slider h2, #footer h2', { fontFamily: 'HelveticaNeueLTStd BdCn', textShadow: '0 1px 2px #000' });
    Cufon.replace('#footer h2', { fontFamily: 'Helvetica Neue LT Std Md Cn'});
    Cufon.replace('#slider h2, .btn', { fontFamily: 'HelveticaNeueLTStd BdCn', textShadow: '0 1px 2px #000', hover: true });
    Cufon.replace('#footer .copy', { fontFamily: 'Helvetica Neue LT Std Md' });
    Cufon.replace('#footer .site-map ul li a', { fontFamily: 'Helvetica Neue LT Std Md Cn', hover: true });
    Cufon.replace('#testimonials .author', { fontFamily: 'HelveticaNeue Italic' });

    var ch = $('#content').height();
    var sh = $('#sidebar').height();

    if ( ch > sh ) $('#sidebar').css({height: ch});
    else $('#content').css({height: sh}); 

    if ($.browser.msie && $.browser.version.substr(0,1)<7) {
        DD_belatedPNG.fix('#logo a, #footer, #header .shadow, #navigation, #navigation ul li a, #slogan, .social-links a img, #slider .image, .home #main .shell');
    }
});
