$(document).ready(function(){ 
	$(".nav-bg ul li").hover(
      function () {
        $(this).find('ul').css("display","block");
      }, 
      function () {
         $(this).find('ul').css("display","none");
      }
    );
	$(".nav-bg ul li ul").hover(
      function () {
        $(this).parent().addClass('active-child1');
		$(this).css("display","block");
      }, 
      function () {
        $(this).parent().removeClass('active-child1');
      }
    );
	$(".nav-bg ul li:first").attr({id: "first-child"});


$('#slider1').anythingSlider({
				autoPlay        : true,
				width           : 980,   // Override the default CSS width
				easing          : 'linear',
				startPanel      : 1, 
				delay           : 7000,      // How long between slideshow transitions in AutoPlay mode (in milliseconds)
				resumeDelay     : 7000,     // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
				animationTime   : 600,       // How long the slideshow transition takes (in milliseconds)
//				autoPlayLocked  : true,  // If true, user changing slides will not stop the slideshow
//				resumeDelay     : 10000, // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
				onSlideComplete : function(slider){
					// alert('Welcome to Slide #' + slider.currentPage);
				},
				stopAtEnd : false,
				onShowStop : function(e, slider){
					setTimeout(function(){
						if (slider.currentPage === slider.pages) { slider.gotoPage(1); }
					}, 5000);
				}
			});
});
