// JavaScript Document $(document).ready(function() { $(".fancy").fancybox(); $("div#filmer a").fancybox({ 'frameHeight': 392, 'frameWidth': 480 }); $(".chat_konf").mouseover(function() { $(".chat_picture").css("background-image", "url(/bilder/chat/chat_therese.png)"); }); $(".chat_priv").mouseover(function() { $(".chat_picture").css("background-image", "url(/bilder/chat/chat_monica.png)"); }); }); function ChangeOpacity2(e,opacity) { if(opacity >= 100) { e.style.opacity = '1.00'; e.style.filter = 'alpha(opacity=100)'; } else { e.style.opacity = '0.' + opacity + ''; } e.style.filter = 'alpha(opacity=' + opacity + ')'; } function ChangeBackground(bild, amount) { if (bild == amount) { bild = 0; } else { bild++; } document.getElementById('BackgroundHolder').style.background = document.getElementById('BackgroundDiv').style.background; ChangeOpacity2(document.getElementById('BackgroundHolder'), 100); document.getElementById('BackgroundDiv').style.background = 'url(' + document.getElementById('Background_' + bild + '').src + ')'; FadeBg(bild, amount); } var opacityNr = 100; function FadeBg(bild, amount) { if (opacityNr <= 5) { ChangeOpacity2(document.getElementById('BackgroundHolder'), 0); document.getElementById('BackgroundHolder').style.background = ''; ChangeOpacity2(document.getElementById('BackgroundHolder'), 100); opacityNr = 100; setTimeout(function(){ChangeBackground(bild, amount)},4000); } else { opacityNr = opacityNr - 10; ChangeOpacity2(document.getElementById('BackgroundHolder'), opacityNr); setTimeout(function(){FadeBg(bild, amount)},40); } } function submitThisForm(e) { var resultat = testForm(e,attTestas) if (resultat) { document.getElementById("verifyFrm").value = "verified"; e.action = window.location; } return resultat; }