jQuery.noConflict();
jQuery(document).ready(function() {
	
	jQuery("select#countrydd").change(function () {

			var countrydocid = jQuery("select#countrydd").val();
			//jQuery.post("/assets/chunks/gettags.php", { countryid: countrydocid },
				//function(data){
				//process(data);
			//}, "json");
			
			 jQuery.ajax({
			   type: "POST",
			   url: "assets/js/gettags.php",
			   data: "countryid="+countrydocid,
			   success: function(msg){
				 process(msg)
			   },
			   error: function(obj, status, msg){
				   alert( "Error: " + msg );
			   },
			   dataType: "json"
			 });

			
	});
	


});
function process(dataarr) {

	var optionstr = '<option value="0">Please choose...</option>';
	
	if(dataarr.length > 0) {
	for(i = 0; i<dataarr.length; i++) {
		optionstr += '<option value="'+dataarr[i].optionValue+'">'+dataarr[i].optionDisplay+'</option>';
	}
	}
	jQuery("select#projecttypedd").html(optionstr);
	jQuery("select#projecttypedd").css({"border-color": "red", "border-style":"solid"});
	jQuery("select#projecttypedd").animate({ 
        borderWidth: 3,
		opacity: "toggle"
      }, 200 ).animate({
		borderWidth: 1,
		opacity: "toggle"  
	  }, 200 );
	jQuery("select#projecttypedd").css({"border": "1px solid #dbc646"});

	
}

