jQuery.noConflict();

function ajaxRequestOld(url, update){
	jQuery("#"+update).html("<div style=\"width:100%; text-align: center; margin-bottom: 20px;\"><img src=\"http://static.adorocinema.com/images/ajax-loading.gif\"></div>");
	jQuery.ajax({
		url: url,
		cache: false,
		success: function(data){
			jQuery("#"+update).html("");
			jQuery("div#contentbody >" ,data).each(function (i,o){
				if(jQuery(o).attr("id") != "contentright"){
					jQuery("#"+update).append(jQuery(o).clone());
				}
			});
		}
	});
}

function ajaxPostOld(url, update, form){
	jQuery("#"+update).html("<div style=\"width:100%; text-align: center; margin-bottom: 20px;\"><img src=\"http://static.adorocinema.com/images/ajax-loading.gif\"></div>");
	jQuery.ajax({
		url: url,
		type: "POST",
		data: jQuery("#"+form).serialize(),
		cache: false,
		success: function(data){
			jQuery("#"+update).html("");
			jQuery("div#contentbody >" ,data).each(function (i,o){
				if(jQuery(o).attr("id") != "contentright"){					
					jQuery("#"+update).append(jQuery(o).clone());
				}
			});
		}
	});
}

/* Carregar box de comentarios */

jQuery(function($){
    jQuery('span.coment-responder.logado').click(function(){
        
        var comentId = jQuery(this).parent().parent().attr('id');

        if(jQuery('div#'+comentId+' #box-form').length == 0){
            jQuery('div#'+comentId+' span.coment-responder.logado:eq(0)').before('<div id="box-form" class="box-form clearfix">'+jQuery('#comentar div.box-form').html()+'</div>');
            $('div#' + comentId + ' #box-form > form').append('<input type="hidden" name="id_comentario" value="' + comentId + '" />');
        }
        estrelasHover();
    });
})
