$(document).ready(function(){
		
		$('.slider').cycle({
			fx: 'fade',
			prev:   '.left-arrow', 
			next:   '.right-arrow',
			speed: 2000,
			timeout: 6000,
			pager: '.pager',

			pagerAnchorBuilder: pagerFactory

		});
		
		$('.services-slider').cycle({
			fx: 'fade',
			prev:   '.serv-left', 
			next:   '.serv-right',
			speed: 1000,
			timeout: 0
		});

		function pagerFactory(idx, slide) {

			var s = idx > 4 ? ' style="display:none"' : '';
	
			return '<li'+s+'><a href="#">'+(idx+1)+'</a></li>';

		};
		
		// Equalize Dark Div With The Height of the site
		var setHeights = function(){	   
		    	var site_height = $('html').height();
		    	$('.dark').css('height', site_height );
		}
		
		setTimeout(setHeights,500);	
		
		//-------------------------------------------------
		
		$('.service ul li').click(function(){
			var clickN =  $(this).index()-1;
			$('.services-slider').cycle(clickN); 
			$('.dark').fadeIn(500, function(){
				$('.services').fadeIn(500);
			});
			return false;
		});
		$('.dark').click(function(){
			
			$('.dark').fadeOut(500);
			$('.services').fadeOut(500);
		});
		$('.services').click(function(event){
			event.stopPropagation();	
		});
		
		$('.right-info li:last-child').css("border","none");
		<!--$('.service ul li:last-child').css("margin","0");-->
		$('.services-box').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery1').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery2').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery3').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery4').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery5').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery6').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery7').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery8').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery9').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery10').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery11').lightBox({fixedNavigation:true});
		$('.gallery ul li .gallery12').lightBox({fixedNavigation:true});
	
	
	// Services HTML Injection
	
	$('<div class="left3"></div><div class="right3"></div><div class="left8"></div><div class="right8"></div><div class="left23"></div><div class="right23"></div><div class="left33"></div><div class="right33"></div>').insertAfter('.service ul li h4');
	
	//this function attached focus and blur events with input elements
	var addFocusAndBlur = function($input, $val){
		
		$input.focus(function(){
			if (this.value == $val) {this.value = '';}
		});
		
		$input.blur(function(){
			if (this.value == '') {this.value = $val;}
		});
	}
	
	//this function attached focus and blur events with textarea elements
	var addFocusAndBlur = function($textarea, $val){
		
		$textarea.focus(function(){
			if (this.value == $val) {this.value = '';}
		});
		
		$textarea.blur(function(){
			if (this.value == '') {this.value = $val;}
		});
	}

	// example code to attach the events
	addFocusAndBlur(jQuery('#nombre'),'Nombre completo');
	addFocusAndBlur(jQuery('#correo'),'Correo electrónico');
	addFocusAndBlur(jQuery('#consulta'),'Consulta');
	
	
});

<!--DD_roundies.addRule('.service ul li', '96px');-->

