$(document).ready(function() {
	$("a#donate").bind("click", function() {
		$("#donate_form").submit()
	});
 
	$("a.single_1").fancybox();
		
	$("a.image_fadeinB").fancybox({
		'padding'				: 0,
		'zoomOpacity'			: true,
		'overlayShow'			: false,
		'zoomSpeedIn'			: 500,
		'zoomSpeedOut'			: 500
	});
	
	$("a.image_fadeinA").fancybox({
		'padding'				: 0,
		'overlayShow'			: false,
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'			: 500,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack'
	});
	
	$("a.group").fancybox({
		'hideOnContentClick': false
	});
	
	

  $("a#video").fancybox({ 
  'hideOnContentClick': false, 
  'frameWidth':768, 
  'frameHeight':520, 
  'overlayShow': true, 
  'callbackOnClose': function() { 
    $("#fancy_content").empty();} 
  }); 
  
   $("#video2").fancybox({
   'zoomOpacity'			: true,
	'overlayShow'			: false,
	'zoomSpeedIn'			: 500,
	'zoomSpeedOut'			: 500,    
  'hideOnContentClick': false, 
  'frameWidth':850, 
  'frameHeight':654, 
  'overlayShow': true, 
  'callbackOnClose': function() { 
    $("#fancy_content").empty();} 
  }); 




$(".scroll").click(function(event){
        //prevent the default action for the click event
        event.preventDefault();
        //get the full url - like mysitecom/index.htm#home
        var full_url = this.href;
        //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
        var parts = full_url.split("#");
        var trgt = parts[1];
        //get the top offset of the target anchor
        var target_offset = $("#"+trgt).offset();
        var target_top = target_offset.top;
        //goto that anchor by setting the body scroll top to anchor top
        $('html, body').animate({scrollTop:target_top}, 500);
    });

	
 
});
