function carregarPagina(pagina, id){
	/*jQuery("#loading").center();*/
	jQuery("#loading").ajaxStart(function(){
	    $(this).fadeIn('fast');
    });
	jQuery('#'+id).load(pagina);
	jQuery("#loading").ajaxStop(function(){
    	$(this).fadeOut();
    });
}

jQuery(document).ready(function(){
				  
	swapValues = [];
    jQuery("#search_here").each(function(i){
        swapValues[i] = jQuery(this).val();
        jQuery(this).focus(function(){
            if (jQuery(this).val() == swapValues[i]) {
                jQuery(this).val("");
            }
        }).blur(function(){
            if (jQuery.trim($(this).val()) == "") {
                jQuery(this).val(swapValues[i]);
            }
        });
    });
	
	jQuery(".tags_blue li:last-child, .tags_yellow li:last-child").css("border-right", "none");
	
	jQuery("#carousel-photos a").click(function(){
		var largePath = $(this).attr("href");
		var largeAlt = $(this).attr("title");
		jQuery("#placeholder img").attr({ src: largePath, alt: largeAlt });
		jQuery("#description").html(largeAlt);
		return false;
	});
	
	//Modal Video
	/*var name = "#modal";
    var menuYloc = null;
	menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
        jQuery(window).scroll(function () { 
            var offset = menuYloc+$(document).scrollTop()+"px";
            jQuery(name).animate({top:offset},{duration:500,queue:false});
     });*/
	
	jQuery("#close").click(function(){
		jQuery("#modal").fadeOut('slow', function(){
		  	carregarPagina('../../_inc/iframe.php','video_player');
			jQuery("#overlay").fadeOut('fast');							   
		});
		return false;
	});
	
});