/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
jQuery.fn.blink = function(){
  $(this).css('border-color', 'red');
  $(this).fadeOut().fadeIn().fadeOut().fadeIn();
}

$(document).ready(function(){
  $('.flash_box').click(function(){
    $(this).fadeOut();
  });
})

function shoutSubmit(url){
  //$('#shout').disable();
  $.ajax({
    url:url,
    data:{message:$('#shout').val()},
    success: function(data){
      $('ul.shouts').html(data)
    }
  })
  return false;
}

function ajaxPaginatorCall(update, url){
  $.ajax({
    url:url,
    success:function(msg){
      $(update).html(msg)
    }
  })
}

$(document).ready(function(){
  if ($('#sideBox')){
    var startPos = $('#sideBox').offset().top;
    $(window).scroll(function(e){
      if ($(window).scrollTop() > startPos){
        $('#sideBox').css({
          position:'fixed',
          top: 10,
          width: $('#sideBox').width()
        })
      }else{
        $('#sideBox').css({
          position:'relative'
        })
      }
    })
  }
})
