jQuery.fn.anchorAnimate = function(settings) {

 	settings = jQuery.extend({
		speed : 1100
	}, settings);	
	
	return this.each(function(){
		var caller = this;
		$(caller).click(function (event) {	
			event.preventDefault();
			var locationHref = window.location.href;
			var elementClick = $(caller).attr("href");
			var destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
				window.location.hash = elementClick;
			});
		  	return false;
		});
	});
};
$(document).ready(function() {
	$('#allreadmore').hide();
	$('#alladvantage').hide();

	$('.showreadmore').click(function () {
	    $('#allreadmore').toggle();
	    $('#alladvantage').hide();
	    return false;
	}); ;

	$('.showadvantage').click(function () {
	    $('#alladvantage').toggle();
	    $('#allreadmore').hide();
		return false;
	});;

	$("a.anchorLink").anchorAnimate();					
	
	$('.lightboxlink').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200,
		'width' : 710
	});

$('.lightboxlinkfade').fancybox({
		'speedIn'		:	600, 
		'speedOut'		:	200
	});	

	$('.lightboxlinkvideo').fancybox({
		'speedIn'		:	600, 
		'speedOut'		:	200,
		'padding-left' :		40,
		'margin' : 0,
		'padding' : 0
	});		

});


$(function() {
	$("input[name='bonus']").change(function() {

		$('table').hide();
		$('.recipt').hide();

		for (var i = 0; i < 25; i++) {
			if ($("input[name='bonus']:checked").val() == i) {
				$('#recipt'+i).show();
				$('.recipt').fadeIn(1200);
			}
		}
	});
});

