if($('a[rel^=group_]').length){
		$(document).ready(function() {
			$("a[rel^=group_]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
		});
		
		};
		
		
if($('a[rel^=video_]').length){	
$(document).ready(function() {	
		$("a[rel^=video_]").click(function() {
			
			
		$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 640,
			'height'		: 360,
			'href'			: this.href.replace(new RegExp("([0-9])","i"),'$1'),
			'type'			: 'swf'
		});			
		return false;
	});
});
	
}


$(document).ready(function() {
$(".tilt-left").rotate(-7);
$(".tilt-right").rotate(7);
$('#header_left').cycle({
	fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
});
	
});
 $(".turn").rotate({
	 
   bind: 
     { 
	 
		mouseover : function() { 
		//	$(this).animate({opacity:".6", queue:"false"}, "slow");
			$(this).rotate({animateTo:7, duration:400})
		},
		mouseout : function() { 
		//	 $(this).animate({opacity:"1", queue:"false"}, "slow");
			$(this).rotate({animateTo:0, duration:400})
		}
     } 
   
});

 $(".logos").rotate({
	 
   bind: 
     { 
	 
		mouseover : function() { 
			$(this).animate({opacity:".8", queue:"false"}, "fast");
		},
		mouseout : function() { 
			 $(this).animate({opacity:"1", queue:"true"}, "fast");
		}
     } 
   
});

function goToByScroll(id){
     	$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');
}




	




if($('#cash-donations-form').length){
$(document).ready(function() { 
    // bind form using ajaxForm 
    $('#cash-donations-form').ajaxForm({ 
        // target identifies the element(s) to update with the server response 
        target: '#success', 
 
        // success identifies the function to invoke when the server response 
        // has been received; here we apply a fade-in effect to the new content 
        success: function() { 
	   $('#cash-donations-form').hide();	
            $('#success').fadeIn('slow'); 
        
      }
    }); 
});
};

