jQuery(function () {

    "use strict";

    /* Header paralax */
    jQuery(window).mousemove(function (e) {
        parallax(e, document.getElementById('c1'), 2);
        parallax(e, document.getElementById('c2'), 1);
    });

    function parallax(e, target, layer) {
        var strength = 40;
        var layer_coeff = strength / layer;
        var x = (jQuery(window).width() - target.offsetWidth) / 2 - (e.pageX - (jQuery(window).width() / 2)) / layer_coeff;
        var y = (jQuery(window).height() - target.offsetHeight) / 2 - (e.pageY - (jQuery(window).height() / 2)) / layer_coeff;
        jQuery(target).offset({
            top: y,
            left: x
        });
    };

});
