try {
    (function($) {
        $.extend(true, $.la,
        {
            modules :{
                la :{
                    modules:{
                        console: {
                            modules:{
                                seo: {
                                    modules:{
                                        images: {
                                            active: true
                                        }
                                    }
                                }
                            }

                        }
                    }
                }
            },
            console:{

                /* Control Akamai */
                seo:{
                    images:{
                        label:'Images',
                        over:function(c) {

                            return  window.open(c);
                            var links = $('img[src=' + c + ']');
                            if (jQuery.la.console.seo.links.currentLink !== null) {
                                jQuery.la.console.seo.links.currentLink.css('border', 'none');
                            }
                            jQuery.la.console.seo.links.currentLink = links;
                            jQuery.la.console.seo.links.currentLink.css('border', '2px solid red');


                        },
                        noover:function() {
                            if (jQuery.la.console.seo.links.currentLink !== null) {
                                jQuery.la.console.seo.links.currentLink.css('border', 'none');
                            }
                        },
                        currentLink:null,
                        console:function() {
                            var console = '';
                            var domains = {};
                            var currentPaths = {};
                            var paths = {};
                            var del = $('div#debug').html();
                            $('div#debug').html('');
                            $('img').each(function(i) {
                                var src = $(this).attr('src');
                                var dom = '/';
                                if (typeof src != 'undefined') {
                                    var d = src.split('/');
                                    if (d[0] == 'http:') {
                                        dom = d[2];
                                        if (dom.indexOf('.ladmedia.fr') !== -1) {
                                            if (typeof currentPaths[src] == 'undefined') {
                                                currentPaths[src] = 1;
                                            }
                                            else {
                                                currentPaths[src] ++;
                                            }
                                        }
                                    }
                                    else {
                                        if (src.indexOf('#') !== 0) {
                                            paths[src] = true;
                                        }
                                    }


                                    if (typeof domains[dom] == 'undefined') {
                                        domains[dom] = 1;
                                    }
                                    else {
                                        domains[dom]++;
                                    }
                                }

                            });
                            var select2 = '<select id="console_seo_images3" style="width:150px">';
                            for (var j in domains) {
                                if (j == '/') {
                                    var select = '<select id="console_seo_images1"  style="width:150px">';
                                    for (var k in paths) {
                                        select += '<option >' + k + '</option>';
                                    }
                                    select += '</select><a href="javascript:jQuery.la.console.seo.images.over($(\'#console_seo_images2\').val());return false;">Ouvrir<a>';
                                    console += $.la.console.cFormat('Sans domaine', select);
                                }
                                else if (j.indexOf('.ladmedia.fr') !== -1) {
                                    var select = '<select id="console_seo_images2" style="width:150px" >';
                                    for (var k in currentPaths) {
                                        select += '<option value="' + k + '" onmouseover="">' + currentPaths[k] + ' : ' + k + '</option>';
                                    }
                                    select += '</select><a href="javascript:jQuery.la.console.seo.images.over($(\'#console_seo_images2\').val());return false;">Ouvrir<a>';
                                    console += $.la.console.cFormat('Domaine courant', select);
                                }
                                else {
                                    select2 += '<option>' + domains[j] + ' : ' + j + '</option>';
                                }
                            }
                            select2 += '</select>';
                            console += $.la.console.cFormat('Autres domaines', select2);
                            $('div#debug').html(del);
                            return console;
                        }
                    }
                }
            }
        });
    })(jQuery);
}
catch(e) {
}
