$(document).ready(function() { // <- inicio

			// estilos al buscador head ---------------
			$(function(){
			$('#buscador_head').jqTransform			({imgPath:'/jqtransformplugin/img/'});
			$('#que_busca .selects').jqTransform	({imgPath:'/jqtransformplugin/img/'});
			$('.cantidad').jqTransform				({imgPath:'/jqtransformplugin/img/'})

			});		
		
			// slide del head -------------------------
			$('#slides').cycle({ 
				fx:     'scrollHorz', 
				speed:  '2000',
				timeout: 11000, 
				next:   '#next', 
				prev:   '#prev' ,
				pager:   '#pager'
			});
			
			
			// slide ficha propiedad -------------------------

			$('#ficha_slide_fotos').cycle({
				fx:      'scrollHorz',
				timeout:  0,
				prev:    '#ficha_slide_prev',
				next:    '#ficha_slide_next',
				pager:   '#ficha_slide_nav'
			});
	
			//  tabs en ficha propiedad -------------------------			

			$("ul#tabs").idTabs(); 
			
			//  columna listado -------------------------

			$("div#emprendimientos_listado > div:nth-child(3n)").addClass('last');
			$("div.linea_fotos > img:nth-child(3n)").addClass('last');
			$("div#edificios_listado > div:nth-child(4n)").addClass('last');
			
			//  quita puntito a submenu -------------------------
			

			//  checkbox ------------------------------------------------
			
			$(".CheckBoxClass").change(function(){
				if($(this).is(":checked")){
					$(this).next("label").addClass("LabelSelected");
				}else{
					$(this).next("label").removeClass("LabelSelected");
				}
			});


			//  scroll  ------------------------------------------------

			$(function()
			{
				$('.scroll-pane').jScrollPane();
				$('.scroll-pane-arrows').jScrollPane(
					{
						showArrows: true,
						horizontalGutter: 10
					}
				);
			});
	
		
			//  popup  ------------------------------------------------
			$(".consultar").colorbox({width:"910px", height:"400px", iframe:true});
			$(".ef").colorbox({width:"80%", height:"80%", iframe:true});
			$("a[rel='popup_slide']").colorbox({slideshow:true});
			$(".zoom_mapa").colorbox({width:"80%", height:"80%", iframe:true});

			
	
			
}); // <- fin


// TOOLTIP


(function($) {

	$.fn.easyTooltip = function(options){
	  
		// default configuration properties
		var defaults = {	
			xOffset: 10,		
			yOffset: 25,
			tooltipId: "easyTooltip",
			clickRemove: false,
			content: "",
			useElement: ""
		}; 
			
		var options = $.extend(defaults, options);  
		var content;
				
		this.each(function() {  				
			var title = $(this).attr("title");				
			$(this).hover(function(e){											 							   
				content = (options.content != "") ? options.content : title;
				content = (options.useElement != "") ? $("#" + options.useElement).html() : content;
				$(this).attr("title","");									  				
				if (content != "" && content != undefined){			
					$("body").append("<div id='"+ options.tooltipId +"'>"+ content +"</div>");		
					$("#" + options.tooltipId)
						.css("position","absolute")
						.css("top",(e.pageY - options.yOffset) + "px")
						.css("left",(e.pageX + options.xOffset) + "px")						
						.css("display","none")
						.fadeIn("fast")
				}
			},
			function(){	
				$("#" + options.tooltipId).remove();
				$(this).attr("title",title);
			});	
			$(this).mousemove(function(e){
				$("#" + options.tooltipId)
					.css("top",(e.pageY - options.yOffset) + "px")
					.css("left",(e.pageX + options.xOffset) + "px")					
			});	
			if(options.clickRemove){
				$(this).mousedown(function(e){
					$("#" + options.tooltipId).remove();
					$(this).attr("title",title);
				});				
			}
		});
	  
	};

})(jQuery);



// tooltips
	$(document).ready(function(){	
	
		$("a#tooltip1").easyTooltip({
			useElement: "laempresahome"				   
		});
		
		$("a#tooltip2").easyTooltip({
			useElement: "servicioshome"				   
		});

	});


/*-------------------------------------------------------------------- 
 * JQuery Plugin: "EqualHeights"
 * by:	Scott Jehl, Todd Parker, Maggie Costello Wachs (http://www.filamentgroup.com)
 *
 * Copyright (c) 2008 Filament Group
 * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
 *
 * Description: Compares the heights or widths of the top-level children of a provided element 
 		and sets their min-height to the tallest height (or width to widest width). Sets in em units 
 		by default if pxToEm() method is available.
 * Dependencies: jQuery library, pxToEm method	(article: 
		http://www.filamentgroup.com/lab/retaining_scalable_interfaces_with_pixel_to_em_conversion/)							  
 * Usage Example: $(element).equalHeights();
  		Optional: to set min-height in px, pass a true argument: $(element).equalHeights(true);
 * Version: 2.0, 08.01.2008
--------------------------------------------------------------------*/


                        $(document).ready(function(){
                        
                            $("#nosotros_anima div").hover(function() {
                                $(this).children("img").animate({opacity: "show", width: "260px", height: "376px"}, "fast");
                            }, function() {
                                $(this).children("img").animate({opacity: "hide",width: "0", height: "0"}, "fast");
                            });
                         });

