/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$(document).ready(function() {
  $("#header-outer").css({ left: eval( ($(window).width() - 900)/2 )+"px" });
  
  if( !$.browser.msie ) {
    $(".decorate").each(function(){
           $(this).corner("round 10px cc:#CCC keep");
    }); 
  }
  
  $("#sendMessage input:text").toggleVal("active", "valSet");
  $("#requestBrochure input:text").toggleVal("active", "valSet");
  $('#dialogEmail').jqm({trigger: '#contact_email', onShow: showDialog});
  $('#dialogPhone').jqm({trigger: '#contact_phone', onShow: showDialog});
  $('#dialogMail').jqm({trigger: '#contact_mail', onShow: showDialog});
  $('#dialogBrochure').jqm({trigger: '#contact_brochure', onShow: showDialog});

  var options = { target: '#sendMessageResult', resetForm: true };
  $('#sendMessage').ajaxForm(options);

  options = { target: '#requestBrochureContent', resetForm: true, beforeSubmit: prepareRequestBrochure };
  $('#requestBrochure').ajaxForm(options); 
  
  pageSpecificSetup();
});