/* JS Handcrafted by John Smith at fusion-room.com  2010 */

$(function() {
	// Adds a class to any pdf link
	$("a[href$='pdf']").addClass("pdfFile").attr("target", "_blank");
});

$(window).load(function() {
	if ($('.featureGallery').length > 0) {
	$('.featureGallery').nivoSlider({
		effect:'random', //Specify sets like: 'fold,fade,sliceDown'
		slices:20,
		animSpeed:1200,
		pauseTime:6000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:true, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      	controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		htmlCaptions: true,
		beforeChange: function(){},
		afterChange: function() {},
		slideshowEnd: function(){} //Triggers after all slides have been shown	
	});
	}
	if ($('.profileGallery').length > 0) {
		$('.profileGallery').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:20,
		animSpeed:1200,
		pauseTime:4000,
		startSlide:'random',
		//startSlide:'random', //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      	controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:1, //Universal caption opacity
		htmlCaptions: true,
		beforeChange: function(){},
		afterChange: function(){
			/*
			$(this).flip( {
				direction:'lr'
			})
			*/
		},
		slideshowEnd: function(){} //Triggers after all slides have been shown	
	})}
});

/* Sitefinity Menu Overrides */
$(function () {
    $('.rmVertical li.rmFirst').hover(function () {
        $('.rmExpanded').addClass('active');

    }, function () {
        $('.rmExpanded').removeClass('active');
        $('.rmVertical .rmFirst .rmLink').removeClass('yellow');
    });
});
$(function () {
    $('.rmExpandDown').hover(function () {
        $('.rmVertical .rmFirst .rmLink .rmText').addClass('yellow');
    }, function () {
        $('.rmVertical .rmFirst .rmLink .rmText').removeClass('yellow');
    });
});

/*
$(function () {
    $('a.rmFocused span.rmExpandDown').parent().parent('li').addClass('hello');
    $('.hello .rmSlide .rmVertical').addClass('openMenu');
});
*/
