

$(document).ready(function () {

$(function(){
		$('#slider').powerSlide({thumbs: true, bullets: false});
	});

  jkmegamenu.render($);

  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').not('.curSlide a').hover(function() {   
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "611px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "611px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
	
	// on hovering out, ease the element out
    if ($(".curSlide").is(':animated')) {
      $(".curSlide").stop().animate({width: "60px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(".curSlide").stop(':animated').animate({width: "60px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "60px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "60px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
	
	// if the element is currently being animated
    if ($(".curSlide").is(':animated')) {
      $(".curSlide").stop().animate({width: "611px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(".curSlide").stop().animate({width: "611px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  });  
  
  stLight.options({publisher:'48247cbb-489f-47cb-aa38-8c828077cae2', onhover: false});
});
