change input class
<p>I need jquery script that wiil add class when my input type="text" is active and when it isn't remeve new added class (back to default)</p>

<pre><code>$("#search_text").click(function() {
    $(this).removeClass('search').addClass('search_active');
    $('#search_icon').removeClass('search_icon').addClass('search_icon_active');
});
</code></pre>

<p>now this script only add new class , but when cursor (input) is not active it do not back to default .search</p>
