title: Setting width and height of modal window from JavaScript/JQuery to ASP.NET MVC inline code
body: <p>This is my HTML ActionLink helper in the view:</p>
  
  <pre><code>&lt;%=Html.ActionLink(Resources.Localize.Routes_WidgetsEdit, "Edit", Model.ContentType.ToString(), 
  new {slug = Model.Slug, modal = true}, 
  new { 
        rel = "shadowbox;height=_HEIGHT_;width=_WIDTH_", 
        title = Resources.Localize.Routes_WidgetsEdit, 
        @class = "editWidget" 
  })%&gt; 
  </code></pre>
  
  <p>It renders out this HTML</p>
  
  <pre><code>&lt;a href="/Tab/Edit/tab-slug/tabgroup-slug?modal=True" rel="shadowbox;height=_HEIGHT_;width=_WIDTH_" title="Edit tab"&gt;Edit tab&lt;/a&gt;
  </code></pre>
  
  <p>What I would like to do is insert dynamic values for <em>HEIGHT</em> and <em>WIDTH</em>, in JavaScript I get them like this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var width = $(window).width();
  var height = $(window).height();
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Now I need a jQuery selector or command to select the "rel" attribute of all the links on page that are wired up to Shadowbox (see shadowbox value in rel) and if they contain shadowbox and <em>HEIGHT</em> and <em>WIDTH</em> replace those two placeholders with actual values at runtime.</strong> The solution should be quite <strong>bulletproof</strong>.</p>
  
  <p>Hopefully this will be a piece of cake for all you jqueryists out there. ;)</p>