(function($){
    $.extend(true, $.la,
    {
        modules :{
            la :{
                modules:{
                	console: {
                		modules:{
                			stats: {
                            	modules: {
                            		cybermonitor:{
                            			active:true
                            		}
                            	}
                            }
                		}
                        
                    }
                }
            }
        },

        console:{
            
            stats:{
                cybermonitor:{
                    label: 'Cybermonitor',
                    console:function(){
                        try{
                        	if ($.la.tracking.cybermonitor.ids.CM_SERIAL != null) {
                        		
                        		var c = $.la.console.cFormat('CM_SERIAL',$.la.tracking.cybermonitor.ids.CM_SERIAL) +
                        			 $.la.console.cFormat('CM_CLIENT',$.la.tracking.cybermonitor.ids.CM_CLIENT) +
                                     $.la.console.cFormat('CM_NIVEAU1',$.la.tracking.cybermonitor.ids.CM_NIVEAU1) +
                                     $.la.console.cFormat('CM_NIVEAU2',$.la.tracking.cybermonitor.ids.CM_NIVEAU2) +
                                     $.la.console.cFormat('CM_NIVEAU3',$.la.tracking.cybermonitor.ids.CM_NIVEAU3) +
                                     $.la.console.cFormat('CM_NIVEAU4',$.la.tracking.cybermonitor.ids.CM_NIVEAU4);
                                     if($('span#webo_tag_auto')){
                                        c += '<br />' + $.la.console.cFormat('TAG_AUTO',$('span#webo_tag_auto').html());
                                     }
                            	return c;
                        	} else {
                        	
                        		var t = 'ml';
                                var st = get_S(t);
                                var ft = FT(t);
                                ft = ft.replace(st,'');
                                var sp = ft.split('?');
                                var cm_client = sp[0].replace('_v','');
                                var cm_niveau1 = $.la.utils.getKey('c',sp[1]);
                                var cm_niveau2 = $.la.utils.getKey('p',sp[1]);
                                var cm_niveau3 = $.la.utils.getKey('l3',sp[1]);
                                var cm_niveau4 = $.la.utils.getKey('l4',sp[1]);
                                var cm_serial = $('script[src*="http://prof.estat.com/js/"]').attr('src').replace('http://prof.estat.com/js/','').replace('.js','');

                                var c = $.la.console.cFormat('CM_SERIAL',cm_serial) +
                                $.la.console.cFormat('CM_CLIENT',cm_client) ;
                                c += '<br />' +
                                $.la.console.cFormat('CM_NIVEAU1',cm_niveau1) +
                                $.la.console.cFormat('CM_NIVEAU2',cm_niveau2) +
                                $.la.console.cFormat('CM_NIVEAU3',cm_niveau3) +
                                $.la.console.cFormat('CM_NIVEAU4',cm_niveau4);
                                if($('span#webo_tag_auto')){
                                    c += '<br />' + $.la.console.cFormat('TAG_AUTO',$('span#webo_tag_auto').html());
                                }
                                return c;
	                        }
                        }
                        catch(e){
                            return $.la.console.cFormat('ERROR',e.message);
                        }
                    }
                }
            }
        }
    });
})(jQuery);

