// blink_eye()
// make_copy_n
// make_copy_h
// make_copy_o
// make_copy_s
// make_copy_a

//var callback1
//var callback2
// n_to_o()
// n_to_h()
// n_to_a()
// n_to_s()

// s_to_n()
// h_to_n()
// o_to_n()
// a_to_n()

// h_to_s()
// o_to_s()
// a_to_s()

// h_to_o()
// a_to_o()
// s_to_o()

// a_to_h()
// s_to_h()
// o_to_h()

// h_to_a()
// s_to_a()
// o_to_a()

//=========================================
function blink_eye()
{
    var blink1_right = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p2' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4, reversesecondPath: 'true' });

    var blink1_right_2 = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p3' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4,  reversesecondPath: 'true' });

    var blink1_right_3 = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p4' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true'});

    var blink1_right_4 = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p5' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true'});

    var blink1_right_5 = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p6' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4,  reversesecondPath: 'true' });

    var blink1_right_6 = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p7' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true'});

    var blink2_right = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p2' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true' });

    var blink2_right_2 = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p3' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true' });

    var blink2_right_3 = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p4' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true' });

    var blink2_right_4 = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p5' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true' });

    var blink2_right_5 = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p6' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true' });

    var blink2_right_6 = KUTE.to('#happy_right_blink_p1', {path: '#happy_right_blink_p6' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true'});


    var blink1_left = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p2' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4, reversesecondPath: 'true' });

    var blink1_left_2 = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p3' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4,  reversesecondPath: 'true' });

    var blink1_left_3 = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p4' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true'});

    var blink1_left_4 = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p5' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true'});

    var blink1_left_5 = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p6' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4,  reversesecondPath: 'true' });

    var blink1_left_6 = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p7' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true'});

    var blink2_left = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p2' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true' });

    var blink2_left_2 = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p3' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true' });

    var blink2_left_3 = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p4' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true' });

    var blink2_left_4 = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p5' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true' });

    var blink2_left_5 = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p6' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true' });

    var blink2_left_6 = KUTE.to('#happy_left_blink_p1', {path: '#happy_left_blink_p6' }, {
    duration: time_b, easing: 'easingExponential', morphindex:10, morphPrecision:4 ,  reversesecondPath: 'true'});

        blink1_right.chain(blink1_right_2);
        blink1_right_2.chain(blink1_right_3);
        blink1_right_3.chain(blink1_right_4);
        blink1_right_4.chain(blink1_right_5);
        blink1_right_5.chain(blink1_right_6);
        blink1_right_6.chain(blink2_right_6);
        blink2_right_6.chain(blink2_right_5);
        blink2_right_5.chain(blink2_right_4);
        blink2_right_4.chain(blink2_right_3);
        blink2_right_3.chain(blink2_right_2);
        blink2_right_2.chain(blink2_right);

        blink1_left.chain(blink1_left_2);
        blink1_left_2.chain(blink1_left_3);
        blink1_left_3.chain(blink1_left_4);
        blink1_left_4.chain(blink1_left_5);
        blink1_left_5.chain(blink1_left_6);
        blink1_left_6.chain(blink2_left_6);
        blink2_left_6.chain(blink2_left_5);
        blink2_left_5.chain(blink2_left_4);
        blink2_left_4.chain(blink2_left_3);
        blink2_left_3.chain(blink2_left_2);
        blink2_left_2.chain(blink2_left);

        blink1_right.start();
        blink1_left.start();

}; //function blink_eye()
//=================================================================

function make_copy_n()
{

    $(normal_right_eyebrow).clone().prop({ id: "first_right_eyebrow" }).appendTo('.face');
    $(normal_left_eyebrow).clone().prop({ id: "first_left_eyebrow" }).appendTo('.face');
    $(normal_mouth).clone().prop({ id: "first_mouth"  }).appendTo('.face');
    $(happy_outside_right_eye).clone().prop({ id: "first_right_eye" }).appendTo('.face');
    $(happy_outside_left_eye).clone().prop({ id: "first_left_eye" }).appendTo('.face');
    $(happy_teeth_up).clone().prop({ id: "first_teeth"  }).appendTo('.face');

    first_right_eyebrow.style.visibility='visible';
    first_left_eyebrow.style.visibility='visible';
    first_mouth.style.visibility='visible';
    first_right_eye.style.visibility='visible';
    first_left_eye.style.visibility='visible';
    first_teeth.style.visibility='visible';

    normal_right_eyebrow.style.visibility='hidden';
    normal_left_eyebrow.style.visibility='hidden';
    normal_mouth.style.visibility='hidden';
    happy_outside_right_eye.style.visibility='hidden';
    happy_outside_left_eye.style.visibility='hidden';
    happy_teeth_up.style.visibility='hidden';


}
//=================================================================

