jQuery.fn.extend({
  scrollTo : function(speed, easing) {
    return this.each(function() {
      var targetOffset = $(this).offset().top-40;
      $('html,body').animate({scrollTop: targetOffset}, speed, easing);
    });
  }
});


$(document).ready(function(){
		$(".newcommentTrigger").livequery(function(){
				$(this).click(function(){
					$('.newcommentContent').slideToggle('500');
					$('.newcommentContent').scrollTo('1500',"easeOutBounce");
				});
		});
		$(".showRateForm").livequery(function(){
				$(this).click(function(){
						
						$('.rateForm').slideToggle('500');
						
				});
	
		});
		$('.auto-submit-star').rating({
				split:2,
				callback: function(value,link){
					this.form.submit();
				}

		});
		
		$('a.galery').lightBox({
	
	imageLoading: '/public/images/lightbox-ico-loading.gif',
	imageBtnClose: '/public/images/lightbox-btn-close.gif',
	imageBtnPrev: '/public/images/lightbox-btn-prev.gif',
	imageBtnNext: '/public/images/lightbox-btn-next.gif',
	containerResizeSpeed: 350

   });
		
});
