jQuery.noConflict();

jQuery("#form_contacto").submit(function(e){


	e.preventDefault()

	if(Spry.Widget.Form && Spry.Widget.Form.validate(document.getElementById("form_contacto"))){
		jQuery('#enviar').attr('disabled', 'disabled')
		jQuery.ajax({

			url: jQuery(this).attr('action'),

			type: "POST",

			data: jQuery(this).serialize(),

			success: function(data){

				jQuery('#mensaje_form').append('<div id="msg">'+data+'</div>')
				jQuery.facebox({ ajax: 'trabaja_confirmacion.html' });
				document.getElementById("form_contacto").reset();
				jQuery('#enviar').removeAttr('disabled')

			}

		})

	}else{

		

	}

})


var WEB = 'http://www.exeperu.net/demos/bcu/'

function fbs_click(title, url)

{

    u=(url != '') ? WEB+''+url : location.href;

    t=(title != '') ? title : document.title;

    window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');

    return false;

}

function openShareTwitter(title, url){

    u=(url != '') ? WEB+''+url : location.href;

    t=(title != '') ? title: document.title;

    window.open("http://www.twitter.com/intent/tweet?text="+t.replace(/ /g,"+",t)+"&url="+u,"Twitter","toolbar=0, status=0, width=550, height=420");

    return false;

}

function openWin(url, w, h){

	window.open(url,"WINVT","toolbar=0, status=0, width="+w+", height="+h+"");

        return false;

}

function megusta(id,url){

    u=(url != '') ? WEB+''+url : location.href;

	//var str = '<iframe src="http://www.facebook.com/plugins/like?href='+u+'&amp;locale=es_ES&amp;layout=button_count&amp;show_faces=false&amp;width=113&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" style="border:none;width:110px;height:22px"></iframe>'

	var str = '<iframe src="//www.facebook.com/plugins/like.php?href='+u+'&amp;send=false&amp;layout=button_count&amp;width=110&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=242663505776336" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:21px;" allowTransparency="true"></iframe>'

	document.getElementById(id).innerHTML = str				

}

function enviaramigo(id,url){

    u=(url != '') ? WEB+''+url : location.href;

	var str = '<a href="enviar_amigo.php?iframe=true&amp;url='+u+'" class="popup" rel="popup"><img src="images/email.png" width="16" height="16" alt="Enviar a un Amigo" border="0" title="Enviar a un Amigo" style="margin-top:2px;"/></a>'

	document.getElementById(id).innerHTML = str		

}



jQuery(document).ready(function(e) {

	

	jQuery('a[rel*=popup]').facebox()

	jQuery('#cerrarx').click(function(e){

	

		e.preventDefault();

		jQuery.facebox.close();

		

	})

});
