Cufon.replace('.chalet', { fontFamily: 'Chalet New York 1960', hover: true });
Cufon.replace('.chalet-lite, #feature p, .base h1', { fontFamily: 'Chalet Lite', hover: true });
Cufon.replace('.chalet-bold', { fontFamily: 'newyork-bold-1960', hover:true });

jQuery.noConflict();

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

function sub_nav(){
  var path = location.pathname.substring(1);	
  jQuery('#sub-nav a[href$="' + path + '"]').parent().addClass('nav-active'); // check path as typed exactly
  jQuery('#sub-nav a[href$="' + path + '/"]').parent().addClass('nav-active'); // check path with an extra trailing slash added
}

function lightbox(){
    jQuery("#content a[rel~='lightbox']").colorbox({opacity:'0.35', overlayClose:true});
    jQuery("#content a[rel='lightbox floatl']").wrap("<div class='lightbox floatl'></div>");
    jQuery("#content a[rel='lightbox floatr']").wrap("<div class='lightbox floatr'></div>");
    jQuery("#content a[rel~='lightbox']").after("<strong>Click Image to Enlarge</strong>"); 
}

function form_input_classes(){
    jQuery('input[name=email]').addClass('input_email');
    jQuery('input[name=firstname]').addClass('input_firstname');
    jQuery('input[name=lastname]').addClass('input_lastname');
    jQuery('input[name=addr1]').addClass('input_addr1');
    jQuery('input[name=addr2]').addClass('input_addr2');
    jQuery('input[name=city]').addClass('input_city');
    jQuery('input[name=zip]').addClass('input_zip');
    jQuery('select[name=state_cd]').addClass('select_state_cd');
    jQuery('select[name=country]').addClass('select_country');
    jQuery('input[name=phone]').addClass('input_phone');

    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(); 
    jQuery("#searchbox input:text").clearingInput();
}   

jQuery(document).ready(function() {
    assign_fitted();
//    dropdownMenu();
    form_input_classes();
    lightbox();
    form_labelize();
    sub_nav();
});		
