jQuery(document).ready(function() {
								
	
	//	PAYPAL FUNCTIONS
	$("#enchantmentBen").click(function () { 
		$("#sponserLvl").val("Enchantment Benefactor");
		$("#paypalSbm").submit();
    });
	$("#starBen").click(function () { 
		$("#sponserLvl").val("Star Benefactor");
		$("#paypalSbm").submit();
    });
	$("#angelBen").click(function () { 
		$("#sponserLvl").val("Angel Benefactor");
		$("#paypalSbm").submit();
    });
	$("#hollyBen").click(function () { 
		$("#sponserLvl").val("Holly Benefactor");
		$("#paypalSbm").submit();
    });
	$("#bellBen").click(function () { 
		$("#sponserLvl").val("Silver Bell Benefactor");
		$("#paypalSbm").submit();
    });
	$("#treeSpn").click(function () { 
		$("#sponserLvl").val("Tree Sponsor");
		$("#paypalSbm").submit();
    });
	$("#wreathSpn").click(function () { 
		$("#sponserLvl").val("Wreath Sponsor");
		$("#paypalSbm").submit();
    });
	
			
   jQuery("#mycarousel").jcarousel({
        scroll: 1,
        initCallback: mycarousel_initCallback,
        // This tells jCarousel NOT to autobuild prev/next buttons
		visible: 1,
		auto: 7,
		wrap: 'last',
		animation: 700,
		buttonNextHTML: null, //hides default next button
		buttonPrevHTML: null, //hides default prev button
		//itemFirstInCallback:feature_handle_prev_disable,
		itemVisibleInCallback:{onBeforeAnimation:mycarousel_itemVisibleInCallbackBeforeAnimation} //sends current slide to a method
    });

$('#wreathSpn').qtip({
   content: {
		text: '<h2>Wreath Sponsor</h2><p>Professionally decorated thirty-six-inch wreath honoring you as the donor, auctioned during Marillac\'s Enchanted Forest event.</p>'
	   },
   show: 'mouseover',
   hide: 'mouseout',
   position: {
      corner: {
         target: 'leftMiddle',
         tooltip: 'rightMiddle'
      }
   },
   style: { 
      name: 'light', // Inherit from preset style
	  width: { max: 450 }
   }
})

$('#treeSpn').qtip({
   content: {
		text: '<h2>Tree Sponsor</h2><p>Professionally decorated six-foot tree honoring you as the donor, auctioned during Marillac\'s Enchanted Forest event.<p>'
	   },
   show: 'mouseover',
   hide: 'mouseout',
   position: {
      corner: {
         target: 'leftMiddle',
         tooltip: 'rightMiddle'
      }
   },
   style: { 
      name: 'light', // Inherit from preset style
	  width: { max: 450 }
   }
})

$('#bellBen').qtip({
   content: {
		text: '<h2>Silver Bell Benefactor</h2><ul><li>Two complimentary seats</li><li>Two drink tickets per person</li><li>Eighth-page advertisement in event program</li><li>Name on "Thank you to our sponsors" advertisement in 435 South Magazine</li><li>Name on Marillac (marillac.org) and Enchanted Evening (enchantedeveningkc.com) websites</li></ul>'
	   },
   show: 'mouseover',
   hide: 'mouseout',
   position: {
      corner: {
         target: 'leftMiddle',
         tooltip: 'rightMiddle'
      }
   },
   style: { 
      name: 'light', // Inherit from preset style
	  width: { max: 450 }
   }
})
      


   $('#hollyBen').qtip({
   content: {
		text: '<h2>Holly Benefactor</h2><ul><li>Six complimentary seats</li><li>Two drink tickets per person</li><li>Quarter-page advertisement in event program</li><li>Name on "Thank you to our sponsors" advertisement in 435 South Magazine</li><li>Name on Marillac (marillac.org) and Enchanted Evening (enchantedeveningkc.com) websites</li></ul>'
	   },
   show: 'mouseover',
   hide: 'mouseout',
   position: {
      corner: {
         target: 'leftMiddle',
         tooltip: 'rightMiddle'
      }
   },
   style: { 
      name: 'light', // Inherit from preset style
	  width: { max: 450 }
   }
})
      

   $('#angelBen').qtip({
   content: {
		text: '<h2>Angel Benefactor</h2><ul><li>One table of ten seats</li><li>Two complimentary bottles of wine</li><li>Two drink tickets per person</li><li>Quarter-page advertisement in event program</li><li>Name on "Thank you to our sponsors" advertisement in 435 South Magazine</li><li>Logo on Marillac (marillac.org) and Enchanted Evening (enchantedeveningkc.com) websites, plus a link to yourcompany\'s website</li></ul>'
	   },
   show: 'mouseover',
   hide: 'mouseout',
   position: {
      corner: {
         target: 'leftMiddle',
         tooltip: 'rightMiddle'
      }
   },
   style: { 
      name: 'light', // Inherit from preset style
	  width: { max: 450 }
   }
})
   

   $('#starBen').qtip({
   content: {
		text: '<h2>Star Benefactor</h2><ul><li>One table of ten seats</li><li>Two complimentary bottles of wine per table</li><li>Two drink tickets per person</li><li>Priority seating</li><li>Five valet parking passes</li><li>Verbal recognition from the stage during the event</li><li>Half-page advertisement in event program</li><li>Logo on big screen at event</li><li>Logo on pre-event print advertisements**</li><li>Logo on "Thank you to our sponsors" advertisement in 435 South Magazine</li><li>Logo on Marillac (marillac.org) and Enchanted Evening (enchantedeveningkc.com) websites, plus a link back to yourcompany\'s website</li></ul>'
	   },
   show: 'mouseover',
   hide: 'mouseout',
   position: {
      corner: {
         target: 'leftMiddle',
         tooltip: 'rightMiddle'
      }
   },
   style: { 
      name: 'light', // Inherit from preset style
	  width: { max: 450 }
   }
})


$('#enchantmentBen').qtip({
   content: {
		text: '<h2>Enchantment Benefactor</h2><ul><li>Two tables of ten seats</li><li>Three complimentary bottles of wine per table</li><li>Special gift for each of your guests</li><li>Two drink tickets per person</li><li>Priority seating</li><li>Ten valet parking passes</li><li>Verbal recognition from the stage during the event</li><li>Full-page advertisement in event program</li><li>Logo on big screen at event</li><li>Mention in pre-event radio promotions*</li><li>Logo on pre-event print advertisements**</li><li>Logo on "Thank you to our sponsors" advertisement in 435 South Magazine</li><li>Logo on Marillac (marillac.org) and Enchanted Evening (enchantedeveningkc.com) websites, plus a link back to your company\'s website</li></ul>'
	   },
   show: 'mouseover',
   hide: 'mouseout',
   position: {
      corner: {
         target: 'leftMiddle',
         tooltip: 'rightMiddle'
      }
   },
   style: { 
      name: 'light', // Inherit from preset style
	  width: { max: 450 }
   }
})
});



function mycarousel_initCallback(carousel) {
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });
	 jQuery('.jcarousel-scroll a select').bind('change', function() {
     carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);
 return false;
 }); 
};



mycarousel_itemVisibleInCallbackBeforeAnimation = function(carousel, item, idx, state)
{
  if(idx==carousel.size())
  {
    $('.jcarousel-control .next').addClass('next_disabled')
  }
  else
  {
    $('.jcarousel-control .next').removeClass('next_disabled')
  }

	//this function handles highlighting the numbered links
	$('.jcarousel-control a').removeClass('on'); //clear out all active state highlighting on numbered links
	slide_number = parseInt(idx) - 1;
	$('.jcarousel-control a:eq('+ slide_number + ')').addClass('on'); //set active state highlighting on slide corresponding to numbered link
	
	$('.jcarousel-control a').removeClass('active');
	$('.jcarousel-control a:eq('+ slide_number + ')').addClass('on');
};



