﻿
/// <reference path="jquery-1.3.2-vsdoc2.js" />
$(function() {
	jQuery.each(jQuery.browser, function(i, val) {
		if (i == "msie" && val == true) {
			$(".mnu").addClass("mnuAlt");
		}
	});

	jQuery.fn.ForceNumericOnly =
		function() {
			return this.each(function() {
				$(this).keydown(function(e) {
					var key = e.charCode || e.keyCode || 0;
					// allow backspace, tab, delete, arrows, numbers and keypad numbers ONLY
					return (
						key == 8 ||
						key == 9 ||
						key == 46 ||
						(key >= 37 && key <= 40) ||
						(key >= 48 && key <= 57) ||
						(key >= 96 && key <= 105));
				})
			})
		};



	$("td.txtNameric").ForceNumericOnly();

	if ($("#ctl00_ContentPlaceHolder1_pnl2Employ1").is(":visible")) {
		$("#ctl00_ContentPlaceHolder1_pnl1Employ1").fadeOut(2000);
	}
	if ($("#ctl00_ContentPlaceHolder1_pnl3Employ2").is(":visible")) {
		$("#ctl00_ContentPlaceHolder1_pnl1Employ2").fadeOut(2000);
		$("#ctl00_ContentPlaceHolder1_pnl2Employ2").fadeOut(2000);
	}

	//$(".Rtl").toggle(4000);

	$("img").hover(
			function() {
				$(this).animate({ "opacity": "0.5" }, "slow");
			},
			function() {
				$(this).animate({ "opacity": "1" }, "slow");
			}
			);

	//$(".Content").corner();
	//$(".Content").corner("round 8px").parent().css('padding', '4px').corner("round 10px")
	// $(".Content").corner("tear 20px").parent().css('padding', '15px').corner("tear 20px");

	$("span.contlink").mousemove(function(event) {
		$(this).addClass("contlinkadd");
	}
       );
	$("span.contlink").mouseout(function(event) {
		$(this).removeClass("contlinkadd");
	}
       );
	function displaymessage(news) {
		if ($(news).is(":hidden")) {
			$(news).slideDown();
		}
		else {
			$(news).slideUp();
		}
	}



	/*Education*/
	$("#spcont1").click(function(event) {
		displaymessage("#news1")
	}
       );
	$("#spcont2").click(function(event) {
		displaymessage("#news2")
	}
       );
	$("#spcont3").click(function(event) {
		displaymessage("#news3")
	}
       );
	$("#spcont4").click(function(event) {
		displaymessage("#news4")
	}
       );
	$("#spcont5").click(function(event) {
		displaymessage("#news5")
	}
       );
	$("#spcont6").click(function(event) {
		displaymessage("#news6")
	}
       );
	$("#spcont7").click(function(event) {
		displaymessage("#news7")
	}
       );
	$("#spcont8").click(function(event) {
		displaymessage("#news8")
	}
       );
	$("#spcont9").click(function(event) {
		displaymessage("#news9")
	}
       );
	$("#spcont10").click(function(event) {
		displaymessage("#news10")
	}
       );
	$("#spcont11").click(function(event) {
		displaymessage("#news11")
	}
       );
	$("#spcont12").click(function(event) {
		displaymessage("#news12")
	}
       );
	$("#spcont13").click(function(event) {
		displaymessage("#news13")
	}
       );
	$("#spcont14").click(function(event) {
		displaymessage("#news14")
	}
       );
	$("#spcont15").click(function(event) {
		displaymessage("#news15")
	}
       );

	$(".HumanTable tr").mousemove(function(event) {
		$(this).addClass("menumouse");
		//		alert("df");
	}
      );


	$(".HumanTable tr").mouseout(function(event) {
		$(this).removeClass("menumouse");
	}
      );

	$(".Rtl h6").mousemove(function(event) {
		$(this).addClass("menumouse");
		//		alert("df");
	}
      );


	$(".Rtl h6").mouseout(function(event) {
		$(this).removeClass("menumouse");
	}
      );



	//  list animation-ProductInfo
	var fadeDuration = 150; //time in milliseconds

	$('#list1 li a').hover(function() {
		$(this).animate({ paddingRight: '30px' }, fadeDuration);
		$(this).children('span').show().animate({ right: -5 }, fadeDuration);
	}, function() {
		$(this).animate({ paddingRight: '15px' }, fadeDuration);
		$(this).children('span').animate({ right: -35 }, fadeDuration).fadeOut(fadeDuration);
	});


	//certificate

	$('#container img').hover(
					function() {
						var $this = $(this);
						$this.stop().animate({ 'opacity': '1.0', 'height': '200px', 'top': '0px', 'left': '0px' });
					},
					function() {
						var $this = $(this);
						$this.stop().animate({ 'opacity': '0.5', 'height': '500px', 'top': '-66.5px', 'left': '-150px' });
					}
				);


});
