function modal(openElement, className) {
Y.one(openElement).on('click', function() {
Y.one('body').toggleClass(className);
});
}

Y.use('node', function() {
Y.on('domready', function() {
modal('#modal-open', 'show-modal');
});
});
 
#modal-open {
padding: 0.75em 1.0em;
border-radius: 3px;
background-color: black;
color: #e6e6e6;
display: inline-block;
position: absolute;
right: 2.0em;
top: 2.0em;
cursor: pointer;
&:after {
content:"+";
}
}

.show-modal #modal-open:after {
content:"x";
}

.modal {
position: absolute;
left: -9999px;
margin-left: -300px;
top: 50%;
margin-top: -100px;
opacity: 0;
width: 500px;
height: 200px;
padding: 2.0em;
display: table;
background-color: black;
color: #e6e6e6;
z-index: 99;
-moz-transform: scale(0.9,0.9);
-webkit-transform: scale(0.9,0.9);
transform: scale(0.9,0.9);
-moz-transition: opacity 0.2s ease, -moz-transform 0.2s ease, left 0.0s 0.2s ease;
-webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease, left 0.0s 0.2s ease;
transition: opacity 0.2s ease, transform 0.2s ease, left 0.0s 0.2s ease;
}

.show-modal .modal {
position: absolute;
left: 50%;
opacity: 1;
-moz-transform: scale(1,1);
-webkit-transform: scale(1,1);
transform: scale(1,1);
-moz-transition: opacity 0.2s ease, -moz-transform 0.2s ease;
-webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease;
transition: opacity 0.2s ease, transform 0.2s ease;
}