$(function()
{
    //-----------------------------:Google Analytics
      var _gaq = _gaq || [];
     _gaq.push(['_setAccount', 'UA-21345595-2']);
     _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    $.blockMSIE(6);

        /*function resize()
        {

            var w   =$("body").width();
            if(w>1200)
            {
                $("#main").css('width','1200px');
                $("#main-right").css({'display':'block','position':'fixed','right':'2px'});
            } else {
                $("#main").css('width','995px');
                $("#main-right").css('display','none');
            }
        }

        //resize();

        $(window).bind('resize', function(){ resize(); });*/

        $("#busca-text").focus(
        function(){
            if($(this).val()=='Pesquisar' || $(this).val().length<3)
            {
                $(this).val('');
                $(this).css('color','#666');
            }
        }).blur(
        function(){
            if($(this).val()=='Pesquisar' || $(this).val().length<3)
            {
                $(this).val('Pesquisar');
                $(this).css('color','#ccc');
            }
        });
           $("#fonecidade").click(
   function(){

       var str = $("#busca-text").val();
       var url = "http://www.fonecidade.com.br/search?s="+str;
       if(str.length==0 || str=='Pesquisar'){
           alert("Pesquisa Inválida!");
       }else{
       window.open(url);}
   });
   $("#buscaSite").click(
   function(){
       var str = $("#busca-text").val();
       if(str.length==0 || str=='Pesquisar'){
           alert("Busca Inválida!");
       }else{
       window.location='http://www.grupoarinos.com.br/busca?search='+str;
    }
   });
});

