< !DOCTYPE html> Xarelto
< !DOCTYPE html>
var tl = new TimelineMax(); var bgExit= document.getElementById('bgExit'); var refBtn = document.getElementById('refBtn'); var footer = document.getElementById('footer'); var footerLight = document.getElementById('footerLight'); var clickTag1 = "http://www.xarelto-info.co.uk/"; var clickTag2 = "http://www.xarelto-info.co.uk/static/new/site-resources/pdfs/prescribing-information.pdf";
var images = new Array(2); images[0] = "https://bjcardio.co.uk/wp-content/uploads/2016/11/references_text.png"; images[1] = "https://bjcardio.co.uk/wp-content/uploads/2016/11/ref2.png"; var numimg = 1; var curimg = 0; nextBtn.onclick=function(){ gofwd();}; prevBtn.onclick=function(){ goback();};
var im = document.getElementById("image");
function goback() {
var im=document.getElementById("image"); if(curimg>0){ TweenMax.to(im, 0.25, {opacity:0, delay:0, ease:Power1.easeOut}); TweenMax.to(im, 0.25, {opacity:1, delay:0.25, ease:Power1.easeOut}); setTimeout(function(){ im.src = images[curimg-1]; curimg = curimg - 1; if(curimg == 0){ nextBtn.style.opacity = 1; prevBtn.style.opacity = 0; } },250); }else{
} } function gofwd(){
var im=document.getElementById("image");
if(curimg < numimg){
TweenMax.to(im, 0.25, {opacity:0, delay:0, ease:Power1.easeOut});
TweenMax.to(im, 0.25, {opacity:1, delay:0.25, ease:Power1.easeOut});
setTimeout(function(){
im.src = images[curimg+1];
curimg = curimg + 1;
if(curimg == numimg){
nextBtn.style.opacity = 0;
prevBtn.style.opacity = 1;
}
},250);
}else{
}
}
//Events
bgExit.onclick=function(){ window.open(window.clickTag1); };
footer.onclick=function(){ window.open(window.clickTag2); };
footerLight.onclick=function(){ window.open(window.clickTag2); };
refBtn.onclick=function(){ TweenMax.to("#references", 0.75, {top:0, ease:Power1.easeOut}); TweenMax.to(["#refBtn", "#footer"], 0.25, {opacity:0, delay:0, ease:Power1.easeOut}); };
closeBtn.onclick=function(){ TweenMax.to("#references", 0.75, {top:90, ease:Power1.easeOut}); TweenMax.to(["#refBtn", "#footer"], 0.25, {opacity:1, delay:0.5, ease:Power1.easeOut}); };
function init(){
TweenMax.to("#mainImage", 15, {rotation:0.1, x:"-=470", ease:Sine.easeInOut});
tl.to("#copy1", 0.5, {opacity:1, ease:Power1.easeOut},"+=0.5");
tl.to("#copy1", 0.5, {opacity:0, ease:Power1.easeOut}, "+=2.5");
tl.to("#copy2", 0.5, {opacity:1, ease:Power1.easeOut});
tl.to("#copy2", 0.5, {opacity:0, ease:Power1.easeOut}, "+=2");
tl.to("#copy2b", 0.5, {opacity:1, ease:Power1.easeOut});
tl.to("#copy2b", 0.5, {opacity:0, ease:Power1.easeOut}, "+=1.5");
tl.to("#copy3", 0.5, {opacity:1, ease:Power1.easeOut});
tl.to("#copy3", 0.5, {opacity:0, ease:Power1.easeOut},"+=2");
tl.to("#copy2b", 0.5, {opacity:1, ease:Power1.easeOut});
tl.to("#copy2b", 0.5, {opacity:0, ease:Power1.easeOut}, "+=1.5");
tl.to("#copy4", 0.5, {opacity:1, ease:Power1.easeOut});
tl.to("#refBtn", 0.5, {display:"block", opacity:1, ease:Power1.easeOut},"-=0.5");
tl.to("#footer", 0.5, {display:"block", opacity:1, ease:Power1.easeOut},"-=0.5");
}
window.onload = function() {
init();
};