window.addEvent('domready',function(){
	new FormCheck( 'formCheck2', {
		submit: false,
		onValidateSuccess: function() {
			new cpscaptcha( 'formCheck2', '', {
				addEvent: false,
				path: '/tools/cpscaptcha'
			});
		},
		onValidateFailure: function() {
			$$("#formCheck2 .fc-field-error").getPrevious().set( "styles", {
				"color": "#FF4000"
			});
		},
		display: {
			showErrors: 0,
			errorsLocation: 3,
			addClassErrorToField: 1
		}
	});

	$$('.mailTo').each( function(item, index) {
		item.addEvent('click',function( e ){
			Event( e ).stop();
			Shadowbox.open({
				player:  'iframe',
				content: './window/contactar.php?email='+item.get('rel'),
				height: 600,
				width: 600
			});
		});
	});

});
Shadowbox.init({players: ["html", "iframe", "img"]});