﻿$(document).ready(function () {
    // Starta slideshow
    $('.c4sliderandom').cycle({
        fx: 'turnDown',
        timeout: 250000,
        speed: 1000,
        random: 1
    });

    $('.c4sliderandom').fadeIn(200);

    // $('.divflashvideo').show();

    $(".fadein").fadeIn(600);

    $('.c4click')
    .mouseover(function (e) {
        $(this).addClass("hover");
    })
    .mouseout(function (e) {
        $(this).removeClass("hover");
    })
    .click(function (e) {
        $(this).find("a").each(function (e) {
            if ($(this).attr("href") != null) {
                document.location = $(this).attr("href");
            }
        });
    });
});

// analys online
function targetWindow(url) {
    var hwnd = ""
    var qvwinparams = "toolbar=0,location=0,directories=0,status=0,menubar=no,scrollbars=yes,copyhistory=0,dependent=yes,resizable=yes"
    screenWidth = screen.width
    screenHeight = screen.height
    qwinWidth = screenWidth * 0.9
    qvwinparams = qvwinparams + ",width=" + qwinWidth
    qwinHeight = screenHeight * 0.9
    qvwinparams = qvwinparams + ",height=" + qwinHeight
    qwinTop = (screenWidth * 0.1) / 2
    qvwinparams = qvwinparams + ",top=" + qwinTop
    qwinLeft = (screenHeight * 0.1) / 2
    qvwinparams = qvwinparams + ",left=" + qwinLeft
    hwnd = window.open(url, 'QlikView', qvwinparams);
    hwnd.focus();
}
