function toggleCustom(obj)
{

//shows hides (toggle) passed div
//used at comments list
$(obj).toggle( "slow");

}



function getAjaxOutput(url,obj)
{ 
$(obj).empty().append('<img src="#" class="ajaxLoading" /> Loading..'); 

$.ajax({type: "GET",
      url: url,     
      success: function(msg)
      { 
        $(obj).empty();     
        $(obj).append(msg);
        //alert(msg);
        
      },
      error: function(XReq, errs, errobj)
      {
        $(obj).empty();     
        $(obj).append("Oops..Error..");
      }
      }); 
}

 //scroll to top js
          $(function(){
           
            $(document).on( 'scroll', function(){
           
              if ($(window).scrollTop() > 100) {
                $('.scroll-top-wrapper').addClass('show');
              } else {
                $('.scroll-top-wrapper').removeClass('show');
              }
            });
          });
         
           
          $(function(){
           
            $(document).on( 'scroll', function(){
           
              if ($(window).scrollTop() > 100) {
                $('.scroll-top-wrapper').addClass('show');
              } else {
                $('.scroll-top-wrapper').removeClass('show');
              }
            });
           
            $('.scroll-top-wrapper').on('click', scrollToTop);
          });
           
          function scrollToTop() {
            verticalOffset = typeof(verticalOffset) != 'undefined' ? verticalOffset : 0;
            element = $('body');
            offset = element.offset();
            offsetTop = offset.top;
            $('html, body').animate({scrollTop: offsetTop}, 500, 'linear');
          }
          //end scroll to top js

function tagbottomSearch()
{ 
  
  var category = '1';
  var tag = document.getElementById('bottomsearchtags').value; 
  tag = tag.replace(' ','-');
  tag = tag.replace('%20','-');
  tag = tag.replace('.','-');   
  tag = tag.trim(); 
  window.location.href = "/tag/"+category+"/1/"+tag+".html";
  
}