// JavaScript Document

$(document).ready(function() {
	
	
			
//start script
$('#ycyclista_image_gallery').after('<div id="gallery_captions"><p id="captions"></p></div>').cycle({
fx:	'fade',
speed:	1000,
after:	function() { 
	$('#captions').html(this.alt);
	}
});

						      
    $("#searchField").focus(function() {
        if ($(this).val() == "SEARCH") {
            $(this).val("");
        }
    });
    
	 $("#searchField").blur(function() {
	if ($(this).val() == "") {
            $(this).val("SEARCH");
        }
    });
   
   function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

	equalHeight($(".post"));
	
	//<![CDATA[


	//]]>
    
 /*   $("#commentform").submit(function(e) {
        URL = "/?s=" + $("#s").val() + " #inside";
        $mainContent.load(URL, function() {
            $ajaxSpinner.fadeOut();
            $mainContent.animate({ opacity: "1" });
            hashizeLinks();   
        });
        e.preventDefault();
    });
*/

//End document ready func

if(navigator.platform == 'iPad')
{
	 /*$("#pageFooter").css({'position' : 'absolute', 'top' : '590px', 'left' : '0px'});*/
	var name = "#pageFooter";
	var menuYloc = null;
	
	
			menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
			$(window).scroll(function () { 
				offset = menuYloc+$(document).scrollTop()+"px";
				$(name).animate({top:offset},{duration:100,queue:false});
			});

};
});
