(function($){jQuery.fn.ocultar_tabs=function(){$(".tab_content").hide();$("ul.tabs li:first").addClass("active").show();$(".tab_content:first").show();$("ul.tabs li").click(function(){$("ul.tabs li").removeClass("active");$(this).addClass("active");$(".tab_content").hide();var activeTab=$(this).find("a").attr("href");activeTab=activeTab.split("#");$('#'+activeTab[1]).fadeIn();return false;});}
jQuery.fn.gf_curva_rendimiento=function(){ 	$('#elem01').addClass('activo'); $('#elem02').removeClass('activo');$('#elem03').removeClass('activo');$('#elem04').removeClass('activo');$('#elem05').removeClass('activo'); $(".tabs-actividad-bursatil").html("<div style='margin:auto; width:150px; height:50px; border: solid 1px #CCC;'><img src='images/others/procesando.gif'></div>");$(".tabs-actividad-bursatil").load("index.php?action=gf_curva_rendimiento&flw=on",function(response,status,xhr){if(status=="error"){var msg="Lo Sentimos hubo un error prueba: ";$(".tabs-actividad-bursatil").html(msg+xhr.status+" "+xhr.statusText);}else{$('.tabs-actividad-bursatil').ocultar_tabs();}});}
jQuery.fn.gf_curva_historicos=function(){$(".tabs-actividad-bursatil").html("<div style='margin:auto; width:150px; height:50px; border: solid 1px #CCC;'><img src='images/others/procesando.gif'></div>");$(".tabs-actividad-bursatil").load("index.php?action=gf_curva_historicos&flw=on",function(response,status,xhr){if(status=="error"){var msg="Lo Sentimos hubo un error: ";$(".tabs-actividad-bursatil").html(msg+xhr.status+" "+xhr.statusText);}else{$('.tabs-actividad-bursatil').ocultar_tabs();}});}
jQuery.fn.gf_precio_acciones=function(){$('#elem01').removeClass('activo'); $('#elem02').addClass('activo');$('#elem03').removeClass('activo');$('#elem04').removeClass('activo');$('#elem05').removeClass('activo');$(".tabs-actividad-bursatil").html("<div style='margin:auto; width:150px; height:50px; border: solid 1px #CCC;'><img src='images/others/procesando.gif'></div>");$(".tabs-actividad-bursatil").load("index.php?action=gf_precio_acciones #cargador",function(response,status,xhr){if(status=="error"){var msg="Lo Sentimos hubo un error: ";$(".tabs-actividad-bursatil").html(msg+xhr.status+" "+xhr.statusText);}else{$('.tabs-actividad-bursatil').ocultar_tabs();}});}
jQuery.fn.gf_promedio_mensual_negociacion=function(){$('#elem01').removeClass('activo'); $('#elem02').removeClass('activo');$('#elem03').addClass('activo');$('#elem04').removeClass('activo');$('#elem05').removeClass('activo');$(".tabs-actividad-bursatil").html("<div style='margin:auto; width:150px; height:50px; border: solid 1px #CCC;'><img src='images/others/procesando.gif'></div>");$(".tabs-actividad-bursatil").load("index.php?action=gf_promedio_mensual_negociacion #cargador",function(response,status,xhr){if(status=="error"){var msg="Lo Sentimos hubo un error: ";$(".tabs-actividad-bursatil").html(msg+xhr.status+" "+xhr.statusText);}else{$('.tabs-actividad-bursatil').ocultar_tabs();}});}
jQuery.fn.gf_puesto_bolsa_comprador=function(){$('#elem01').removeClass('activo'); $('#elem02').removeClass('activo');$('#elem03').removeClass('activo');$('#elem04').addClass('activo');$('#elem05').removeClass('activo');$(".tabs-actividad-bursatil").html("<div style='margin:auto; width:150px; height:50px; border: solid 1px #CCC;'><img src='images/others/procesando.gif'></div>");$(".tabs-actividad-bursatil").load("index.php?action=gf_puesto_bolsa_comprador #cargador",function(response,status,xhr){if(status=="error"){var msg="Lo Sentimos hubo un error: ";$(".tabs-actividad-bursatil").html(msg+xhr.status+" "+xhr.statusText);}else{$('.tabs-actividad-bursatil').ocultar_tabs();}});}
jQuery.fn.gf_puesto_bolsa_vendedor=function(){$('#elem01').removeClass('activo'); $('#elem02').removeClass('activo');$('#elem03').removeClass('activo');$('#elem04').removeClass('activo');$('#elem05').addClass('activo');$(".tabs-actividad-bursatil").html("<div style='margin:auto; width:150px; height:50px; border: solid 1px #CCC;'><img src='images/others/procesando.gif'></div>");$(".tabs-actividad-bursatil").load("index.php?action=gf_puesto_bolsa_vendedor #cargador",function(response,status,xhr){if(status=="error"){var msg="Lo Sentimos hubo un error: ";$(".tabs-actividad-bursatil").html(msg+xhr.status+" "+xhr.statusText);}else{$('.tabs-actividad-bursatil').ocultar_tabs();}});}})(jQuery);
