$(document).ready(function(){
	$("a.external-link").click(function(event){
		event.preventDefault();
		window.open($(this).attr("href"));
	});


        /** Adaptation Des hauteur de colones  **/
        if(($('div#columns div#center_column div.str_global').length && $('div#right_column div#content_right_column').length) || ($('div#columns div#center_column div#primary_block').length && $('div#right_column div#content_right_column').length))
        {
            var content_cms;
            if($('div#columns div#center_column div#primary_block').length)
                content_cms = $('div#columns div#center_column div#primary_block');
            else if($('div#columns div#center_column div.str_global').length)
                content_cms = $('div#columns div#center_column div.str_global');
            else
                content_cms = null;

            if(content_cms != null)
            {
                var content_right = $('div#right_column div#content_right_column')
                var content_right_shadow = $('div#right_column div#shadow_right_column');
                var content_right_border = $('div#right_column div#border_right_column');

                var height_content_cms = content_cms.outerHeight(false);
                var height_content_right = content_right.outerHeight(false);

                if (height_content_cms > height_content_right)
                    content_right.css('min-height', height_content_cms - 1);
                else if (height_content_cms < height_content_right)
                    content_cms.css('min-height', height_content_right - parseInt(content_cms.css('padding-bottom')) - parseInt(content_cms.css('padding-top')) + 1);
                
                content_right_shadow.css('min-height', content_right.height() + 4);
                content_right_border.css('min-height', content_right.height() + 3);
            }
        }


        /** Centrage btn 404 **/
        if($('div#content_404').length)
        {
            $('div#content_404 a').width($('div#content_404 a span.part_left_btn').outerWidth(false) + $('div#content_404 a span.part_center_btn').outerWidth(false) + $('div#content_404 a span.part_right_btn').outerWidth(false))
        }
});
