$().ready(function() {

        $("#ctaText").autocomplete(trades, {
        matchContains: "trade",
        minChars: 2,
        max: 120,


        formatItem: function(item) {
            return item.trade;
        }

    }).result(function(event, item) {
        location.href = urlString + '/dorfq/imp_tradesmen/1.htm?attr6950=' + item.categorycode + '&formNav=1&formCurrentNav=1&attr6951=' + item.tradecode;
    });

    $('A[rel="external"]').click( function() {

        window.open( $(this).attr('href') );
        return false;

    });

    if ( $.jtabber != undefined ) {
        $.jtabber({
            mainLinkTag: "#insuranceTabs a.move, .contentlink, .contentlinkBack", // much like a css selector, you must have a 'title' attribute that links to the div id name
            activeLinkClass: "on", // class that is applied to the tab once it's clicked
            hiddenContentClass: "hiddenContent", // the class of the content you are hiding until the tab is clicked
            showDefaultTab: 1, // 1 will open the first tab, 2 will open the second etc.  null will open nothing by default
            showErrors: true, // true/false - if you want errors to be alerted to you
            effect: 'fade', // null, 'slide' or 'fade' - do you want your content to fade in or slide in?
            effectSpeed: 'fast' // 'slow', 'medium' or 'fast' - the speed of the effect
        });
    }

});

