jQuery(document).ready(function() {
		var cLength = jQuery(".testi_content ul:first li").length;
		if(cLength > 3){	
			jQuery(".testi_content").jCarouselLite({
				btnNext: ".btn_next",
				btnPrev: ".btn_prev",
				speed: 1000,
				scroll: 3,
				circular: true
			});
		}else{
		jQuery(".prevnext a").attr("href","javascript:void(0)");	
		}
	jQuery(".btn_prev a img").each(function(){
			jQuery(this).css("opacity","0.5");
			jQuery(this).hover(function(){
					 jQuery(this).animate({"opacity": 1.0}, 300)
			  },function(){
					 jQuery(this).animate({"opacity": 0.5},300)
			});
	});
	jQuery(".btn_next a img").each(function(){
			jQuery(this).css("opacity","0.5");
			jQuery(this).hover(function(){
					   jQuery(this).animate({"opacity": 1.0}, 300)
				 },function(){
					   jQuery(this).animate({"opacity": 0.5},300)
			});
	});	
});
	jQuery(function() {
		jQuery('.txtsearch').val('Search...');
		jQuery('.txtsearch').focus(function() {
			if(this.value === 'Search...') this.value = '';
		}).blur(function() {
			if(this.value === '') this.value = 'Search...';
		});
	});//end

jQuery(function(){
       jQuery(".fieldboxcap #CaptchaV2").addClass("captchimage");
       jQuery(".fieldboxcap .captchaimg").addClass("imagecaptch");
});
jQuery(function() {
               setTimeout(function() {
                          jQuery("ul#slides li a img").css("display","block");
                 }, 500);
});
//Accordion Menu	
function initMenu() {
  jQuery("#tggnav li:has('ul')").find("a:first").addClass("hasul");		
  jQuery('#tggnav ul').hide();
  jQuery('#tggnav>li>a').click(function() {
  
  jQuery(".selected").removeClass("selected");	
  jQuery(this).parent().addClass("selected");

	  var checkElement = jQuery(this).parent().children("ul");
	  var _hostname = window.location.hostname;
	  var checkHref = jQuery(this).attr('href');
	  var new_url = 'http://'+_hostname+checkHref;
	  if(checkHref != '#'){
			window.location = new_url;
	  }
	  if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
                       return false;
	    }	
          if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
                      jQuery('#tggnav ul:visible').slideUp('normal');
                      checkElement.slideDown('normal');
                      return false;
        }else{
		      jQuery('#tggnav ul:visible').slideUp('normal');}
      }
    );
  }
	jQuery(document).ready(function() {initMenu();			   
});

	jQuery(document).ready(function(){
	
		var selectedURL = window.location.pathname;
	
		jQuery("ul#tggnav li ul li a").each(function() {
			  var listURL = jQuery(this).attr("href");
			  if(selectedURL == listURL){
					 jQuery(this).parent().parent().parent().addClass("selected");
					 jQuery(this).parent().parent().css("display","block");
					 jQuery(this).parent().addClass("selected");
			  }//end if
		});	
		jQuery("ul#tggnav li a").each(function() {
			  var listURL = jQuery(this).attr("href");
			  
			  if(selectedURL == listURL){
					 jQuery(this).parent().addClass("selected");
					 jQuery("ul#tggnav li ul li").children().css("display","block");
					 return false;
					 //jQuery(this).children().addClass("selected");
			  }//end if
		});         
	});
	        jQuery(function() { 
			   var he = jQuery('#tggnav li').hasClass('selected');
			   if(he == true){
				         var he = jQuery('#tggnav li.selected ul').css('display','block');
			   }//end if
	        });

/*  Z_LeNOR  */
