/*
Theme Name: Vyrus Frontend Scripts
Description: Vyrus Frontend Scripts for WordPress.
Version: 1.0
Author: Vyrus Development Team
Author URI: http://www.virusworldwide.com
Tags: vyrus, vyrus-inc, virusworldwide.com
*/


jQuery(document).ready(function(){

    jQuery("div#popup-contact").css("left", (jQuery("body").width() - 862) / 2 + "px");
    jQuery("div#popup-careers").css("left", (jQuery("body").width() - 862) / 2 + "px");

    jQuery('div.menu ul li:nth-child(3)').click(function(){
        jQuery('body').css("overflow", "hidden");
        jQuery('div#popup-bg').css('display', 'block');
        jQuery('div#popup-contact').css('display', 'block');
    });
    
    jQuery('div.menu ul li:nth-child(4)').click(function(){
        jQuery('body').css("overflow", "hidden");
        jQuery('div#popup-bg').css('display', 'block');
        jQuery('div#popup-careers').css('display', 'block');
    });
    
    jQuery('#popup-bg').click(function(){
        jQuery('body').css("overflow", "scroll");
        jQuery("#popup-bg").css("display", "none");
        jQuery("#popup-contact").css("display", "none");
        jQuery("#popup-careers").css("display", "none");
    });
    
    jQuery('#popup-btn-contact-close').click(function(){
        jQuery('body').css("overflow", "scroll");
        jQuery("#popup-bg").css("display", "none");
        jQuery("#popup-contact").css("display", "none");
    });
    
    jQuery('#popup-btn-careers-close').click(function(){
        jQuery('body').css("overflow", "scroll");
        jQuery("#popup-bg").css("display", "none");
        jQuery("#popup-careers").css("display", "none");
    });
    
    jQuery('.upper-fold-text').mouseout(function(){
        jQuery('#upper-fold-box1 img').stop().animate({bottom:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box2 img').stop().animate({bottom:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box3 img').stop().animate({bottom:'0px', left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box4 img').stop().animate({right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box5 img').stop().animate({left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box6 img').stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box7 img').stop().animate({top:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box8 img').stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
    });
    
    jQuery('#upper-fold-logo img').hover(function(){
        jQuery('#upper-fold-box1 img').stop().animate({bottom:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box2 img').stop().animate({bottom:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box3 img').stop().animate({bottom:'0px', left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box4 img').stop().animate({right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box5 img').stop().animate({left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box6 img').stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box7 img').stop().animate({top:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box8 img').stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
    });

    jQuery('#upper-fold-box1 img').hover(function(){
        jQuery(this).stop().animate({bottom:'127px', right:'269px'},{queue:false,duration:300});
        jQuery('#upper-fold-box2 img').stop().animate({bottom:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box3 img').stop().animate({bottom:'0px', left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box4 img').stop().animate({right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box5 img').stop().animate({left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box6 img').stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box7 img').stop().animate({top:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box8 img').stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
    });
    
    jQuery('#upper-fold-box2 img').hover(function(){
        jQuery(this).stop().animate({bottom:'111px'},{queue:false,duration:300});
        jQuery('#upper-fold-box1 img').stop().animate({bottom:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box3 img').stop().animate({bottom:'0px', left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box4 img').stop().animate({right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box5 img').stop().animate({left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box6 img').stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box7 img').stop().animate({top:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box8 img').stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
    });
    
    jQuery('#upper-fold-box3 img').hover(function(){
        jQuery(this).stop().animate({bottom:'127px', left:'269px'},{queue:false,duration:300});
        jQuery('#upper-fold-box1 img').stop().animate({bottom:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box2 img').stop().animate({bottom:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box4 img').stop().animate({right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box5 img').stop().animate({left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box6 img').stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box7 img').stop().animate({top:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box8 img').stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
    });

    jQuery('#upper-fold-box4 img').hover(function(){
        jQuery(this).stop().animate({right:'253px'},{queue:false,duration:300});
        jQuery('#upper-fold-box1 img').stop().animate({bottom:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box2 img').stop().animate({bottom:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box3 img').stop().animate({bottom:'0px', left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box5 img').stop().animate({left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box6 img').stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box7 img').stop().animate({top:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box8 img').stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
    });
    
    jQuery('#upper-fold-box5 img').hover(function(){
        jQuery(this).stop().animate({left:'253px'},{queue:false,duration:300});
        jQuery('#upper-fold-box1 img').stop().animate({bottom:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box2 img').stop().animate({bottom:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box3 img').stop().animate({bottom:'0px', left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box4 img').stop().animate({right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box6 img').stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box7 img').stop().animate({top:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box8 img').stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
    });
    
    jQuery('#upper-fold-box6 img').hover(function(){
        jQuery(this).stop().animate({top:'127px', right:'271px'},{queue:false,duration:300});
        jQuery('#upper-fold-box1 img').stop().animate({bottom:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box2 img').stop().animate({bottom:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box3 img').stop().animate({bottom:'0px', left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box4 img').stop().animate({right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box5 img').stop().animate({left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box7 img').stop().animate({top:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box8 img').stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
    });
    
    jQuery('#upper-fold-box7 img').hover(function(){
        jQuery(this).stop().animate({top:'111px'},{queue:false,duration:300});
        jQuery('#upper-fold-box1 img').stop().animate({bottom:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box2 img').stop().animate({bottom:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box3 img').stop().animate({bottom:'0px', left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box4 img').stop().animate({right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box5 img').stop().animate({left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box6 img').stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box8 img').stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
    });
    
    jQuery('#upper-fold-box8 img').hover(function(){
        jQuery(this).animate({top:'127px', left:'271px'},{queue:false,duration:300});
        jQuery('#upper-fold-box1 img').stop().animate({bottom:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box2 img').stop().animate({bottom:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box3 img').stop().animate({bottom:'0px', left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box4 img').stop().animate({right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box5 img').stop().animate({left:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box6 img').stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});
        jQuery('#upper-fold-box7 img').stop().animate({top:'0px'},{queue:false,duration:300});
    });
});

