Cufon.replace('#nav > li > a', {fontFamily: 'Conduit ITC', hover: true});
Cufon.replace('h2', {fontFamily: 'Sabon LT Std'});
Cufon.replace('.feature_overlay', {fontFamily: 'Sabon LT Std'});
Cufon.replace('#feature_side', {fontFamily: 'Conduit ITC', hover: true});
Cufon.replace('h3', {fontFamily: 'Conduit ITC'});
Cufon.replace('#enquiry', {fontFamily: 'Conduit ITC', hover: true});

$(function() {
    // IE6 PNGs, GA, MISC
    $('h1').supersleight({shim: '/media/images/global/x.gif'});
    $('#client_logos img').supersleight({shim: '/media/images/global/x.gif'});
    $('#client_list').supersleight({shim: '/media/images/global/x.gif'});
    $('.feature_overlay').supersleight({shim: '/media/images/global/x.gif'});
    
    if (location.hostname != 'bravara') {
        $.geekGaTrackPage('UA-11302694-1');
    }
    
    $('#client_logos li:last').css('margin-right', '0'); // cover for browsers lacking :last-child in CSS
    $('#nav li:last-child').css('margin-right', '0');
    $('#nav li li:last-child').css('border-bottom', '0');
    $('.subnav li:last').css('border-bottom', '0');
    
    // ROUNDED CORNERS
    if ($.browser.safari || $.browser.mozilla) {
        $('.rounded').corner('3px');
        $('.subnav').corner('4px');
        $('#sidebar h3').corner('4px');
        $('#nav > li > a').corner('3px top');
        $('#nav ul').corner('tr bottom 5px');
        $('#contact form').corner('5px');
    }
    
    // HOMEPAGE FEATURE
    if ($('#home').length) {
        $('#home #feature_main').cycle({
            timeout:  6000, 
            speed:  2000
        });
    }
    
    // VALIDATION
    if ($('#contact_form').length) {
        $("#contact_form").validationEngine({
            inlineValidation: false,
            success :  false,
            failure : function() {}
        });
    }
    
    // DROPDOWN NAV
    if (!($.browser.msie && parseInt($.browser.version, 10) < 7)) { // is this safe? $.browser deprecated?
        $('#nav').superfish({
            delay: 500,
            speed: 0});
    }    
});

