$(
    function(){
        $('.parent').hover(
            function(){
                $(this).find('ul.submenu').removeClass('hide');
                $(this).find('a').not('.submenu a').addClass('showchilds');
            },
            function(){
                $(this).find('ul.submenu').addClass('hide');
                $(this).find('a').not('.submenu a').removeClass('showchilds');
            }
        );
        
        $('.clicktabs a').click(
            function(){
                $('#tabbedtabs li.selected').removeClass('selected');
                $('#tabbed .tabcontent').addClass('hide');
                
                $this = $(this);
                $this.parent().addClass('selected');
                $('#tabbed #' + $this.attr('rel')).removeClass('hide');
                return false;
            }  
        );
        $('#buscar, #email, #stxt').bind("focus",function(){$(this).val("");});
        $('#buscar').bind("blur",function(){if($(this).val() == "")$(this).val("BUSCAR");});
        $('#email').bind("blur",function(){if($(this).val() == "")$(this).val("EMAIL");});
        $('#stxt').bind("blur",function(){if($(this).val() == "")$(this).val("PALAVRA CHAVE");});
        $('.wp-caption img').each(function(){
            $this = $(this)
            thisCredit = ""
            if($this.attr('alt') != '')
                thisCredit = $this.attr('alt');
            if($this.attr('title') != '')
                thisCredit = $this.attr('title');
            if(thisCredit != '')
                $(this).parent().parent().prepend('<span class="wp-title">' + thisCredit + '</span>');
        })
    }
);
