//alert('hello2');
$(function () {
        var cat = $('#type');
        var el = $('#area');
        //var attr = $('#attributeSelect');

		/*
        el.selectChain({
            target: attr,
            url: '/website/inc/_fetch_what.php',
	    type: 'post',
            data: { ajax: true, anotherval: "anotherAction" }
        });
		*/
        // note that we're assigning in reverse order
        // to allow the chaining change trigger to work
	//	$("#area").val("4").attr("selected", "selected");
// alert('dsfsd');

        cat.selectChain({
            target: el,
            url: '/website/inc/_fetch_what.php',
	    type: 'post',
            data: "ajax=true"
        }).trigger('change');

    });

$(function () {
        var cat = $('#type2');
        var el = $('#area2');
        //var attr = $('#attributeSelect');

		/*
        el.selectChain({
            target: attr,
            url: '/website/inc/_fetch_what.php',
	    type: 'post',
            data: { ajax: true, anotherval: "anotherAction" }
        });
		*/
        // note that we're assigning in reverse order
        // to allow the chaining change trigger to work
	//	$("#area").val("4").attr("selected", "selected");
// alert('dsfsd');

        cat.selectChain({
            target: el,
            url: '/website/inc/_fetch_what.php',
	    type: 'post',
            data: "ajax=true"
        }).trigger('change');

    });