var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
jQuery(document).ready(function($){

	window.cardcontainer = $('#card-container');
	window.cardnext = $('#card-next');
	window.cardprev = $('#card-prev');
	window.activepage = cardcontainer.attr('activepage');
	cardcontainer.animate({
		height: $('#cardpageid-' + window.activepage).height() + 40
	}, 0 );

	var marginLeft = ((window.activepage-1)*956)*-1;
	$('#card-slider').css("left",marginLeft);
	window.totalPages = $('.card-page').size();

	window.blockAnimation = false;
	$('#card-next, #card-prev').click(function(){
		direction = $(this).attr('id')
		
		if ( direction == 'card-next' ){
		if (window.activepage != window.totalPages){
			cardNavigation(false)
			}
		} else {
		if (window.activepage != 1){
			cardNavigation(true)
		}
		}
		return false
	});


});
 
function cardNavigation(prev){
	marginLeft = ((window.activepage-1)*950)*-1;
	if (window.blockAnimation == false) {
		window.blockAnimation = true;
		if ( prev == true ){
			window.activepage--;
		} else {
			window.activepage++;
		}	
		
		left = ( prev == true ) ? (marginLeft + 950) : (marginLeft - 950)
		$('#card-slider').fadeOut(400);
		$('#card-slider').animate({
			left: left
		}, 0, function(){
			
			window.blockAnimation = false;
			
		});
		$('#card-slider').fadeIn(400);
		window.cardcontainer.attr('activepage', window.activepage).animate({
			height: $('#cardpageid-' + window.activepage).height() + 40
		}, 400 );
	}
}
}