$(document).ready(function() {
  $('div.column div.clients, div.module div.clients').cycle({
    fx: 'fade',                      
    timeout:  4000
 });

  $('div.column div.technologies').cycle({
    fx: 'fade',                      
    timeout:  8000
 });
  
	// First Menu 
	//   $("ul.first li a[href=#]").click(function() {
	//       $(this).next().slideToggle('slow');
	// 		$(this).toggleClass("selected");
	// 		return false;
	//   });
	// $("ul.second").hide();
	// $("ul.second li a.selected").parent().parent().show().prev().addClass("selected");

		$("ul.first li").hover(function() {	
		 			$(this).find("a:first").addClass('hover-selected');
			    $(this).find("ul.second").stop(true,true).slideToggle('slow');			
			  },function(){
					$(this).find("a:first").removeClass('hover-selected');
					$(this).find("ul.second").slideUp('slow');
		});
		
		swapValue = [];
	  $(".swap-value").each(function(i){
	      swapValue[i] = $(this).val();
	      $(this).focus(function(){
	          if ($(this).val() == swapValue[i]) {
	              $(this).val("");
	          }
						$(this).addClass("focus");
	      }).blur(function(){
	          if ($.trim($(this).val()) == "") {
	              $(this).val(swapValue[i]);
								$(this).removeClass("focus");

	          }
		});
	});

  $("ul#nav li#nav-solutions").hover(
    function() { //When trigger is clicked...  

       //Following events are applied to the subnav itself (moving subnav up and down)  
       $(this).parent().find("ul#nav-sub").slideDown('fast').show(); //Drop down the subnav on click  

       $(this).parent().hover(
         function() {}, 
         function(){  
           $(this).parent().find("ul#nav-sub").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
         }
       );  

       //Following events are applied to the trigger (Hover events for the trigger)  
    }, function(){})
      .hover(
        function() {  
           $(this).addClass("subhover"); //On hover over, add class "subhover"  
        }, function(){  //On Hover Out  
           $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
        }
      );  
   
 });  