$(document).ready(function() {

/*	$("#menu-item-2431 a, #menu-item-2432 a, #quickcontact a, .bigbtn, .callout .loadwindow, .loadwindow").fancybox({
		'padding'		: 0,
		'autoScale'		: false,
		'transitionIn'	: 'none',
		'transitionOut'	: 'none',
		'centerOnScroll': true,
		'width'			: 900,
		'overlayColor'	: '#000',
		'overlayOpacity': '0.8',
		'height'		: 600,
		'type'			: 'iframe'
	});
*/
		$("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox();	

 });
$(document).ready(function() {	
	
	$('.filter .listfix li a').click(function() {
		
		
		$('.filter .listfix li').removeClass('selected');
		$(this).parent('li').addClass('selected');
		thisItem 	= $(this).attr('rel');
		if(thisItem != "all") {
			
			$('.workitems li[title='+thisItem+']').stop()
				.animate({'width' : '215px', 'opacity' : 1, 'marginRight' : '14px' });
																
			$('.workitems li[title!='+thisItem+']').stop()
				.animate({'width' : 0, 'opacity' : 0, 'marginRight' : 0 });
				
		} else {
			
			$('.workitems li').stop()
				.animate({'opacity' : 1, 'width' : '215px', 'marginRight' : '14px' });
		}
		
	});
		
	$(".workitems li .overlay").animate({'opacity' : 0});
	
		$('.workitems li').hover(function() {
			$(this).find(".overlay").animate({'opacity' : 1});
		}, function() {
			$(this).find(".overlay").animate({'opacity' : 0});
		});


	
		$('.menu-item-1627').click(function() {
			$(this).addClass('current-menu-item');
			$('.servicelinks').slideToggle(); 
		});

		 //setTimeout("element()",2000);
		 //$(".works .first").animate({marginLeft:"-=900px"}, 1000)
	
		 //$(".works .second").delay(100).animate({marginLeft:"-=900px"}, 1000)
	
		 //$(".copy").delay(200).animate({marginLeft:"-=900px"}, 1000)
		 
		$('.first .ss .mg').bxSlider({
			
				auto: true,
				controls: false,
				pause: 5000,
				speed: 1000,
				easing: 'easeInOutCubic',
				randomStart: true				
			
		});
		$('.second .ss .mg').bxSlider({
			
				auto: true,
				controls: false,
				pause: 4000,
				speed: 1000,
				easing: 'easeInOutCubic',
				randomStart: true				
			
			});
		
			
		$(function(){
			
			  var slider = $('#aboutslider').bxSlider({
				  
					auto: false,
					controls: false,
					speed: 500,
					easing: 'easeInOutCubic',
					randomStart: false				
				
			  });
			
			  $('.aboutslidenav ul li a').click(function(){
				
					var slideIndex = $('.aboutslidenav ul li a').index(this);
					
					slider.goToSlide(slideIndex);
					
					$('.aboutslidenav ul li a').removeClass('active');
					
					$(this).addClass('active');
					
					return false;
				
			  });
			  
			$('.aboutslidenav ul li a:first').addClass('active');
		
		}); 
		
        $('#coda').codaSlider({
			
			autoSlide: true,
			dynamicArrows: false,
			dynamicTabsAlign: 'right',
			firstPanelToLoad: 1
				
		});
	 
						
 });

 		Cufon.replace('h1');
		Cufon.replace('h2');
		Cufon.replace('h3');
		Cufon.replace('.menu-main-container a', { hover: true });
		Cufon.replace('.newsletter h5');
		Cufon.replace('strong.fon');
		Cufon.replace('.price-content h4');


