jQuery.noConflict();

Cufon.replace('header h1, header nav ul li.level_1 > a, #action-btns a, #site-summary, #rotator p, #prev, #next, #issue-links a, #home #content h2, #campaign_btns a, #lightbox-heading, #lightbox-body, .lightbox-clickthrough, #lightbox #quick-submit, #cboxClose', {hover: true}, {fontFamily: 'Meta'});

// to remove sticky hover state in #navigation where nav item has a dropdown
function nav_color_replace() {
    jQuery("header nav > ul > li").mouseout( function() { 
       Cufon.replace('header nav > ul > li > a', { hover: true } ); 
    });

}
function form_input_classes(){
    jQuery('input[type="text"]').addClass('text');
    jQuery('input[type="email"]').addClass('text');
    jQuery('input[type="tel"]').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 cycle_lite(){
    jQuery('#rotator').cycle({ 
      timeout: 10000,
      next:   '#next', 
      prev:   '#prev'
});
}

function assign_fitted(){
  jQuery('.clickable').fitted();
}


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

function superfish(){
    jQuery('ul.sf-menu').superfish({ 
        delay:       0,                            // delay on mouseout 
        dropShadows: false,
        autoArrows:  false
    });
}

jQuery(document).ready(function() {
    form_input_classes();
    form_labelize();
    assign_fitted();
    cycle_lite();
    superfish();
    nav_color_replace();
});
