//debug object
function var_dump(obj) {
   if(typeof obj == "object") {
      return "Type: "+typeof(obj)+((obj.constructor) ? "\nConstructor: "+obj.constructor : "")+"\nValue: " + obj;
   } else {
      return "Type: "+typeof(obj)+"\nValue: "+obj;
   }
}

//precarga de imagenes(fade)
var fadeloadImg = function(id){
	$.each($(id + ' img'),function(a,b){
		$(this).hide().load(function(){
			$(this).fadeIn();
		});
	});
}

//insert flash
var embedFlash = function(div,pelicula,ancho,alto){

		var objt = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+ancho+'" height="'+alto+'" title="Men&uacute; de navegaci&oacute;n">';
	
		objt += '<param name="movie" value="'+pelicula+'" />';
		objt += '<param name="quality" value="high" />';
		objt += '<param name="allowFullScreen" value="true" />';
		objt += '<param name="wmode" value="transparent" />';
		objt += '<embed src="'+pelicula+'" width="'+ancho+'" height="'+alto+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>';
		objt += '</object>';
		
		$(div).html(objt);	
}
