// Use this file to add javascript functions which will be available to all the site



function mycarousel_initCallback(carousel) {
    jQuery('#block-views-carousel-block_2 span.field-content a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).attr("menuid")));
        jQuery('#block-views-carousel-block_2 span.field-content a.selected').toggleClass('selected');
        $(this).toggleClass('selected');
        return false;
    });
}

jQuery.easing['BounceEaseOut'] = function(p, t, b, c, d) {
	if ((t/=d) < (1/2.75)) {
		return c*(7.5625*t*t) + b;
	} else if (t < (2/2.75)) {
		return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
	} else if (t < (2.5/2.75)) {
		return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
	} else {
		return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
	}
};


/**
 * Hide the apply button on filters and reload with ajax on select box changes
 * Silios 22 Feb 2011
 */
/*
Drupal.behaviors.bef_live_filter = function(context) {
  // Hide the apply button.
  $('.views-exposed-form input:submit',context).hide();

  // When the change event fires, run the submit handler
  $('.views-exposed-form select').change(function() {
    $(this).parents('form').submit();
  }); 
}
*/