function make_copy_h()
{
    $(happy_right_eyebrow).clone().prop({ id: "first_right_eyebrow" }).appendTo('.face');
    $(happy_left_eyebrow).clone().prop({ id: "first_left_eyebrow" }).appendTo('.face');
    $(happy_mouth).clone().prop({ id: "first_mouth"  }).appendTo('.face');
    $(happy_outside_right_eye).clone().prop({ id: "first_right_eye" }).appendTo('.face');
    $(happy_outside_left_eye).clone().prop({ id: "first_left_eye" }).appendTo('.face');
    $(happy_teeth_up).clone().prop({ id: "first_teeth"  }).appendTo('.face');

    first_right_eyebrow.style.visibility='visible';
    first_left_eyebrow.style.visibility='visible';
    first_mouth.style.visibility='visible';
    first_right_eye.style.visibility='visible';
    first_left_eye.style.visibility='visible';
    first_teeth.style.visibility='visible';

    happy_right_eyebrow.style.visibility='hidden';
    happy_left_eyebrow.style.visibility='hidden';
    happy_mouth.style.visibility='hidden';
    happy_outside_right_eye.style.visibility='hidden';
    happy_outside_left_eye.style.visibility='hidden';
    happy_teeth_up.style.visibility='hidden';

}
//=================================================================

function make_copy_o()
{
    $(surprised_right_eyebrow).clone().prop({ id: "first_right_eyebrow" }).appendTo('.face');
    $(surprised_left_eyebrow).clone().prop({ id: "first_left_eyebrow" }).appendTo('.face');
    $(surprised_mouth).clone().prop({ id: "first_mouth"  }).appendTo('.face');
    $(surprised_right_eye_p1).clone().prop({ id: "first_right_eye" }).appendTo('.face');
    $(surprised_left_eye_p1).clone().prop({ id: "first_left_eye" }).appendTo('.face');
    $(surprised_teeth_down).clone().prop({ id: "first_s_t"  }).appendTo('.face');

    first_right_eyebrow.style.visibility='visible';
    first_left_eyebrow.style.visibility='visible';
    first_mouth.style.visibility='visible';
    first_right_eye.style.visibility='visible';
    first_left_eye.style.visibility='visible';
    first_s_t.style.visibility='visible';

    surprised_right_eyebrow.style.visibility='hidden';
    surprised_left_eyebrow.style.visibility='hidden';
    surprised_mouth.style.visibility='hidden';
    surprised_right_eye_p1.style.visibility='hidden';
    surprised_left_eye_p1.style.visibility='hidden';
    surprised_teeth_down.style.visibility='hidden';


}
//=================================================================

