jQuery(document).ready(function(){
//    jQuery("div#menu>ul>li>a").hover(function(){
//        jQuery(this).corner("top 5px");
//    });

    //jQuery("div#menu>ul>li ul").corner("bottom 5px");

    /*jQuery("div#menu>ul>li>ul>li>ul").corner("round 5px");
    jQuery("div#menu ul li a").hover(function(){
        jQuery(this).siblings("ul").dropShadow({left:-1,top:1,blur:2});}
    ,function(){
        jQuery(this).siblings("ul").removeShadow();
    });

    jQuery("div#menu>ul>li ul").each(function(){
        jQuery(this).hover(function(){
            jQuery(this).siblings("a").addClass("hover");
            if(!jQuery(this).attr("shadowid")){
                jQuery(this).dropShadow({left:-1,top:1,blur:2});}
            else{
                jQuery(this).redrawShadow({left:-1,top:1,blur:2});
            }},function(){
            jQuery(this).removeShadow();
            jQuery(this).siblings("a").removeClass("hover");
        });
    });*/
    jQuery("#home-image").height(jQuery("#home-content").height());
    jQuery("#about-image").height(jQuery("#about-content").height());
    jQuery("#product-image").height(jQuery("#product-content").height());
    jQuery("#lipotype-image").height(jQuery("#lipotype-content").height());
    jQuery("#community-image").height(jQuery("#community-content").height());

//    jQuery("#menu>ul>li>ul>li").hover(function(){
//        var position=$(this).position();
//        jQuery(this).children("ul").css({"top":position.top-8,"left":"-20em"});}
//    ,function(){});

    jQuery(".home-slider").anythingSlider({easing:"swing",autoPlay:false,startStopped:false,delay:3000,animationTime:600,hashTags:true,buildNavigation:false,pauseOnHover:true,startText:"Start",stopText:"Stop",navigationFormatter:null});

    jQuery("#home-tab ul li a#a1").click(function(){
        jQuery(".home-slider").anythingSlider(2);return false;
    });

    jQuery("#home-tab ul li a#a2").click(function(){
        jQuery(".home-slider").anythingSlider(3);return false;
    });

    jQuery("#home-tab ul li a#a3").click(function(){
        jQuery(".home-slider").anythingSlider(4);return false;
    });

    jQuery("#home-tab ul li a#a4").click(function(){
        jQuery(".home-slider").anythingSlider(5);return false;
    });

    jQuery("#home-tab ul li a#a5").click(function(){
        jQuery(".home-slider").anythingSlider(6);return false;
    });

    jQuery("#about-tab ul li a").hover(function(){
        jQuery(this).animate({width:"+=20"},400,function(){});
    },function(){
        jQuery(this).animate({width:"-=20"},300,function(){});
    });

    jQuery("#home-tab ul li a").hover(function(){
        jQuery(this).animate({width:"+=20"},400,function(){});
    },function(){
        jQuery(this).animate({width:"-=20"},300,function(){});
    });

    jQuery("a.incomplete").qtip({
        content: '<strong>Note:</strong> You are accessing the initial launch of our full SetWeight4Life site. Check back as we expand and add additional content and resources for your health.',
        show: 'mouseover',
        hide: 'mouseout',
        style: {
            name: 'cream', // Inherit from preset style
            tip: 'topMiddle',
            border: {
                width: 3,
                radius: 8,
                color: '#b68504'
            },
            width: 300,
            background: '#b68504',
            color: '#ffffff'
        },
        position: {
           corner: {
                target: 'bottomMiddle',
                tooltip: 'topMiddle'
           }
        }
    });

});
