$.fn.digits = function(){ 
    return this.each(function(){ 
        $(this).text( $(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") ); 
    })
}



$(document).ready(function(){
    
    
    
    		
				/*$("#header_slide").cycle({
					fx: 'fade',
					 speed: 6000,
					pager: '#SlideNav_header'
				});*/
				$("#newsSlides").cycle({
						fx: 'fade',
						 speed: 500,
						 timeout:8000,
						pager: '#newsPager'
					});
			
		    
				$('#homeTestimonialSlider').cycle({
						 speed: 500,
						 timeout:8000
				
				});
				
				$('#logoSlider').cycle({
						 speed: 500,
						 timeout:8000,
						 random:1
				
				});
				
				
				
				$('#clients').cycle({
					fx: 'fade',
					 speed: 6000,
					pager: '#SlideNav_clients'
				});
			
			
				$("#testimonial").cycle({
						fx: 'fade',
						 speed: 6000,
						pager: '#SlideNav_testimonial'
					});
			
			 
				$("#benefits").cycle({
						fx: 'fade',
						 speed: 6000,
						pager: '#SlideNav_benefits'
					});
				
				/*slideshow for management team*/
				$("#slidesMangementTeam").cycle({
						fx: 'fade',
						 speed: 1000,
						pager: '#naviMngTeam'
					});
				/*end*/
				/*accordion for FAQ page*/
				/*$("#faqAccord").accordion({
						collapsible: true
					});*/
					
					$("#faqAccord  > div.ansBox").each(function(){
				        $(this).hide();
					});
					
	            $("#faqAccord > h3").each(function(){
		            $(this).click(function(){
		             $(this).toggleClass("ui-state-active");
			            $(this).next("div.ansBox").toggle();
		            });		
	            });
					
					
				/*end*/
				
				
				/*for Navigation drop*/	
					$('.dropParent').hoverIntent(
					function(){
					
						$(this).children('.drop').slideDown(200);
					},
					function(){
						$(this).children('.drop').slideUp(200);
					}
					);
				/*end*/
				
				/*for pop up*/	
					$('.qmark').hoverIntent(
					function(){
					
						$(this).children('.examples').fadeIn(0);
					},
					function(){
						$(this).children('.examples').fadeOut(0);
					}
					);
				/*end*/
				
				
				
				preloadCssImages();
			
});