function make_copy_s()
{
    $(sad_right_eyebrow).clone().prop({ id: "first_right_eyebrow" }).appendTo('.face');
    $(sad_left_eyebrow).clone().prop({ id: "first_left_eyebrow" }).appendTo('.face');
    $(sad_mouth).clone().prop({ id: "first_mouth"  }).appendTo('.face');
    $(sad_right_eye_p1).clone().prop({ id: "first_right_eye" }).appendTo('.face');
    $(sad_left_eye_p1).clone().prop({ id: "first_left_eye" }).appendTo('.face');
    $(sad_chin).clone().prop({ id: "first_chin"  }).appendTo('.face');

    first_right_eyebrow.style.visibility='visible';
    first_left_eyebrow.style.visibility='visible';
    first_mouth.style.visibility='visible';
    first_right_eye.style.visibility='visible';
    first_left_eye.style.visibility='visible';
    first_chin.style.visibility='visible';

    sad_right_eyebrow.style.visibility='hidden';
    sad_left_eyebrow.style.visibility='hidden';
    sad_mouth.style.visibility='hidden';
    sad_right_eye_p1.style.visibility='hidden';
    sad_left_eye_p1.style.visibility='hidden';
    sad_chin.style.visibility='hidden';

}
//=================================================================
function make_copy_a()
{

    $(angry_right_eyebrow).clone().prop({ id: "first_right_eyebrow" }).appendTo('.face');
    $(angry_left_eyebrow).clone().prop({ id: "first_left_eyebrow" }).appendTo('.face');
    $(angry_mouth).clone().prop({ id: "first_mouth"  }).appendTo('.face');
    $(angry_right_eye_p1).clone().prop({ id: "first_right_eye" }).appendTo('.face');
    $(angry_left_eye_p1).clone().prop({ id: "first_left_eye" }).appendTo('.face');
    $(angry_chin).clone().prop({ id: "first_chin"  }).appendTo('.face');

    first_right_eyebrow.style.visibility='visible';
    first_left_eyebrow.style.visibility='visible';
    first_mouth.style.visibility='visible';
    first_right_eye.style.visibility='visible';
    first_left_eye.style.visibility='visible';
    first_chin.style.visibility='visible';

    angry_right_eyebrow.style.visibility='hidden';
    angry_left_eyebrow.style.visibility='hidden';
    angry_mouth.style.visibility='hidden';
    angry_right_eye_p1.style.visibility='hidden';
    angry_left_eye_p1.style.visibility='hidden';
    angry_chin.style.visibility='hidden';

}


//===emotions


//============================================================
function n_to_o()
{
var callback_o_1=function(){
    surprised_right_eyebrow.style.visibility='visible';
    surprised_left_eyebrow.style.visibility='visible';
    surprised_mouth.style.visibility='visible';
    surprised_right_eye_p1.style.visibility='visible';
    surprised_left_eye_p1.style.visibility='visible';
    surprised_teeth_down.style.visibility='visible'; //    surprised_teeth_down.style.visibility='visible';
}
//====================================================================
var callback_n_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_teeth").remove();
    $("#first_s_t").remove(); //***
    key_w=1;
}
//===========================================================

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#surprised_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#surprised_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var right_eye = KUTE.to('#first_right_eye', {path: '#surprised_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var left_eye = KUTE.to('#first_left_eye', {path: '#surprised_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#surprised_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false, complete:callback_o_1  });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_no_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 , complete:callback_n_2 });

