﻿$(document).ready(function () {

    // function for schedule class description div
    $(function () {

        $("#schedule a").hover(
            function (event) {

                //getting height and width of the message box
                var height = $('#scheduleClassDescription').height();
                var width = $('#scheduleClassDescription').width();

                //calculating offset for displaying popup message
                leftpx = event.pageX - (width / 2) - 275;

                if (leftpx < 300) {
                    leftpx += 575;
                }

                leftVal = leftpx + "px";
                topVal = event.pageY - (height / 2) + "px";

                // display class description based on what was hovered
                switch (event.target.id) {
                    case "mamaste":
                        $("#scheduleClassDescription").html("<h1>Mamaste</h1><p>This prenatal class is for pregnant moms 12-40 weeks. The aim of this class is to prepare moms for a positive birth experience while teaching breathing techniques, pelvic floor toning which aides in labor and helps with a quicker postpartum recovery, and overall strength. Moms share prenatal experiences, concerns and advice. * May attend earlier in pregnancy with instructor permission.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "250px" }).show();
                        break;

                    case "sweetpeas":
                        $("#scheduleClassDescription").html("<h1>Sweet Peas</h1><p>This class is for babies, ages 6 weeks old to crawlers, and their moms. The aim of the class is help heal the post-partum body by teaching moms relaxation techniques, posture awareness, pelvic floor and abdominal muscle strengthening exercises, and stretching. Yoga is a great way to combat those baby blues as it encourages a natural bonding between mother and child and introduces moms to a parenting community. For babies, yoga has been shown to aid in colic relief, improve digestion, reduce fussiness, and help establish healthy sleeping patterns.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "250px" }).show();
                        break;

                    case "grasshoppers":
                        $("#scheduleClassDescription").html("<h1>Grasshoppers</h1><p>This is a class for children ages 2 1/2 to 4 years old. This is a VERY active class focusing on having fun while playing yoga. Leave your inhibitions at the door! Playful music and movements are used to introduce yoga poses and games to your budding yogini. You can expect a flexible class structure as children of this age are typically unpredictable. Caregivers will enjoy the opportunity to meet other parents while their kids make new friends.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "250px" }).show();
                        break;

                    case "inchworms":
                        $("#scheduleClassDescription").html("<h1>Inchworms</h1><p>This class is for crawlers to age 2 1/2 and their caregivers. This class will focus on developing social and play skills for babies. For this age group, yoga helps improve digestion as well as strengthen muscles and increase neuromuscular and motor development. This is a fast paced class that incorporates a variety of songs and activities.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "250px" }).show();
                        break;

                    case "yogabears":
                        $("#scheduleClassDescription").html("<h1>Yoga Bears</h1><p>This class is for children ages 4 to 6. Introduce your child to the world of yoga!  Here, yoginis travel the world, go on fun adventures, and meet exotic animals as they learn yoga poses through a variety of games, activities, and playful movement. Adult yoga poses morph into animals as we 'visit' the jungle, the circus, or the ocean on one of our yoga journeys. Games promote teamwork and respect.  Imagination and creativity are always encouraged.  Children practice poses individually, with partners, and as part of a group to promote self discipline, compassion, and respect in a fun and non-competitive environment.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "275px" }).show();
                        break;

                    case "karmachameleons":
                        $("#scheduleClassDescription").html("<h1>Karma Chameleons</h1><p>This class is for children ages 7 to 9. An energetic and engaging class that introduces yoga through a variety of games and creative movement, children will learn both asanas (poses) and breathing techniques that promote body awareness and physical fitness. Strength and flexibility are challenged and creativity encouraged. Yoginis learn the benefits of poses in relation to their own lives and begin to discuss how the poses make them feel. Perfect alignment is not essential at this stage, instead emphasis is placed on creating individual goals and building self confidence. Children practice poses individually, with partners, and as part of a group to promote self discipline, compassion, and respect in a non-competitive environment.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "325px" }).show();
                        break;

                    case "warriors":
                        $("#scheduleClassDescription").html("<h1>Warriors</h1><p>Children ages 10-12 are introduced to yoga as a lifelong practice. Technique is emphasized as yoginis begin to focus on form, breath, discipline, and strength. Time is taken to discuss the physical benefits of yoga, proper alignment, and how yoga makes them  feel. Cooperation is also encouraged as yoginis explore partner poses and take turns teaching one another.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "250px" }).show();
                        break;

                    case "teens":
                        $("#scheduleClassDescription").html("<h1>Teens</h1><p>This class is for teens ages 13-18. Yoga is the perfect escape for overscheduled and stressed out teenagers! These classes combine strength and posture building poses with an added emphasis on breathing.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "200px" }).show();
                        break;

                    case "teensrestorative":
                        $("#scheduleClassDescription").html("<h1>Teens Restorative</h1><p>This class is for teens ages 13-18. Teens are under a lot of pressure. Teen yogis work on developing healthy coping skills for test anxiety, explore peer relationship issues, increase body awareness, and deal with the world around them through the use of breathing exercises and restorative poses. Our goal is to have teen yogis leave our studio refreshed and relaxed, and most importantly, more aware of how they can respect and take care of their bodies.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "260px" }).show();
                        break;

                    case "family":
                        $("#scheduleClassDescription").html("<h1>Family Yoga</h1><p>This class is for children ages 4 and up and their caregivers. The keyword in this class is FUN as you interact with your yogini and other families while learning yoga poses. Partner poses offer a wonderful bonding opportunity with your kids and give them a chance to share what they have been learning in yoga class.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "250px" }).show();
                        break;

                    case "storytime":
                        $("#scheduleClassDescription").html("<h1>Stories and Yoga</h1><p>Ages 6 months to 6 years. A great introduction to yoga for your little one! A lively half hour class that introduces your yogini to a variety of fun poses that coincide with colorful picture books. Caregivers take part in class with student.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "200px" }).show();
                        break;

                    case "birthday":
                        $("#scheduleClassDescription").html("<h1>Birthday Parties</h1><p>Please visit our <a href='events.aspx'>Events</a> page for more information.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "100px" }).show();
                        break;

                    case "feminine":
                        $("#scheduleClassDescription").html("<h1>Restorative for Women</h1><p>This restorative class focuses on supporting women's health, promoting vitality, fertility and balance while providing an outlet for stress. Empowers body, mind and spirit with breath, strength, and energy during transitions that define women's lives.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "150px" }).show();
                        break;

                    case "homeschooled":
                        $("#scheduleClassDescription").html("<h1>Home Schoolers (ages 5-10)</h1><p>This is a mixed age class (5-10 yrs) for children who are home schooled.  Breathing techniques, asana practice, and relaxation are emphasized.  Children work together in partner poses and are encouraged to be creative.</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "200px" }).show();
                        break;

                    case "toddlers":
                        $("#scheduleClassDescription").html("<h1>Toddlers</h1><p>This class is a mixed-age toddler + parent class for crawlers to age 4. Focus is on developing social and play skills. Class is very active and lots of fun!</p>");
                        $("#scheduleClassDescription").css({ left: leftVal, top: topVal, height: "150px" }).show();
                        break;
                }
            },
            function () {
                $("#scheduleClassDescription").hide();
                $("#scheduleClassDescription").html("");
            }
        );

        $("#scheduleClassDescription").hide();
    });
})
