jQuery.noConflict();

    Cufon.replace('h1, .f-replace, .interior h1', {hover: true});


function form_input_classes(){
    jQuery('input[type="text"]').addClass('text');
    jQuery('input[type="password"]').addClass('text');
    jQuery('input[type="checkbox"]').addClass('checkbox');
    jQuery('input[type="radio"]').addClass('radiobutton');
    jQuery('input[type="submit"]').addClass('submit');
    jQuery('input[type="image"]').addClass('buttonImage');
}

function form_labelize(){  jQuery(".labelize input:text").clearingInput(); }   

function cycle(){

    if ( jQuery('#home-feature-container')) {
        jQuery('#home-feature-container').cycle({
            fx: 'fade',
            pager: '#home-feature-nav',
            timeout: 10000
    });
}}

function externalLinks(){
    var pageUri = new RegExp(window.location.hostname, 'i');
    var relativeUri = /^\//;
    var jsUri = /JavaScript:/i;
    var idUri = /^#/;
    jQuery('a').each(function(){
        //detect if cwa domain or current domain is the same as the href value of the link
        if(pageUri.test(jQuery(this).attr('href')) || relativeUri.test(jQuery(this).attr('href')) || jsUri.test(jQuery(this).attr('href')) || idUri.test(jQuery(this).attr('href')) ){
            //do nothing
        } else {
            //apply target="_blank" to open in new window
            jQuery(this).attr('target', '_blank');
        }
    });
}

jQuery(document).ready(function() {
    //form_input_classes();
    form_labelize();
    cycle();
    externalLinks();
    jQuery('ul.sf-menu').superfish({ 
        delay: 1000, // one second delay on mouseout 
    	animation: {opacity:'show',height:'show'},  // fade-in and slide-down animation 
    	speed: 'fast', // faster animation speed 
    	autoArrows: false, // disable generation of arrow mark-up 
    	dropShadows: false // disable drop shadows 
    });

});
