$(document).ready(function(){
  $('div.cta-button a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 450);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 450);
      }
    );
	//
	//
  $('div.rm-button a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//
  $('div.send-button a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//LEVEL 2 TOP NAV BUTTONS
	// 1 of 7 SERVICES
  $('div.level2-topnav-services a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//
		//LEVEL 2 TOP NAV BUTTONS
	// 2 of 5 CAPABILITY
  $('div.level2-topnav-capabilities a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//
		//LEVEL 2 TOP NAV BUTTONS
	// 3 of 5 NEWS
  $('div.level2-topnav-news a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//
		//LEVEL 2 TOP NAV BUTTONS
	// 4 of 5 CONTACT US
  $('div.level2-topnav-contact a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//
		//LEVEL 2 TOP NAV BUTTONS
	// 5 of 5 CLIENT
  $('div.level2-topnav-client a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//
	
			//LEVEL 2 TOP NAV BUTTONS
	// 5 of 5 CLIENT
  $('div.level2-topnav-about a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//
	
			//LEVEL 2 TOP NAV BUTTONS
	// 5 of 5 CLIENT
  $('div.level2-topnav-home a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//
	// LEVEL 2 READ MORE BUTTON
	 $('div.level2-readmore-85x25 a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//
	//
	// LEVEL 2 LEARN MORE BUTTON
	 $('div.level2-learnmore-86x26 a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );	
	//
		//
	// LEVEL 2 DO  MORE BUTTON
	 $('div.level2-domore-86x26 a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );	
	//
	
	
	$('div.cube-button a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 600);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 600);
      }
    );
	//
  $('div.dm-button a')
    .css({  'backgroundPosition': '0 0' })
    .hover(
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 0
          }, 350);
      },
      function(){
        $(this)
          .stop()
          .animate({
            'opacity': 1
          }, 350);
      }
    );
	//

	$("#login_form").bind("submit", function() {

	if ($("#login_name").val().length < 1 || $("#login_pass").val().length < 1) {
	    $("#login_error").show();
	    $.fancybox.resize();
	    return false;
	}

	$.fancybox.showActivity();

	$.ajax({
		type		: "POST",
		cache	: false,
		url		: "/data/login.php",
		data		: $(this).serializeArray(),
		success: function(data) {
			$.fancybox(data);
		}
	});

	return false;
});
});
