// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
// jQuery.noConflict() 

jQuery.ajaxSetup({ 
  'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")}
})

jQuery.fn.submitWithAjax = function() {
  this.submit(function() {
    $.post(this.action, $(this).serialize(), null, "script");
    return false; 
  })
};

$(document).ready(function() {
  $("#new_comment").submitWithAjax();
})



//innerfade
$(document).ready(
function(){
	$('#fading_header').innerfade({
		animationtype: 'fade',
		speed: 2000,
		timeout: 4000,
		type: 'random'
	});
	
	$('#fading_header_order').innerfade({
		animationtype: 'fade',
		speed: 2000,
		timeout: 4000,
	});
});