$(function(){$("#usuario").focus();$("span.loading_wn").hide();$("span.loading_wn").ajaxStart(function(){$(this).show();});$("span.loading_wn").ajaxStop(function(){$(this).hide();});var count_wn=[];var count_click=1;var url_wn="/wordnews/json/";$.ajax({type:"GET",url:url_wn,dataType:"json",success:function(response){$("#letreiro_wn").html(response[count_click].fields["provider"]+" - "+response[count_click].fields["words"]);$("#link_letreiro_wn").attr("href",response[count_click].fields["link"]);for(var i=0;i<response.length;i++){count_wn[i]=response[i];}}});$("a.btn_letreiro_proximo").bind("click",function(e){e.preventDefault();count_click++;if(count_wn.length&&count_click<count_wn.length){$.ajax({type:"GET",url:url_wn,dataType:"json",success:function(response){$("#letreiro_wn").html(response[count_click].fields["provider"]+" - "+response[count_click].fields["words"]);$("#link_letreiro_wn").attr("href",response[count_click].fields["link"]);}});if(count_click==count_wn.length-1){$("a.btn_letreiro_proximo").css("background","transparent url('/static/core/img/topo_letreiro_btn_active_skin2.png') no-repeat top left");}else{$("a.btn_letreiro_anterior").removeAttr("style");}}else{count_click=count_wn.length-1}});$("a.btn_letreiro_anterior").bind("click",function(e){e.preventDefault();count_click--;if(count_wn.length&&count_click>-1){$.ajax({type:"GET",url:url_wn,dataType:"json",success:function(response){$("#letreiro_wn").html(response[count_click].fields["provider"]+" - "+response[count_click].fields["words"]);$("#link_letreiro_wn").attr("href",response[count_click].fields["link"]);}});if(count_click==0){$("a.btn_letreiro_anterior").css("background","transparent url('/static/core/img/topo_letreiro_btn_active.png') no-repeat top left");}else{$("a.btn_letreiro_proximo").removeAttr("style");}}else{count_click=0}});$('#slider').nivoSlider({effect:'fade',pauseTime:8000,startSlide:7});$('#partners').cycle({fx:'fade',timeout:10000,pause:1,random:1});$(".link_esqueci_suporte").colorbox({width:"530px",height:"200px",iframe:true});});
