$(document).ready(function(){


        $(function(){
     
        $("#fb_slider").css("right","-321px");
         
        $("#fb_slider").hover(
          function () {
            $("#fb_slider").animate({right: "0px"}, 1000 );
                $(this).addClass("close");
          },
          function () {
            $("#fb_slider").animate({right: "-321px"}, 1000 );
                $(this).removeClass("close");
          }
        );
        });

// usuwa kropkowane obramowanie dookola linkow
    $("a").attr({onfocus: "blur()"});
    $("div").attr({onfocus: "blur()"});

// klasy dla inputow
    $('input[type=text]').addClass('textInput');
    $('input[type=checkbox]').addClass('checkbox');
    $('input[type=submit]').addClass('submit');
    $('input[type=button]').addClass('inputButton');
    $('input[type=radio]').addClass('radio');
    $('textarea').addClass('textarea');
    $('select').addClass('select');

// input hover
    $('input[type=submit]').hover (
            function(){ $(this).addClass('hover');},
            function(){ $(this).removeClass('hover');}
    );
    $('input[type=button]').hover (
            function(){ $(this).addClass('hover');},
            function(){ $(this).removeClass('hover');}
    );

    function delContactVal(obj){
        try {
            if ($(obj).val() == $('.offer_search label[for=id_text]').text()) {
                $(obj).val('');
                $(obj).removeClass('empty');
            }
        }
        catch (e) {
        }
   }

    function reContactVal(obj){
        try {
            if ($(obj).val() == '') {
                $(obj).val($('.offer_search label[for=id_text]').text());
                $(obj).addClass('empty');
            }
        }
        catch (e) {
        }
    }
    $('.offer_search form').submit(function(){

        $('input', $(this)).each(function(){
            if( $(this).hasClass('empty')){
                $(this).val('');
            }
        });

        return true;
    });
});

