/*
	Set up carousel control buttons
*/
function mycarousel_initCallback(carousel) {
	$('.jcarousel-control a').bind('click', function() {
		carousel.scroll($.jcarousel.intval(jQuery(this).text()));
		return false;
	});
};
/*
	Callback function to update page buttons for slideshow
*/
function mycarousel_itemVisibleInCallback(carousel, item, idx, state) {
	$('.jcarousel-control a').filter(
		function() {
			if ($(this).text() == idx) {
				return true;
			} else {
				return false;
			}
		}).toggleClass('active');
	$('.jcarousel-control a')	.filter(
			function() {
				if ($(this).text() == idx) {
					return true;
				} else {
					return false;
				}
			}).siblings('.active').toggleClass('active');
}

$(document).ready(function() {
    $('#mycarousel').jcarousel({
        // Configuration goes here
		auto: 4,
		animation: 'slow',
		scroll: 1,
		wrap: 'last',
		initCallback: mycarousel_initCallback,
		itemVisibleInCallback: {
			onBeforeAnimation: mycarousel_itemVisibleInCallback
			},
		buttonNextHTML: null,
		buttonPrevHTML: null
    });

	$("div#services").click(function () {
      
	//		$("#navbar").hide("slide", { direction: "left" }, 1000);
			var options = { direction: "left" };
			$( "#navbar" ).toggle( "slide", options, 1000 );
	});

//	$('div.drivehererollover').blur(function(){
//		$('.drivehererollover').hide();
//	});
	

	
//	$("div.contactmap").bind("mouseenter",function(){
//	      $('div.drivehererollover').hide();
//	$('.drivehere').show();
//	    });
	
	
	
	
	

});

function toggle(list){
var ellename = 'kidsof-'+list;
var elloname = 'li-'+list;

var listElementStyle=document.getElementById(ellename).style;


		if (listElementStyle.display=="none"){
		listElementStyle.display="block";

		$('#'+elloname).addClass('contract');
		$('#'+elloname).siblings().removeClass('contract');
		
		}else if (listElementStyle.display=="block"){
		listElementStyle.display="none";

		$('#'+elloname).removeClass('contract');

		}





}


function contactshowdetails(){


		$('.drivehererollover').show();
		$('.drivehere').hide();

}







