function justSearch(str)
{
    document.location = '/search/' + str;
    return false;
}
$(document).ready(
    function()
    {
       // $("a[@href^='http:']").css('color', 'rgb(47, 130, 213)');
       // $("a[@href^='http://www.softdreams.ru']").css('color', 'rgb(0, 153, 51); ');
	    $('#container').append('<div id="tooltip"></div>');
        $('#tooltip').hide();
        $('area').removeAttr('alt');
        $('area').removeAttr('title');
        $('area').mousemove(
            function(event)
            {
               switch($(this).attr('id'))
                {
                    case 'a1': alt = 'Контактная информация'; break;
                    case 'a2': alt = 'О команде Softdreams'; break;
                    case 'a3': alt = 'Хостинг'; break;
                    case 'a4': alt = 'Web дизайн'; break;
                    case 'a5': alt = 'Архив работ'; break;
                    case 'a6': alt = 'Главная страница'; break;
                    case 'a7': alt = 'Мусор'; break;
                    case 'a8': alt = 'Интересное'; break;
                }
                //alt = event.attr('title');
                $('#tooltip').fadeIn('fast');
                $('#tooltip').text(alt);
                $('#tooltip').css('left', event.pageX+20);
                $('#tooltip').css('top', event.pageY+20);
            }
        );
        $('area').mouseout(
            function()
            {
                $('#tooltip').hide();
            }
        );
        $('#container').mouseout(
            function()
            {
                $('#tooltip').hide();
            }
        );
        $('#login').focus(
            function()
            {
                str = $('#login').val();
                if (str == 'Логин')
                {
                    $('#login').val('');
                }
            }
        );
        $('#login').blur(
            function()
            {
                str = $('#login').val();
                if (str == '')
                {
                    $('#login').val('Логин');
                }
            }
        );
        $('#password').focus(
            function()
            {
                str = $('#password').val();
                if (str == 'Пароль')
                {
                    $('#password').val('');
                }
            }
        );
        $('#password').blur(
            function()
            {
                str = $('#password').val();
                if (str == '')
                {
                    $('#password').val('Пароль');
                }
            }
        );
        $('#searchQuery').focus(
            function()
            {
                str = $('#searchQuery').val();
                if (str == 'Текст поиска')
                {
                    $('#searchQuery').val('');
                }
            }
        );
        $('#searchQuery').blur(
            function()
            {
                str = $('#searchQuery').val();
                if (str == '')
                {
                    $('#searchQuery').val('Текст поиска');
                }
            }
        );

        $('#babochka').click(function()
        {
            $.getJSON('/xhr/test/', function(data)
            {
                $('#flybutter').html(data.html);
            });
        });

    }
);


