$(document).ready(function(){
	var grande=0
	var i;
	$(".catg ul li a").each(function(i){ 
		v_w=$(this).width();
		if(v_w>grande){ grande=v_w; }
	});
	$(".catg ul li a").css({'width': (grande/12)+'em'});
	var t_v=$(".catg ul ").width();
	var li_item=$(".catg ul li ").width();
	var col=Math.floor(t_v/li_item);
	var nun_item=$(".catg ul li a").length;
	if(col>nun_item){ col=nun_item }
	var ul_m=(t_v-(col* li_item))/2;
	var ul_m_p=Math.floor(ul_m *100/t_v)
	$(".catg ul").css({'margin-left': ul_m_p+'%'})
});
//______________________________________________________
var login_error=false;
//______________________________________________________
/*function carga_banner_video(){
	if(document.getElementById('banners')){ carga_banner_swf();}
	if(document.getElementById('player')){ carga_videos(); }
	if(document.getElementById('box_video_1')){ carga_videos(); }
}*/
//______________________________________________________
/*function carga_video(){
	var so = new SWFObject('media/video/player.swf','mpl','100%','274','9');
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','true');
	so.addParam("wmode", "opaque");
	so.addParam("flashvars","&amp;file=media/video/video_portada_es.xml&amp;bufferlength=10&amp;linktarget=_blank&amp;autostart=false&amp;displayclick=fullscreen&amp;fullscreen=true&amp;playlist=right&amp;playlistsize=225&amp;logo=media/video/logo_icon.png&amp;bufferlength=5&amp;item=0");
	if(document.getElementById('player')){so.write('player');}
}
window.onload=carga_video;*/
//______________________________________________________

/* Load IE6 fix */
/*if (window.ie6) {
	YOOTools.include('/js/pngfix/ie6fix.js');
	YOOTools.include('/js/pngfix/ie6png.js');
	YOOTools.include('/js/pngfix/yoo_ie6fix.js');
}*/
function share(identifier) {
	var shareURL = "";
	var URL = window.document.location.href;

	//se quita la posible # del final
	if (URL.charAt(URL.length-1) == "#")
	{
		URL = URL.substring(0,URL.length-1);
	}
	
	var titleURL = encodeURIComponent(window.document.title);

	if (identifier == 'meneame.net') {
		shareURL = 'http://meneame.net/submit.php?url='+URL;
	} else if (identifier == 'del.icio.us') {
		shareURL = 'http://del.icio.us/post?title='+titleURL+'&url='+URL;
	} else if (identifier == 'digg.com') {
		shareURL = 'http://digg.com/submit?phase=2&url='+URL+'&title='+titleURL;
	} else if (identifier == 'facebook.com') {
		shareURL = 'http://www.facebook.com/sharer.php?u='+URL;
	} else if (identifier == 'yahoo.es') {
		shareURL = 'http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+URL+'&t='+titleURL;
	} else if (identifier == 'fresqui') {
		shareURL = 'http://tec.fresqui.com/post?url='+URL+'&title='+titleURL;
	} else if (identifier == 'technorati') {
		shareURL = 'http://www.technorati.com/';
	} else if (identifier == 'blogger') {
		shareURL = 'http://www.blogger.com/blog_this.pyra?t='+algo+'&amp;u='+URL+'&amp;n='+titleURL;
	}
		
	   
	if (shareURL != "") {
		window.open(shareURL);
	}
	return false;
}

