How to apply different colors in Jquery dialog box using dynamic way

How to apply different colors in Jquery dialog box using dynamic way

I use following code. I need to apply multiple colors (themes) for each dialog box . is it possible ? The dialog box are created dynamic way. You can see see that from the code. 

I have 2 links (see that code below the jquery code) and each time It create different dialog box.

Need to apply different background color and border color for each dialog. I mean First dialog background-color:red, for the secod - background-color:blue

  1. $(function () {
  2.             $('a.clk').on('click', function (e) {
  3.                 e.preventDefault();
  4.                 $('<div/>', { 'class': 'myDlgClass', 'id': 'link-' + ($(this).index() + 1) })
  5.                 .load($(this).attr('href')).appendTo('body')
  6.                 .dialog({
  7.                     'title': $(this).text(),
  8.                     'width': 600,
  9.                     //dialogClass: "no-close",
  10.                     closeText: "",
  11.                     
  12.                     position: {
  13.                         my: "left+5% top+5%",
  14.                         at: "left top",
  15.                         of: $('.myDlgClass').prev()
  16.                     },
  17.                     'height': 400
  18.                    /*
  19.                     buttons: [{
  20.                         text: "Close",
  21.                        
  22.                         click: function () { $(this).dialog("close"); }
  23.                     }] */
  24.                 });
  25.             });
  26.         });
Html parts are
  1. <a class="clk" href="test.html">Engine</a>

  2. <a class="clk" href="test2.html">Parts</a>