//jkmegamenu.definemenu("megaanchor", "megamenu1", "mouseover");

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

$(document).ready(function() {

	$('#menuDiv').show();
	$('.scroll').hide();
	$('.selected').removeClass('selected');

	/*
$('#megaanchor').bind('mouseenter', function() {
		if ($('#menuDiv').is(":visible") == false) {
			$('#menuDiv').show();
		}
	});
*/
	
	$('.panelclicker').bind('mouseenter', function() {
		if ($('.scroll').is(":visible") == false) {
			$('.scroll').show();
		}
	});
	
	/*
$('#menuDiv').bind('mouseleave', function() {
		$('#menuDiv').hide()
	});
	
*/
	
	$('.panelclicker').bind('mouseleave', function() {
		$('.scroll').hide();
	});

	$('.panelclicker').bind('mouseenter', function() {
		$('.scroll').show();
	});
	
	$('.scroll').bind('mouseenter', function() {
		$('.scroll').show();
	});
	
	$('.scroll').bind('mouseleave', function() {
		$('.scroll').hide();
		$('.selected').removeClass('selected');
	});
	
	$('.panelclicker').bind('click', function() {
		return false;
	});

	$('a[rel*=facebox]').facebox();
	$.facebox.settings.opacity = 0.5;
});
