(function($) {
    
    
    $(function() {
    
    
        // Kill links to self
        $('a').each(function(i, item) {
             if (item.href == ('' + window.location).replace(/#.*$/, '').replace(/\?.*$/, '')) {
                $(item).addClass('current');
            };
        });
        
        // give required field labels a class for styling
        $('input.required, select.required, textarea.required').parent('li, tr').find('label, th').addClass('required');
    
        // add prompts to form elements
        //$('form.titleprompt input, form input.titleprompt').formPrompt();
        
            
        // facilitate zebra striping in uls and tables, checkbox-specific styles
        //$('ul li:even, table tr:even').addClass('alt');
        $('input[type=checkbox]').addClass('checkbox');
        $('input[type=submit]').addClass('submit');
        
        
        // smooth scrolling
        //$.localScroll({duration: SCROLLTIMER});

       
        //$('.customselect select, select.customselect').customSelect(); 
        
        
        $('.linked, .clickable').click(function() {
            if ($(this).find('a').attr('href')) {
                window.location = $(this).find('a').attr('href');
                return false;
            };
        }).hover(
            function() {
                $(this).addClass('hovered');
            },
            function() {
                $(this).removeClass('hovered');
            }
        ).css('cursor', 'pointer');
        
        
        
        $('input[placeholder]').formPlaceholder();

        
    });
    
    
    
})(jQuery);
