        jQuery.fn.toggleText = function(a, b) {
            return this.html(this.html().replace(new RegExp("(" + a + "|" + b + ")"),
	        function(x) { return (x == a) ? b : a; }));
        }
        $(document).ready(function() {
            $('.j-helper-toggle').click(function(e) {
                e.preventDefault();
                $(this).toggleText('Убрать справку', 'Показать справку');
            });
        });

$(document).ready(function() {


	
	
	$(".search-input")
   .focus(function(){
      $(this).css("color", "black");
      if ($(this).val() == "Поиск по каталогу") {
         $(this).val("");
      }
   })
   .blur(function(){
   	 $(this).css("color", "#6E6E6E");
      if ($(this).val() == "") {
         $(this).val("Поиск по каталогу");
      }
   });
	
	
$('.j-helper-toggle').click(function() {
$('.helper-toggled').toggle('fast');
	return false;
		
});



	
	

		
	
});
function cookieSet(index) {
	$.cookie('submenuMark-' + index, 'opened', {expires: null, path: '/'}); // Set mark to cookie (submenu is shown):
}
function cookieDel(index) {
	$.cookie('submenuMark-' + index, null, {expires: null, path: '/'}); // Delete mark from cookie (submenu is hidden):
}

      $(function(){
				$("#accordion").accordion({ 

        event: "mouseover",
        autoHeight: false,
        active:false
        });
			});
