$(document).ready
(
	function() 
	{
		$("img[@src$=png], .bluetextleft, .menu_cont_bottom_left, .searchtextleft").pngfix
		(
			{
				sizingMethod: "scale"
			}
		);
	}
);
$(document).ready
(
 	function()
	{
		/*worldwide menu section*/
		/*table row color chenge*/
		$(".worldwide_menu table tr").hover
		(
			function() 
			{
				$('td', this)
					.css({backgroundColor: '#d9d9d9' , cursor: 'pointer'})
			},
			function() 
			{
				$('td', this)
					.css({backgroundColor: '#ffffff' , cursor: 'pointer'})
			}
		);
		/*table row color chenge*/
		/*menu show/hide*/
		$(".Worldwidelink")
			.hoverIntent
				(
				 	{
						sensitivity: 100, 
						interval: 500, 
						out: WorldwidelinkOff,
						over: WorldwidelinkOn, 
						timeout: 500
				
					}
				);
		/*menu show/hide*/
		/*worldwide menu section*/
		/*search section*/
		/*define search variable*/
		var gray_Left_placeholder_width_left_chenger = $('.gray_Left_placeholder');
		var height = gray_Left_placeholder_width_left_chenger.height();
		var width = gray_Left_placeholder_width_left_chenger.width();
		gray_Left_placeholder_width_left_chenger.css({ width: "113px" });
		gray_Left_placeholder_width_left_chenger.css({ left: "156px" });//156px
		$(".gray_area").css({ width: "109px" });
		/*define search variable*/
		/*gogo buttion palce in diff browsers*/
		jQuery.each
		(
		 	jQuery.browser, function(i) 
			{
 		 		if($.browser.msie)
				{
	    			$(".gogo").css({marginTop:"36px" ,marginLeft:"123px"})
  				}
				else if($.browser.mozilla)
				{
     				$(".gogo").css({marginTop:"36px" ,marginLeft:"58px"})
  				}
				else if($.browser.safari)
				{
     				$(".gogo").css({marginTop:"36px" ,marginLeft:"123px"})
  				}
				else if($.browser.chrome)
				{
     				$(".gogo").css({marginTop:"33px" ,marginLeft:"64px"})
  				}
				else if($.browser.opera)
				{
     				$(".gogo").css({marginTop:"33px" ,marginLeft:"64px"})
  				}
			}
		);
		/*gogo buttion palce in diff browsers*/
		/*search buttion click*/
		$("div.gray_Left_placeholder").toggle
		(
			function() 
			{
				$(".searchtextbox")
					.attr("value","Wipro site");
				$(this)
					.removeClass("gray_Left_placeholder_round")
					.addClass("gray_Left_placeholder_square")
					.animate
					(
						{ 
							width: "270px" ,left: "0px"
						}, 
						{ 
							duration: 500, complete: 
							function () 
							{
								$(".searchtextbox").fadeIn();
							} 
						}
					)
					.parent().parent().animate
					(
						{ 
							width: "270px" ,left: "0px"
						}, 
						{ 
							duration: 500, complete: 
							function () 
							{
								//do somthing
							} 
						}
					);
				
					$(".gray_area",this)
						.css({ width: "266px" })
					
					$(".gray_sq_cir",this)
						.addClass("gray_cir");
			},
			function () 
			{
				$(".graytext")
					.css({width:"91px"})
				$(".searchtextbox")
					.attr("value"," ");
				$(".searchtextbox")
					.hide();
				$(this)
					.animate
					(
						{ 
							width: "113px" ,left: "0px"  ,height: "30px"  
						}, 
						{ 
							duration: 500, complete: 
							function () 
							{
								//do somthing
							} 
						}
					)
					.parent().parent().animate
					(
						{ 
							width: "113px" ,left: "0px" ,height: "30px" 
						}, 
						{ 
							duration: 500, complete: 
							function () 
							{
								//do somthing
							} 
						}
					);
				$(".gray_area",this)
					.animate
					(
						{ 
							width: "109px" ,left: "0px" 
						}, 
						{ 
							duration: 500, complete: 
							function () 
							{
								//do somthing
							}
						}
					);
				$(".gray_sq_cir",this)
						.addClass("gray_cir");
			}
		);
		/*search buttion click*/
		/*Clear text box value on click*/
		$(".searchtextbox").click
		(
			function() 
			{
				$(this).val('');
			}
		);
		/*Clear text box value on click*/
		/*gogo buttion function*/
		$(".gogo").click
		(
			function() 
			{
				if ($(".searchtextbox").val() == "Wipro site" || $(".searchtextbox").val() == " " || $(".searchtextbox").val() == "") 
				{
					$(".searchtextbox")
						.attr("value","Wipro site");
					$("div.gray_Left_placeholder")
						.removeClass("gray_Left_placeholder_round")
						.addClass("gray_Left_placeholder_square")
						.animate
						(
							{ 
								width: "270px" ,left: "0px"
							}, 
							{ 
								duration: 500, complete: 
								function () 
								{
									$(".searchtextbox").fadeIn();
								} 
							}
						)
						.parent().parent().animate
						(
							{ 
								width: "270px" ,left: "0px"
							}, 
							{ 
								duration: 500, complete: 
								function () 
								{
									//do somthing
								} 
							}
						);
					
						$("div.gray_area")
							.css({ width: "266px" })
						
						$("div.gray_sq_cir")
							.addClass("gray_cir");
						return false;
				}
				else{
					return true;
					$("#search_form").attr("action",$(".searchtextbox").val()); 	
				}
			}
		);
		/*gogo buttion function*/
		/*search section*/
		/*menu section*/
		/*menu roiund corners*/
		DD_roundies.addRule('.menu_place', '5px 5px 5px 5px', true);
		DD_roundies.addRule('.menu_place_blue', '5px 5px 5px 5px', true);
		DD_roundies.addRule('.menu_place_gray', '5px 5px 5px 5px', true);
		/*menu roiund corners*/
		/*menu mouseover/out action*/
		$("div.menu_place")
			.hoverIntent
				(
				 	{
						sensitivity: 100, 
						interval: 550, 
						out: mouseOff,
						over: mouseOn, 
						timeout: 100
					}
				);
		/*menu mouseover/out action*/
		/*z-Index chenge in menu_left mouse over*/
		$(".menu_left")
			.mouseover
			(
      			function () 
				{
					$(".ri_trends_pad_menu")
						.css
						(
						 	{
								zIndex	:	"1"
							}
						);
					$(".menu_left")
						.css
						(
						 	{
								zIndex	:	"2"
							}
						);
      			}
    		);
		/*z-Index chenge in menu_left mouse over*/
		/*worldwide menu*/
		/*fade effect for menu,search buttion*/
		$(".search_place").fadeIn(1000);
		$(".menu_place").fadeIn(1000);
		$(".gogo").fadeIn(1000);
		/*fade effect for menu,search buttion*/
	}
);
/*World wide menu */
function WorldwidelinkOn()
{
	$(".worldwide_menu").stop().slideDown("slow");
}
function WorldwidelinkOff()
{
	$(".worldwide_menu").stop().slideUp("slow");
}
/*World wide menu */
/*menu mouse over*/
function mouseOn() 
{	
	$(".menu_hiddenValue")
		.html("2");
	$(".ri_trends_pad_menu")
		.css
			(
			 	{
					zIndex	:	"1"
				}
			);
	$(".menu_left")
		.css
			(
			 	{
					zIndex	:	"2"
				}
			);
	$(this)
		.animate
		(
			{
				width: "270px" ,
				left: "0px", 
				height: parseInt($(".menu_place_gray",this).height()) + 32
			}, 
			{
				duration: '700',
				easing: 'easeInOutQuad'
			}
		);
	$(".menu_place_gray",this)
		.animate
		(
			{
				height: $(".menu_place_gray",this).outerHeight()
			}, 
			{
				duration: '700',
				easing: 'easeInOutQuad',
				complete: 
					function () 
					{
						$("table",this)
							.fadeIn(1000);
					} 
			}
		);
	$(".menu_place_blue_malfun",this)
		.css
		(
			{
				visibility: "visible"
			}
		);
}
/*menu mouse over*/
/*menu mouse out*/
function mouseOff() 
{
	$(".menu_place_blue_malfun")
		.css
		(
			{
				visibility: "hidden"
			}
		);
	$("table",this)
		.fadeOut
		(
			500,
			function()
			{
				$(this).parent().parent()
					.animate
					(
						{
							width: "113px" ,
							left: "0px", 
							height: "30px"
						}, 
						{
							duration: '700',
							easing: 'easeInOutQuad',
							complete: 
								function () 
								{
									
										if(parseInt($(".menu_hiddenValue").text())== 2)
										{
											//do nothing
										}
										else
										{
											t=setTimeout('$(".asd").html("1");$(".ri_trends_pad_menu").css({zIndex:"2"});$(".menu_left").css({zIndex:"1"});',1500)
										}
								} 
						}
					);
			}
		);
}
/*menu mouse out*/
/*search mouse on*/
 function searchOn() 
{
	$(this)
		.removeClass("gray_Left_placeholder_round")
		.addClass("gray_Left_placeholder_square")
		.animate
		(
		 	{ 
				width: "270px" ,
				left: "0px"
			}, 
			{ 
				duration: 600, 
				easing: 'easeInOutQuad',
				complete: 
				function () 
				{
					$(".searchtextbox")
						.attr("value","a");
					
            	} 
			}
		)
		.parent().parent().animate
		(
		 	{ 
				width: "270px" ,
				left: "0px"
			}, 
			{ 
				duration: 600, 
				easing: 'easeInOutQuad',
				complete: 
				function () 
				{
					//do somthing
            	} 
			}
		);
	
		$(".gray_area",this)
			.css
				(
				 	{ 
						width	: "266px" 
					}
				)
		
		$(".gray_sq_cir",this)
			.css
				(
				 	{ 
						backgroundImage: "url(http://67.218.96.186/images/menu/gray_round.gif)" 
					}
				)
}
/*search mouse on*/
/*search mouse off*/
function searchOff() 
{
	$(".searchtextbox").fadeOut("fast");
	$(this)
		.animate
		(
		 	{ 
				width: "113px" ,
				left: "0px" ,
				height: "30px"  
			}, 
			{ 
				duration: 500, 
				easing: 'easeInOutQuad',
				complete: 
				function () 
				{
					//do somthing
            	} 
			}
		)
		.parent().parent().animate
		(
		 	{ 
				width: "113px" ,
				left: "0px" ,
				height: "30px" 
			}, 
			{ 
				duration: 500, 
				easing: 'easeInOutQuad',
				complete: 
				function () 
				{
					//do somthing
            	} 
			}
		);
	$(".gray_area",this)
		.animate
		(
		 	{ 
				width: "109px" ,
				left: "0px" 
			}, 
			{ 
				duration: 500, 
				easing: 'easeInOutQuad',
				complete: 
				function () 
				{
					//do somthing
            	}
			}
		);
	$(".gray_sq_cir",this)
		.css
			(
			 	{ 
					backgroundImage: "url(http://67.218.96.186/images/menu/gray_round.gif)" 
				}
			);
}
/*search mouse off*/