$(document).ready(function(){
						   
	/*misc first & last classes to get rid of things like borders*/				   
	$("#menu-main-nav li:first, .secondary-nav li:first, .footer-nav li:first, .subNav li:first").addClass("first");
	
	/*trigger student video tabs*/
	//$("ul#menu-profiles-side-nav").tabs("#content", {effect: 'ajax'});
	$("ul.student-vid-tabs").tabs("div.panes > div");
	
	//$('ul.student-vid-tabs a').live('focus', function() {
		  //$("ul.student-vid-tabs").tabs("div.panes > div");
		  //$('.student-vid-tabs').hoverscroll({vertical: true, width: 210, height: 170 });
//});
	
	/*menu selected classes*/
	if ($('body').hasClass('page-template-page-our-program-php')) {
		$("#menu-item-114, #menu-item-175").addClass("current-menu-item");
	};
	
	if ($('body').hasClass('page-template-page-about-rwanda-php')) {
		$("#menu-item-117").addClass("current-menu-item");
	};
	
	if ($('body').hasClass('page-template-page-who-we-are-contact-php')) {
		$("#menu-item-173, #menu-item-115").addClass("current-menu-item");
	};
	
	if ($('body').hasClass('page-template-page-who-we-are-contact-form-php')) {
		$("#menu-item-173, #menu-item-115").addClass("current-menu-item");
	};
	
	if ($('body').hasClass('page-template-page-who-we-are-team-php')) {
		$("#menu-item-172, #menu-item-115").addClass("current-menu-item");
	};
	
	if ($('body').hasClass('page-template-page-who-we-are-partners-php')) {
		$("#menu-item-171, #menu-item-115").addClass("current-menu-item");
	};
	
	if ($('body').hasClass('page-template-page-get-involved-php')) {
		$("#menu-item-118").addClass("current-menu-item");
	};
	
	if ($('body').hasClass('page-template-page-get-involved-downloads-php')) {
		$("#menu-item-118").addClass("current-menu-item");
		$("#menu-item-573").addClass("current-menu-item");
	};
	
	if ($('body').hasClass('page-template-page-get-involved-downloads-form-php')) {
		$("#menu-item-118").addClass("current-menu-item");
	};
	
	if ($('body').hasClass('page-template-page-student-gallery-php')) {
		$("#menu-item-177, #menu-item-658").addClass("current-menu-item");
	};
	
	if ($('body').hasClass('page-template-page-student-profiles-php')) {
		$("#menu-item-657, #menu-item-658").addClass("current-menu-item");
	};
	
	if ($('#container').hasClass('twoCol')) {
		$("body").addClass("body-twoCol");
	};
	
	/*homepage slideshow*/
	$('#wrapperSlideshow') 
	.before('<div id="slideshowNav">') 
	.cycle({ 
		fx:     'scrollLeft', 
		speed:  '1000', 
		timeout: 7000, 
		/*next:   '#wrapperSlideshow',*/
		pause:   1, 
		pauseOnPagerHover: 1,
		pager:  '#slideshowNav' 
	});
	
	/*$('#startStopBtn').click(function() {
		$(this).toggleClass('resumeButton');
		$(this).toggleClass('pauseButton');
	});*/
	
	$('.pauseBtn').click(function() { 
		$('#wrapperSlideshow').cycle('pause');
		$(this).hide(); 
		$('.resumeBtn').show();
	});
	
	$('.resumeBtn').hide();
	$('.resumeBtn').click(function() { 
		$('#wrapperSlideshow').cycle('resume');
		$(this).hide(); 
		$('.pauseBtn').show();
	});
	
	$('#wrapperSlideshow .hentry:eq(0)').css("background-image","url(/wp-content/themes/GenerationRwanda/images/slideshow-bg/slideshow-bg-1.jpg)");
	$('#wrapperSlideshow .hentry:eq(1)').css("background-image","url(/wp-content/themes/GenerationRwanda/images/slideshow-bg/slideshow-bg-2.jpg)");
	$('#wrapperSlideshow .hentry:eq(2)').css("background-image","url(/wp-content/themes/GenerationRwanda/images/slideshow-bg/slideshow-bg-3.jpg)");
	$('#wrapperSlideshow .hentry:eq(3)').css("background-image","url(/wp-content/themes/GenerationRwanda/images/slideshow-bg/slideshow-bg-4.jpg)");
	$('#wrapperSlideshow .hentry:eq(4)').css("background-image","url(/wp-content/themes/GenerationRwanda/images/slideshow-bg/slideshow-bg-5.jpg)");
	
	
	
	/*Hover Menu*/
	$('#menu-gallery-side-nav').hoverscroll({vertical: true, width: 330, height: 267  });
	$('#menu-profiles-side-nav').hoverscroll({vertical: true, width: 330, height: 310  });
	$('.student-vid-tabs').hoverscroll({vertical: true, width: 210, height: 170 });
	$('#menu-our-partners-side-nav').hoverscroll({vertical: true, width: 330, height: 310  });
	
	/*Pretty Photo*/
	$("a[rel^='prettyPhoto']").prettyPhoto();
	 
	/*VALIDATION*/
	$("#subForm1").validate();
	$("#subForm2").validate();
	$("#subForm3").validate();

    
	/*JScrollPane*/
    $('.scroll-pane').jScrollPane({showArrows:true, scrollbarWidth:13, scrollbarMargin:20, reinitialiseOnImageLoad:true});
});


