/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/*
 * 产品类型 级联
 */
function producttype_select(This){
    var parentID=$(This).val();
    var selfurl = window.location.href;
     var testurl=selfurl.split("/");
     var siteurl=testurl[2];
     
    $.post('http://'+siteurl+'/product_producttype',{parentID:parentID},function(returndata){
        if(returndata!="no"){
            $(This).next('select').html(returndata);
            //alert($(This).next('select').val());
            producttype_select($(This).next('select'));
        }
    });
    
}
/*
 * 区域类型级联
 */
function area_select(This){

     var parentID=$(This).val();
     var selfurl = window.location.href;
     var testurl=selfurl.split("/");
     var siteurl=testurl[2];
    $.post('http://'+siteurl+'/solution_areatype',{parentID:parentID},function(returndata){
        if(returndata!="no"){
            
            $(This).next('select').replaceWith(returndata);
        }
    });
}
/*
 * 左侧菜单 隐藏显示
 */
$(function(){
    //页面初始化的时候就应用
    //隐藏没选中的当前菜单
    $(".nav_ul li[class!='current'] dl").hide();
    //菜单 隐藏 显示 事件
    $(".nav_ul li a").click(function(){
       
        if($(this).next("dl").is(":visible")){
            $(this).next("dl").hide();
        }else{
            $(this).next("dl").show();
        }
    });
})


