$(document).ready(function(){
		 /*** IE PNG fix  ***/
		 $(document).pngFix();
		$('#id-international ul li:nth-child(odd)').addClass('green-link');
		$("#int-search-list div:odd").addClass('flt-rt');
		$("#int-search-list div:even").addClass('flt-lft');

		$("fieldset legend.toggle")
			  .click(function(){
				$(this).parent().children().filter("p,img,table,ul,div,span").slideToggle("slow");
			  });

		 $("#id-get-started").validate();

		 /*** Smooth same page anchor scroll***/
		 /*$('a[href*=#]').click(function() {
			if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
			&& location.hostname == this.hostname) {
			  var $target = $(this.hash);
			  $target = $target.length && $target
			  || $('[name=' + this.hash.slice(1) +']');
			  if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body')
				.animate({scrollTop: targetOffset}, 100);
				$(.id-solutions p).addClass("idleField");
			   return false;
			  }
			}
		  });
		 
		 $(".left > li > a").click(function () {
		 $(".id-solutions-list > li").removeClass('highlight');
				var str = $(this).attr("href");
				str = "a[name='" + str.substring(1) + "']";
				$(str).parent().parent().addClass('highlight');
		
			});
		});

			*/
		 
		 /*** Change input class on focus ***/ 	
		 
		 $('input[type="text"]').addClass("idleField");  
         $('input[type="text"]').focus(function() {  
         $(this).removeClass("idleField").addClass("focusField");  
          if (this.value == this.defaultValue){  
              this.value = '';  
          }  
          if(this.value != this.defaultValue){  
              this.select();  
          }  
         });  
         $('input[type="text"]').blur(function() {  
         $(this).removeClass("focusField").addClass("idleField");  
         
        });  
		 
		 $("input:checked").addClass("hilite"); 
		
		/*** Show other inputs if "other" selected on get started form ***/
		$("#industry-list").change(function () {
        $("#industry-list option:selected").each(function ()
		{
         	if($(this).attr("id") == "other-industry")
			{
				$("#show-other-industry").fadeIn();
				$("#industry-input").focus();
			}
			else
			{
				$("#show-other-industry").fadeOut();
			}
        });
   		}).change();

		$("#referred-via").change(function () {
        $("#referred-via option:selected").each(function ()
		{
         	if($(this).attr("id") == "other-referred-via")
			{
				$("#show-other-referred-via").fadeIn();
				$("#referred-via-input").focus();
			}
			else
			{
				$("#show-other-referred-via").fadeOut();
			}
        });
   		}).change();
	   
	    /*** hover effects on div and lables on get started form ***/
		$("label.id-label-box,div.id-package-list-box").hover(
		  function () {
			$(this).addClass("hover");
		  },
		  function () {
			$(this).removeClass("hover");
		  }
		);
		
		/*** image fade transition on top nav ***/
		$(function() {
		// set opacity to nill on page load
		$("#id-top-nav ul span").css("opacity","0");
		// on mouse over
		$("#id-top-nav ul span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				opacity: 1
			}, "fast");
		},
		// on mouse out
		function () {
			// animate opacity to nill
			$(this).stop().animate({
				opacity: 0
			}, "slow");
		});
	});
});