$(document).ready(
    function() 
    {
    
        $('.left_column p').not('.nowidow').each(
            function() 
            {
                h2all = $(this).html();
                h2a = h2all.slice(0, h2all.lastIndexOf(' '));
                h2b = '&nbsp;' + h2all.slice(h2all.lastIndexOf(' ')+1);
                $(this).html(h2a + h2b);  
            }
        );
    
        $('a').not('.ride a, .nobind').bind(
            'click', 
            function() 
            {
                if(this.href.substr(-1,1) != '#')
                {
                    var host = $.url.setUrl(this.href).attr("host");
                    
                    if(
                        host != 'blog.bridgepedal.com'
                    )
                    {
                        window.open(this.href);
                        return false;
                    }
                }
            }
        );
        
        $('#register').bind(
            'click', 
            function() 
            {
                if($.url.attr('directory') == '/register/')
                {
                    window.open('https://www.signmeup.com/site/online-event-registration/75863');
                }
                else
                {
                    window.location = 'http://blog.bridgepedal.com/register/';
                }
                
                return false;
            }
        );
          
        $('.slideshow').cycle(
            {
                fx: 'fade'
            }
        );
    }
);


function toggleNext(obj) 
{
    $(obj).parent().next().slideToggle(400, 'easeOutCubic'); 
    return false;
}
