$().ready(function() { $('.include').find('div[id^="aunDiv"]').css("z-index","9"); /*V Ellip for IE*/ if( !$.browser.mozilla ) { $( '.noticias_list li' ).addClass( 'llip' ); } /* Custom menu triggers */ set_submenu_triggers(); /*Modal*/ $(".cadastro").fancybox({ 'autoDimensions' : false, 'width' : 890, 'height' : 390, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe' }); $(".login").fancybox({ 'autoDimensions' : false, 'width' : 890, 'height' : 260, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe' }); $(".contato_modal").fancybox({ 'autoDimensions' : false, 'width' : 705, 'height' : 430, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe' }); $(".revista_modal").fancybox({ 'autoDimensions' : false, 'width' : 935, 'height' : 748, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe' }); $(".various3").fancybox({ 'width' : 482, 'height' : 400, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe' }); /*FIM DO Modal*/ /*Bordas Seções*/ $('.borda_roxa_hover').hover( function(){ $(".borda_roxa").css('border-color', '#eec4f1'); }, function(){ $(".borda_roxa").css('border-color', '#c873b3'); } ); /* Value hide */ $( "input,textarea" ).focus( hide_label ); $( "input,textarea" ).focusout( show_label ); function hide_label() { if( $( this ).val() == $( this ).attr( "defaultValue" ) ) $( this ).val( "" ); } function show_label() { if( $( this ).val().replace( /\s+/g, "" ) == "" ) $( this ).val( $( this ).attr( "defaultValue" ) ); } /* $().find('.play').each(function(){ var i; i = 0; div_class = "play" + i; $('.gente_tv_play').hover( function(){ $('.' + div_class).css("display", "block"); }, function(){ $('.' + div_class).css("display", "none"); } ); }); */ $('.gente_tv_play').hover( function(){ var play; play = $( this )[ 0 ].children[ 1 ].children[ 2 ]; $( play ).css('display', 'block' ); }, function(){ var play; play = $( this )[ 0 ].children[ 1 ].children[ 2 ]; $( play ).css('display', 'none' ); } ); $('.borda_azul_hover').hover( function(){ $(".borda_azul").css('border-color', '#b4c3ec'); }, function(){ $(".borda_azul").css('border-color', '#8094c7'); } ); $('.borda_verde_hover').hover( function(){ $(".borda_verde").css('border-color', '#b1e6ae'); }, function(){ $(".borda_verde").css('border-color', '#82bc76'); } ); $('.borda_laranja_hover').hover( function(){ $(".borda_laranja").css('border-color', '#f1b584'); }, function(){ $(".borda_laranja").css('border-color', '#dd8b48'); } ); $('.borda_dourado_hover').hover( function(){ $(".borda_dourado").css('border-color', '#eacb90'); }, function(){ $(".borda_dourado").css('border-color', '#d6b26f'); } ); $('.borda_marrom_hover1').hover( function(){ $(".borda_marrom1").css('border-color', '#cdc9bd'); }, function(){ $(".borda_marrom1").css('border-color', '#b2ac9a'); } ); $('.borda_marrom_hover2').hover( function(){ $(".borda_marrom2").css('border-color', '#cdc9bd'); }, function(){ $(".borda_marrom2").css('border-color', '#b2ac9a'); } ); /*FIM DAS Bordas Seções*/ var line_length = $('.chamada_noticia_line').length; for(i = 0; i <= line_length; i++ ) { $('#line' + i).equalHeights(); } /*TABS*/ $('#tabs_radiovideo').tabs({ fxFade: true }); $('#lastnews').tabs({ fxFade: true }); $('#last_news_titles a').click(function(){ window.location = url_title; }); /*FIM DAS TABS*/ /*Animação do TOOLTIP*/ $(".menu_tooltip").tipTip(); /*FIM DA Animação do TOOLTIP*/ /*Animação da REVISTA*/ $('.zoomin').click(function(){ $('.capa_zoom').fadeIn(); }); $('.zoomout').click(function(){ $('.capa_zoom').fadeOut(); }); /*FIM DA Animação da REVISTA*/ /*Animação do SEARCH*/ $('.menu_prin_1').click(function(){ BuscaToggle(); return false; }); /* $('body').click(function(){ BuscaToggle(true); return false; }); */ $('.input_button').click(function(){ getResults(''); return false; }); /*FIM DA Animação do SEARCH*/ /*Galeria Principal*/ $("#myController").jTimed({ slides: "#slides", width: "580px", height: "290px", duration: 250 }); /*FIM DA Galeria Principal*/ /*Galeria Principal*/ $("#myController2").jFlow({ slides: "#mySlides", width: "340px", height: "560px", duration: 350 }); /*FIM DA Galeria Principal*/ if ($('.anythingSlider').length) { $('.anythingSlider').anythingSlider({ easing: "easeInOutExpo", // Anything other than "linear" or "swing" requires the easing plugin autoPlay: false, // This turns off the entire FUNCTIONALY, not just if it starts running or not. delay: 3000, // How long between slide transitions in AutoPlay mode startStopped: false, // If autoPlay is on, this can force it to start stopped animationTime: 600, // How long the slide transition takes hashTags: false, // Should links change the hashtag in the URL? buildNavigation: false, // If true, builds and list of anchor links to link to each slide pauseOnHover: true // If true, and autoPlay is enabled, the show will pause on hover }); } $('#last_news_titles a').css( {backgroundPosition: "0 0"} ); $('#tab_ultimas').click(function(){ $('#last_news_titles a').removeClass('tab_melhores_veja_mais tab_comentadas_veja_mais tab_vistas_veja_mais').addClass('tab_ultimas_veja_mais'); $('#last_news_titles a').attr('href', 'http://istoegente.terra.com.br/noticias/'); $('#tab_ultimas').addClass('tabs-selected'); //$('#tab_comentadas').removeClass('tabs-selected'); $('#tab_melhores').removeClass('tabs-selected'); $('#tab_vistas').removeClass('tabs-selected'); $('#lastnews').css('background-color' , 'transparent'); $('#last_news_titles a').animate({backgroundPosition:"(0px 0px)"}, {duration:300}); $('.tab_ultimas_veja_mais').hover( function(){ $(this).css({backgroundPosition: "0px -36px"}); }, function(){ $(this).css({backgroundPosition: "0px 0px"}); } ); }) /* $('#tab_comentadas').click(function(){ $('#last_news_titles a').removeClass('tab_ultimas_veja_mais tab_melhores_veja_mais tab_vistas_veja_mais').addClass('tab_comentadas_veja_mais'); $('#last_news_titles a').attr('href', 'http://istoegente.terra.com.br/noticias/?f=comentadas'); $('#tab_comentadas').addClass('tabs-selected'); $('#tab_ultimas').removeClass('tabs-selected'); $('#tab_melhores').removeClass('tabs-selected'); $('#tab_vistas').removeClass('tabs-selected'); $('#lastnews').css('background-color' , 'transparent'); $('#last_news_titles a').animate({backgroundPosition:"(-342px 0px)"}, {duration:300}); $('.tab_comentadas_veja_mais').hover( function(){ $(this).css({backgroundPosition: "-342px -36px"}); }, function(){ $(this).css({backgroundPosition: "-342px 0px"}); } ); }) */ $('#tab_melhores').click(function(){ $('#last_news_titles a').removeClass('tab_ultimas_veja_mais tab_comentadas_veja_mais tab_vistas_veja_mais').addClass('tab_melhores_veja_mais'); $('#last_news_titles a').attr('href', 'http://istoegente.terra.com.br/noticias/?f=votadas'); $('#tab_melhores').addClass('tabs-selected'); //$('#tab_comentadas').removeClass('tabs-selected'); $('#tab_ultimas').removeClass('tabs-selected'); $('#tab_vistas').removeClass('tabs-selected'); $('#lastnews').css('background-color' , 'transparent') $('#last_news_titles a').animate({backgroundPosition:"(-342px 0px)"}, {duration:300}); $('.tab_melhores_veja_mais').hover( function(){ $(this).css({backgroundPosition: "-342px -36px"}); }, function(){ $(this).css({backgroundPosition: "-342px 0px"}); } ); }) $('#tab_vistas').click(function(){ $('#last_news_titles a').removeClass('tab_ultimas_veja_mais tab_comentadas_veja_mais tab_melhores_veja_mais').addClass('tab_vistas_veja_mais'); $('#last_news_titles a').attr('href', 'http://istoegente.terra.com.br/noticias/?f=vistas'); $('#tab_vistas').addClass('tabs-selected'); //$('#tab_comentadas').removeClass('tabs-selected'); $('#tab_ultimas').removeClass('tabs-selected'); $('#tab_melhores').removeClass('tabs-selected'); $('#lastnews').css('background-color' , 'transparent') $('#last_news_titles a').animate({backgroundPosition:"(-172px 0px)"}, {duration:300}); $('.tab_vistas_veja_mais').hover( function(){ $(this).css({backgroundPosition: "-172px -36px"}); }, function(){ $(this).css({backgroundPosition: "-172px 0px"}); } ); }) }); function ResultadoToggle(s, prefix) { var error_msg = '

Sua busca por “' + s + '” não obteve resultados. Tente novamente.

' $('.' + prefix + 'erro').html(error_msg); $('.' + prefix + 'erro').slideDown('fast'); } function getResults(prefix) { var s = $('.' + prefix + 'input_buscar').val(); $.get('http://istoegente.terra.com.br/wp-content/themes/istoe-gente/ajax/search_count.php?s=' + s, function(data){ var feedback = $.evalJSON(data); if(feedback.status == false) { ResultadoToggle(feedback.s, prefix); } else { location = "http://istoegente.terra.com.br/?s=" + feedback.s; } }); } function BuscaToggle(menu) { if ($('.search').is(':visible') || menu) { if($('.erro').is(':visible')){ $('.erro').slideUp('fast', function() { $('.search').slideUp('fast', function() { $('.menu_prin_1 a').removeClass('ativo'); }); }) } else{ $('.search').slideUp('fast', function() { $('.menu_prin_1 a').removeClass('ativo'); }); } } else { $('.menu_prin_1 a').addClass('ativo'); $('.search').slideDown('fast'); } } function formatText(index, panel) { return index + ""; } (function($) { if(!document.defaultView || !document.defaultView.getComputedStyle){ // IE6-IE8 var oldCurCSS = jQuery.curCSS; jQuery.curCSS = function(elem, name, force){ if(name === 'background-position'){ name = 'backgroundPosition'; } if(name !== 'backgroundPosition' || !elem.currentStyle || elem.currentStyle[ name ]){ return oldCurCSS.apply(this, arguments); } var style = elem.style; if ( !force && style && style[ name ] ){ return style[ name ]; } return oldCurCSS(elem, 'backgroundPositionX', force) +' '+ oldCurCSS(elem, 'backgroundPositionY', force); }; } var oldAnim = $.fn.animate; $.fn.animate = function(prop){ if('background-position' in prop){ prop.backgroundPosition = prop['background-position']; delete prop['background-position']; } if('backgroundPosition' in prop){ prop.backgroundPosition = '('+ prop.backgroundPosition; } return oldAnim.apply(this, arguments); }; function toArray(strg){ strg = strg.replace(/left|top/g,'0px'); strg = strg.replace(/right|bottom/g,'100%'); strg = strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2"); var res = strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/); return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]]; } $.fx.step. backgroundPosition = function(fx) { if (!fx.bgPosReady) { var start = $.curCSS(fx.elem,'backgroundPosition'); if(!start){//FF2 no inline-style fallback start = '0px 0px'; } start = toArray(start); fx.start = [start[0],start[2]]; var end = toArray(fx.options.curAnim.backgroundPosition); fx.end = [end[0],end[2]]; fx.unit = [end[1],end[3]]; fx.bgPosReady = true; } //return; var nowPosX = []; nowPosX[0] = ((fx.end[0] - fx.start[0]) * fx.pos) + fx.start[0] + fx.unit[0]; nowPosX[1] = ((fx.end[1] - fx.start[1]) * fx.pos) + fx.start[1] + fx.unit[1]; fx.elem.style.backgroundPosition = nowPosX[0]+' '+nowPosX[1]; }; })(jQuery);