<!--
/**
 * K-onstruct CMS
 * Copyright (C) 2008-2011 Kevin Kis
 *
 * Formerly known as CECMS Content Management System
 *
 * PHP version 5
 * @copyright  2008-2011 Kevin Kis
 * @author     Kevin Kis <http://www.k-kombinat.de>
 *
 */

/**
 * Load on ready state
 */


$(function() {
    
    startanimation();
    initBlinkHandler()

});

function startanimation() {
    
   // animate right pages
    setTimeout(function(){
        animateHomePageSmall(1300);
        blinkbyopacity('#HomepagePagesSmall', 0.60, 2000);
    },600);
    
    // animate macronumber
    setTimeout(function(){
        animateMacroLinkName('576');
    },3000);
    
     // load logo
    setTimeout(function(){
        animateHomapageLogo();
    },3500);
    
}

function animateHomePageSmall(time) {
    $('#HomepagePagesSmall').animate({"right": "+=260px"}, time);
}

function animateHomapageLogo() {
    showbyid('#HomepageLogo');
    $('#HomepageLogo').animate({"opacity": "+=0.70"}, 1000);
    $('#HomepageLogo').animate({"opacity": "+=0.10"}, 300);
    $('#HomepageLogo').animate({"opacity": "-=0.25"}, 1000);
}

function initBlinkHandler() {
    
     $("#HomepagePagesSmall").mouseover(function() {
        stopblinkbyopacity = true;
     });
     $("#HomepagePagesSmall").mouseout(function() {
        stopblinkbyopacity = false;
        blinkbyopacity('#HomepagePagesSmall', 0.60, 2000);
     });
}

function checksmallpageanimation() {
    setTimeout(function(){
        if($('#HomepagePagesBig').attr("style") == "display: none;") {
            stopblinkbyopacity = false;
            blinkbyopacity('#HomepagePagesSmall', 0.60, 2000);
        }else {
            stopblinkbyopacity = true;
        }
    },1200);
}


    
    