//    surprised_teeth_down.style.visibility='visible';
    $("#surprised_teeth_down").clone().prop({ id: "first_s_t"  }).appendTo('.face');
    first_s_t.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_teeth.start();

}
//===================================================
function n_to_h()
{
var callback_h_1=function(){
    happy_right_eyebrow.style.visibility='visible';
    happy_left_eyebrow.style.visibility='visible';
    happy_mouth.style.visibility='visible';
    happy_outside_right_eye.style.visibility='visible';
    happy_outside_left_eye.style.visibility='visible';
    happy_teeth_up.style.visibility='visible';
}
//====================================================================
var callback_n_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_teeth").remove();
    key_w=1;
}
//===========================================================
    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#happy_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#happy_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, complete:callback_h_1 });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#happy_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:45, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false, complete:callback_n_2 });

    right_eyebrow.start();
    left_eyebrow.start();
    ch_mouth.start();

}
//===================================================
function n_to_a()
{
var callback_a_1=function(){
    angry_right_eyebrow.style.visibility='visible';
    angry_left_eyebrow.style.visibility='visible';
    angry_mouth.style.visibility='visible';
    angry_right_eye_p1.style.visibility='visible';
    angry_left_eye_p1.style.visibility='visible';
    angry_chin.style.visibility='visible';
}
//====================================================================
var callback_n_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_teeth").remove();
    $("#first_chin").remove(); // ***
    key_w=1;
}
//===========================================================
    $("#no_chin").clone().prop({ id: "first_chin"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#angry_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:3, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#angry_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:3, morphPrecision:1 , reverseSecondPath: false, reverseFirstPath: true });

    var right_eye = KUTE.to('#first_right_eye', {path: '#angry_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false });

    var left_eye = KUTE.to('#first_left_eye', {path: '#angry_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#angry_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:125, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false, complete:callback_a_1 });

    var ch_chin = KUTE.to('#first_chin', {path: '#angry_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_no_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true, complete:callback_n_2 });

//  no_chin.style.visibility='visible';
    first_chin.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();
    ch_teeth.start();
}
//============================================================
function n_to_s()
{
var callback_s_1=function(){
    sad_right_eyebrow.style.visibility='visible';
    sad_left_eyebrow.style.visibility='visible';
    sad_mouth.style.visibility='visible';
    sad_right_eye_p1.style.visibility='visible';
    sad_left_eye_p1.style.visibility='visible';
    sad_chin.style.visibility='visible';
}
//====================================================================
var callback_n_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_teeth").remove();
    $("#first_chin").remove(); // ***
    key_w=1;
}
//===========================================================
    $("#no_chin").clone().prop({ id: "first_chin"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#sad_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#sad_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1   , reverseSecondPath: false, reverseFirstPath: true });

    var right_eye = KUTE.to('#first_right_eye', {path: '#sad_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false });

    var left_eye = KUTE.to('#first_left_eye', {path: '#sad_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#sad_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false });

    var ch_chin = KUTE.to('#first_chin', {path: '#sad_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true , complete:callback_s_1 });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_no_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true, complete:callback_n_2  });

//  no_chin.style.visibility='visible';
    first_chin.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();
    ch_teeth.start();
}
//======================================================
function s_to_n()
{
var callback_n_1=function(){
    normal_right_eyebrow.style.visibility='visible';
    normal_left_eyebrow.style.visibility='visible';
    normal_mouth.style.visibility='visible';
    happy_outside_right_eye.style.visibility='visible';
    happy_outside_left_eye.style.visibility='visible';
    happy_teeth_up.style.visibility='visible';
}
//====================================================================
var callback_s_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_chin").remove();
    $("#first_teeth").remove();//***
    key_w=1;
}

//====================================================================
    $("#happy_no_teeth_up").clone().prop({ id: "first_teeth"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#normal_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1 , reverseSecondPath: false, reverseFirstPath: true });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#normal_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1 , reverseSecondPath: false, reverseFirstPath: true });

    var right_eye = KUTE.to('#first_right_eye', {path: '#happy_outside_right_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false });

    var left_eye = KUTE.to('#first_left_eye', {path: '#happy_outside_left_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#normal_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:40, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false });

    var ch_chin = KUTE.to('#first_chin', {path: '#no_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true , complete:callback_n_1 });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true, complete:callback_s_2 });

    //  happy_no_teeth_up.style.visibility='visible';
    first_teeth.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();
    ch_teeth.start();
}
//================================================
function h_to_n()
{
 var callback_n_1=function(){
    normal_right_eyebrow.style.visibility='visible';
    normal_left_eyebrow.style.visibility='visible';
    normal_mouth.style.visibility='visible';
    happy_outside_right_eye.style.visibility='visible';
    happy_outside_left_eye.style.visibility='visible';
    happy_teeth_up.style.visibility='visible';
}
//====================================================================
var callback_h_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_teeth").remove();
    key_w=1;
}
//===================================================================
    var ch_mouth = KUTE.to('#first_mouth', {path: '#normal_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:45, morphPrecision:1, reverseFirstPath:true, reverseSecondPath: true });

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#normal_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 , complete:callback_n_1 });

    var  left_eyebrow= KUTE.to('#first_left_eyebrow', {path: '#normal_left_eyebrow'}, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 , complete:callback_h_2});

    right_eyebrow.start();
    left_eyebrow.start();
    ch_mouth.start();
}
//====================================
function o_to_n()
{
 var callback_n_1=function(){
    normal_right_eyebrow.style.visibility='visible';
    normal_left_eyebrow.style.visibility='visible';
    normal_mouth.style.visibility='visible';
    happy_outside_right_eye.style.visibility='visible';
    happy_outside_left_eye.style.visibility='visible';
    happy_teeth_up.style.visibility='visible';
}
//====================================================================
var callback_o_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_s_t").remove();
    $("#first_teeth").remove();//***
    key_w=1;
}
//===================================================================
    $("#happy_no_teeth_up").clone().prop({ id: "first_teeth"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#normal_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1  });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#normal_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var right_eye = KUTE.to('#first_right_eye', {path: '#happy_outside_right_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var left_eye = KUTE.to('#first_left_eye', {path: '#happy_outside_left_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#normal_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true });

    var ch_down_teeth = KUTE.to('#first_s_t', {path: '#surprised_no_teeth_down' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, complete:callback_n_1 });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, complete:callback_o_2 });

    first_teeth.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_down_teeth.start();
    ch_teeth.start();

}
//=========================================================================
function a_to_n()
{
 var callback_n_1=function(){
    normal_right_eyebrow.style.visibility='visible';
    normal_left_eyebrow.style.visibility='visible';
    normal_mouth.style.visibility='visible';
    happy_outside_right_eye.style.visibility='visible';
    happy_outside_left_eye.style.visibility='visible';
    happy_teeth_up.style.visibility='visible';
}
//====================================================================
var callback_a_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_chin").remove();
    $("#first_teeth").remove();//***
    key_w=1;
}
//===================================================================
    $("#happy_no_teeth_up").clone().prop({ id: "first_teeth"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#normal_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1 , reverseSecondPath: false, reverseFirstPath: true });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#normal_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true });

    var right_eye = KUTE.to('#first_right_eye', {path: '#happy_outside_right_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false });

    var left_eye = KUTE.to('#first_left_eye', {path: '#happy_outside_left_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#normal_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false });

    var ch_chin = KUTE.to('#first_chin', {path: '#no_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true, complete:callback_n_1 });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true, complete:callback_a_2 });

    first_teeth.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();
    ch_teeth.start();
}
//================================================
function h_to_s()
{
 var callback_s_1=function(){
    sad_right_eyebrow.style.visibility='visible';
    sad_left_eyebrow.style.visibility='visible';
    sad_mouth.style.visibility='visible';
    sad_right_eye_p1.style.visibility='visible';
    sad_left_eye_p1.style.visibility='visible';
    sad_chin.style.visibility='visible';
}
//====================================================================
var callback_h_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_teeth").remove();
    $("#first_chin").remove(); //***
    key_w=1;
}
//===========================================================
    $("#no_chin").clone().prop({ id: "first_chin"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#sad_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#sad_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true  });

    var right_eye = KUTE.to('#first_right_eye', {path: '#sad_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false });

    var left_eye = KUTE.to('#first_left_eye', {path: '#sad_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#sad_mouth' }, {
    duration: time, easing: 'easingExponentialOut',  morphIndex:140, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false });

    var ch_chin = KUTE.to('#first_chin', {path: '#sad_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true , complete:callback_s_1});

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_no_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true , complete:callback_h_2});

    //    no_chin.style.visibility='visible';
    first_chin.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();
    ch_teeth.start();

}
//================================================
function o_to_s()
{
 var callback_s_1=function(){
    sad_right_eyebrow.style.visibility='visible';
    sad_left_eyebrow.style.visibility='visible';
    sad_mouth.style.visibility='visible';
    sad_right_eye_p1.style.visibility='visible';
    sad_left_eye_p1.style.visibility='visible';
    sad_chin.style.visibility='visible';
}
//====================================================================
var callback_o_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_s_t").remove();
    $("#first_chin").remove();//***
    key_w=1;
}
//===========================================================
    $("#no_chin").clone().prop({ id: "first_chin"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#sad_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:3, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#sad_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:3, morphPrecision:1   , reverseSecondPath: false, reverseFirstPath: true });

    var right_eye = KUTE.to('#first_right_eye', {path: '#sad_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false });

    var left_eye = KUTE.to('#first_left_eye', {path: '#sad_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#sad_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true , complete:callback_o_2});

    var ch_chin = KUTE.to('#first_chin', {path: '#sad_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true , complete:callback_s_1 });



    first_chin.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();
//  surprised_no_teeth_down.style.visibility='hidden';

}
//================================================**********************
function a_to_s()
{
 var callback_s_1=function(){
    sad_right_eyebrow.style.visibility='visible';
    sad_left_eyebrow.style.visibility='visible';
    sad_mouth.style.visibility='visible';
    sad_right_eye_p1.style.visibility='visible';
    sad_left_eye_p1.style.visibility='visible';
    sad_chin.style.visibility='visible';
}
//====================================================================
var callback_a_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_chin").remove();
    key_w=1;
}
//===========================================================

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#sad_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:13, morphPrecision:1});

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#sad_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:13, morphPrecision:1 });

    var right_eye = KUTE.to('#first_right_eye', {path: '#sad_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:110, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false });

    var left_eye = KUTE.to('#first_left_eye', {path: '#sad_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:110, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false ,complete:callback_s_1  });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#sad_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false ,complete:callback_a_2 });

    var ch_chin = KUTE.to('#first_chin', {path: '#sad_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false });


    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();

}
//================================================
function h_to_o()
{
var callback_o_1=function(){
    surprised_right_eyebrow.style.visibility='visible';
    surprised_left_eyebrow.style.visibility='visible';
    surprised_mouth.style.visibility='visible';
    surprised_right_eye_p1.style.visibility='visible';
    surprised_left_eye_p1.style.visibility='visible';
    surprised_teeth_down.style.visibility='visible';
}
//====================================================================
var callback_h_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_teeth").remove();
    $("#first_steeth").remove(); //***
    key_w=1;
}
//===========================================================
    $("#surprised_teeth_down").clone().prop({ id: "first_steeth"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#surprised_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#surprised_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var right_eye = KUTE.to('#first_right_eye', {path: '#surprised_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var left_eye = KUTE.to('#first_left_eye', {path: '#surprised_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#surprised_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false , complete:callback_o_1 });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_no_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, complete:callback_h_2  });

    first_steeth.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_teeth.start();

}
//================================================
function a_to_o()
{
var callback_o_1=function(){
    surprised_right_eyebrow.style.visibility='visible';
    surprised_left_eyebrow.style.visibility='visible';
    surprised_mouth.style.visibility='visible';
    surprised_right_eye_p1.style.visibility='visible';
    surprised_left_eye_p1.style.visibility='visible';
    surprised_teeth_down.style.visibility='visible';
}
//====================================================================
var callback_a_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_chin").remove();
    $("#first_steeth").remove(); //***
    key_w=1;
}
//===========================================================
    $("#surprised_teeth_down").clone().prop({ id: "first_steeth"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#surprised_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1   , reverseSecondPath: false, reverseFirstPath: true  });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#surprised_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true  });

    var right_eye = KUTE.to('#first_right_eye', {path: '#surprised_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:160, morphPrecision:1   , reverseSecondPath: true, reverseFirstPath: true  });

    var left_eye = KUTE.to('#first_left_eye', {path: '#surprised_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:160, morphPrecision:1   , reverseSecondPath: false, reverseFirstPath: true   });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#surprised_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false , complete:callback_o_1  });

    var ch_chin = KUTE.to('#first_chin', {path: '#no_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 , complete:callback_a_2  });

    first_steeth.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();

}
//================================================
function s_to_o()
{
var callback_o_1=function(){
    surprised_right_eyebrow.style.visibility='visible';
    surprised_left_eyebrow.style.visibility='visible';
    surprised_mouth.style.visibility='visible';
    surprised_right_eye_p1.style.visibility='visible';
    surprised_left_eye_p1.style.visibility='visible';
    surprised_teeth_down.style.visibility='visible';
}
//====================================================================
var callback_s_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_chin").remove();
    $("#first_steeth").remove(); //***
    key_w=1;
}
first_chin.style.visibility='hidden';
//===========================================================
    $("#surprised_teeth_down").clone().prop({ id: "first_steeth"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#surprised_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#surprised_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true });

    var right_eye = KUTE.to('#first_right_eye', {path: '#surprised_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:160, morphPrecision:1   , reverseSecondPath: false, reverseFirstPath: true });

    var left_eye = KUTE.to('#first_left_eye', {path: '#surprised_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:160, morphPrecision:1   , reverseSecondPath: true, reverseFirstPath: true });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#surprised_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false, complete:callback_o_1 });

    var ch_chin = KUTE.to('#first_chin', {path: '#no_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 , complete:callback_s_2 });

    first_steeth.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();

}
//================================================
function a_to_h()
{
var callback_h_1=function(){
    happy_right_eyebrow.style.visibility='visible';
    happy_left_eyebrow.style.visibility='visible';
    happy_mouth.style.visibility='visible';
    happy_outside_right_eye.style.visibility='visible';
    happy_outside_left_eye.style.visibility='visible';
    happy_teeth_up.style.visibility='visible';
}
//====================================================================
var callback_a_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_chin").remove();
    $("#first_teeth").remove();//***
    key_w=1;
}
//===========================================================
    $("#happy_no_teeth_up").clone().prop({ id: "first_teeth"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#happy_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1 , reverseSecondPath: false, reverseFirstPath: true });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#happy_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1 , reverseSecondPath: false, reverseFirstPath: true });

    var right_eye = KUTE.to('#first_right_eye', {path: '#happy_outside_right_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false  });

    var left_eye = KUTE.to('#first_left_eye', {path: '#happy_outside_left_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#happy_mouth' }, {                                                                         //////////moshkl dare
    duration: time, easing: 'easingExponentialOut', morphIndex:125, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true , complete:callback_h_1});

    //var ch_chin = KUTE.to('#first_chin', {path: '#no_chin' }, {
    //duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true  });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true , complete:callback_a_2 });

    first_teeth.style.visibility='visible';
    first_chin.style.visibility='hidden';

    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    //ch_chin.start();
    ch_teeth.start();

}
//================================================
function s_to_h()
{
var callback_h_1=function(){
    happy_right_eyebrow.style.visibility='visible';
    happy_left_eyebrow.style.visibility='visible';
    happy_mouth.style.visibility='visible';
    happy_outside_right_eye.style.visibility='visible';
    happy_outside_left_eye.style.visibility='visible';
    happy_teeth_up.style.visibility='visible';
}
//====================================================================
var callback_s_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_chin").remove();
    $("#first_teeth").remove();//***
    key_w=1;
}
//===========================================================
    $("#happy_no_teeth_up").clone().prop({ id: "first_teeth"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#happy_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1 , reverseSecondPath: false, reverseFirstPath: true });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#happy_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true });

    var right_eye = KUTE.to('#first_right_eye', {path: '#happy_outside_right_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false  });

    var left_eye = KUTE.to('#first_left_eye', {path: '#happy_outside_left_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:50, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false  });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#happy_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:125, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true });

    var ch_chin = KUTE.to('#first_chin', {path: '#no_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true, complete:callback_h_1 });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true, complete:callback_s_2 });

    first_teeth.style.visibility='visible';
    first_chin.style.visibility='hidden';

    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();
    ch_teeth.start();

}
//================================================
function o_to_h()
{
var callback_h_1=function(){
    happy_right_eyebrow.style.visibility='visible';
    happy_left_eyebrow.style.visibility='visible';
    happy_mouth.style.visibility='visible';
    happy_outside_right_eye.style.visibility='visible';
    happy_outside_left_eye.style.visibility='visible';
    happy_teeth_up.style.visibility='visible';
}
//====================================================================
var callback_o_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_s_t").remove();
    $("#first_teeth").remove();//***
    key_w=1;
}
//===========================================================
    $("#happy_no_teeth_up").clone().prop({ id: "first_teeth"  }).appendTo('.face');

    //var ch_mouth = KUTE.to('#first_mouth', {path: '#normal_mouth' }, {
   // duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true });


    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#happy_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#happy_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var right_eye = KUTE.to('#first_right_eye', {path: '#happy_outside_right_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var left_eye = KUTE.to('#first_left_eye', {path: '#happy_outside_left_eye' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#happy_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:145, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true  });

    var ch_down_teeth = KUTE.to('#first_s_t', {path: '#surprised_no_teeth_down' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, complete:callback_h_1  });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1 , complete:callback_o_2 });

    first_teeth.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_down_teeth.start();
    ch_teeth.start();

}
//================================================
function h_to_a()
{
var callback_a_1=function(){
    angry_right_eyebrow.style.visibility='visible';
    angry_left_eyebrow.style.visibility='visible';
    angry_mouth.style.visibility='visible';
    angry_right_eye_p1.style.visibility='visible';
    angry_left_eye_p1.style.visibility='visible';
    angry_chin.style.visibility='visible';
}
//====================================================================
var callback_h_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_teeth").remove();
    $("#first_chin").remove();//***
    key_w=1;
}
//===========================================================
    $("#no_chin").clone().prop({ id: "first_chin"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#angry_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:3, morphPrecision:1 , reverseSecondPath: false, reverseFirstPath: true });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#angry_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:3, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true  });

    var right_eye = KUTE.to('#first_right_eye', {path: '#angry_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false  });

    var left_eye = KUTE.to('#first_left_eye', {path: '#angry_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true  });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#angry_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:120, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false });

    var ch_chin = KUTE.to('#first_chin', {path: '#angry_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true  , complete:callback_a_1  });

    var ch_teeth = KUTE.to('#first_teeth', {path: '#happy_no_teeth_up' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true , complete:callback_h_2  });

    first_chin.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();
    ch_teeth.start();

}
//================================================
function s_to_a()
{
var callback_a_1=function(){
    angry_right_eyebrow.style.visibility='visible';
    angry_left_eyebrow.style.visibility='visible';
    angry_mouth.style.visibility='visible';
    angry_right_eye_p1.style.visibility='visible';
    angry_left_eye_p1.style.visibility='visible';
    angry_chin.style.visibility='visible';
}
//====================================================================
var callback_s_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_chin").remove();
    key_w=1;
}
//===========================================================

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#angry_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false  });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#angry_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false  });

    var right_eye = KUTE.to('#first_right_eye', {path: '#angry_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:110, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false });

    var left_eye = KUTE.to('#first_left_eye', {path: '#angry_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:110, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: false });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#angry_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true , complete:callback_a_1 });

    var ch_chin = KUTE.to('#first_chin', {path: '#angry_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false , complete:callback_s_2  });

    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();

}
//================================================
function o_to_a()
{
var callback_a_1=function(){
    angry_right_eyebrow.style.visibility='visible';
    angry_left_eyebrow.style.visibility='visible';
    angry_mouth.style.visibility='visible';
    angry_right_eye_p1.style.visibility='visible';
    angry_left_eye_p1.style.visibility='visible';
    angry_chin.style.visibility='visible';
}
//====================================================================
var callback_o_2=function(){
    $("#first_right_eyebrow").remove();
    $("#first_left_eyebrow").remove();
    $("#first_right_eye").remove();
    $("#first_left_eye").remove();
    $("#first_mouth").remove();
    $("#first_s_t").remove();
    $("#first_chin").remove(); //***
    key_w=1;
}
//===========================================================
    $("#no_chin").clone().prop({ id: "first_chin"  }).appendTo('.face');

    var right_eyebrow = KUTE.to('#first_right_eyebrow', {path: '#angry_right_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:3, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true  });

    var left_eyebrow = KUTE.to('#first_left_eyebrow', {path: '#angry_left_eyebrow' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:3, morphPrecision:1  , reverseSecondPath: false, reverseFirstPath: true  });

    var right_eye = KUTE.to('#first_right_eye', {path: '#angry_right_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: false });

    var left_eye = KUTE.to('#first_left_eye', {path: '#angry_left_eye_p1' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:150, morphPrecision:1, reverseSecondPath: false, reverseFirstPath: true  });

    var ch_mouth = KUTE.to('#first_mouth', {path: '#angry_mouth' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:10, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true , complete:callback_a_1});

    var ch_chin = KUTE.to('#first_chin', {path: '#angry_chin' }, {
    duration: time, easing: 'easingExponentialOut', morphIndex:300, morphPrecision:1, reverseSecondPath: true, reverseFirstPath: true , complete:callback_o_2 });


    first_chin.style.visibility='visible';
    right_eyebrow.start();
    left_eyebrow.start();
    right_eye.start();
    left_eye.start();
    ch_mouth.start();
    ch_chin.start();

}
//================================================

