﻿jQuery(function() {

    doHeaderPop();
    doAlpha(); 
   doNeedJob(); 
});

function setCurrentStyle(obj,st) {
   jQuery('#' + obj).addClass(st);
    if (obj == 'A2' | obj == 'A3' | obj == 'A4' | obj == 'A5') {
        jQuery('.linkmapinner>ul>li').find('.sgt').siblings('.linkdropdown').css({ "display": "block"});
    }
    else {
        jQuery('.linkmapinner>ul>li').find('.sgt').siblings('.linkdropdown').css({ "display": "none"});
    }
}

function doHeaderPop() {

        var method1 = "easeInOutCirc";
		var method2 =  "easeInOutCirc";
		//$('#example').animate({height:200}, {duration: 1000, easing: method1}).animate({height:100}, {duration: 1000, easing: method2});



    jQuery('.headerinner>ul>li').mouseenter(function() {
    jQuery(this).find('.subwebsitelogo').stop().animate({height:'184px'}, {duration: 800, easing: method1})
    });

    jQuery('.headerinner>ul>li').mouseleave(function() {
    jQuery(this).find('.subwebsitelogo').stop().animate({height:0}, {duration: 800, easing: method2})
    });
    
}


function doAlpha()
{
    jQuery('.indexul>li').mouseover(function(){
        var obj=$(this);
        obj.stop();
        var antiobj=obj.siblings('li');
        antiobj.each(function(){
            var obj2=$(this).find('img');
            obj2.stop();
            obj2.animate(
            {"opacity": "0.3"},500);
            
        });
    });
   
       jQuery('.indexul>li').mouseout(function(){
        var obj=$(this);
        obj.stop();
        var antiobj=obj.siblings('li');
        antiobj.each(function(){
            var obj2=$(this).find('img');
            obj2.stop();
            obj2.animate(
            {"opacity": "1"},500);
        });
    });
    
}


function doNeedJob()
{
    jQuery('.needlist>dt').toggle(function(){
        var obj=$(this);
        var objnext=obj.next('dd');
        jQuery('.needlist').find('dd').not(objnext).hide("slow");
        jQuery('.needlist').find('em').removeClass('emtrim1');
        obj.find('em').addClass('emtrim1');
        objnext.show("slow");
    },function(){
          var obj=$(this);
        obj.find('em').removeClass('emtrim1');
        var objnext=obj.next('dd');
        jQuery('.needlist').find('dd').not(objnext).hide("slow");
        obj.find('em').removeClass('emtrim1');
        objnext.hide("slow");
    });
   
   
    
}
