document.write('<link rel="stylesheet" href="http://www.playfood.ca/Portals/_default/psn/oeInjectedReservationStyleSheet.css" type="text/css" media="screen" />')
document.write(' <div class="SQBM"> ')
document.write('   <div class="SQBL"></div> ')
document.write('   <div class="SQBR"></div> ')
document.write('   <div class="SQBO"> ')
document.write('       <div class="SQBW"> ')
document.write('           <div class="SQB"> ')
document.write('                   <div class="title">Reservation</div> ')
document.write('     <div class="groupSize"> ')
document.write('       <select id="ddlGroupSize77" class="QBList ddlGroupSize"> ')
document.write('           <option value="1" >1 Guest</option> ')
document.write('           <option value="2" selected >2 Guests</option>  ')
document.write('           <option value="2" >Otherwise please call</option> ')
document.write('       </select> ')
document.write('     </div> ')
document.write('     <div  class="day"> ')
document.write('       <select id="ddlStartDate77" class="QBList ddlStartDate"> ')
document.write('           <option value="2026-06-09"  >Otherwise</option> ')
document.write('       </select> ')
document.write('     </div > ')
document.write('     <div class="time"> ')
document.write('       <select id="ddlStartTime77" class="QBList ddlStartTime"> ')
document.write('           <option value="00:00" >Otherwise please call</option> ')
document.write('       </select> ')
document.write('     </div> ')
document.write('                   <div class="message">613.667.9207</div> ')
document.write('                   <div class="submit"> ')
document.write('                       <input type="button" name="SQBButton77" value="Make Reservation" id="MakeReservation77" class="MakeReservation" /> ')
document.write('                   </div>')
document.write('           </div>')
document.write('       </div>')
document.write('   </div>')
document.write('</div>')
function addParam(QueryString, Parameter, Value) { if (QueryString == null || QueryString == '') return '?' + Parameter + '=' + Value; else return QueryString + '&' + Parameter + '=' + Value; } 
function OpenLightbox77() { 
       var RezParameters = ''; 
       var width = getWidth(); 
       if (jQuery('#ddlStartDate77').length > 0) RezParameters = addParam(RezParameters, 'StartDate', jQuery('#ddlStartDate77').val()); 
       if (jQuery('#ddlStartTime77').length > 0) RezParameters = addParam(RezParameters, 'StartTime', jQuery('#ddlStartTime77').val()); 
       if (jQuery('#ddlGroupSize77').length > 0) RezParameters = addParam(RezParameters, 'GroupSize', jQuery('#ddlGroupSize77').val()); 
       RezParameters = addParam(RezParameters, 'DialogBox', 'y'); 
       RezParameters = addParam(RezParameters, 'ParentUrl', encodeURIComponent(document.location.href)); 
       RezParameters = addParam(RezParameters, 'psn', 'oe'); 
       if(width < 710) { 
	        var iFrameUrl = 'http://www.playfood.ca/MobileReservation.aspx' + RezParameters; 
	        var dialogHtml = '<div id="reservationWizard77" align="center" style="width: 300px; height: 600px"><iframe id="reservationWizardiFrame77" name="reservationWizardiFrame77" src="' + iFrameUrl + '" width="100%" height="100%" frameborder="0"></iframe></div>'; 
	        if (jQuery('#reservationWizard77').length > 0) jQuery('#reservationWizard77').remove();
	        jQuery(dialogHtml).dialog({ autoOpen: false, closeText: 'Close', width: 300, height: 600, title: ('Reservation for Play food & wine').replace("&#39;","'"), close: function (type, data) { jQuery(this).dialog('destroy'); }, modal: true }); 
       } 
       else { 
	        var iFrameUrl = 'http://www.playfood.ca/tabid/7323/Default.aspx' + RezParameters; 
	        var dialogHtml = '<div id="reservationWizard77" align="center" style="width: auto; height: 600px"><iframe id="reservationWizardiFrame77" name="reservationWizardiFrame77" src="' + iFrameUrl + '" width="100%" height="100%" frameborder="0"></iframe></div>'; 
	        if (jQuery('#reservationWizard77').length > 0) jQuery('#reservationWizard77').remove();
	        jQuery(dialogHtml).dialog({ autoOpen: false, closeText: 'Close', width: 710, height: 600, title: ('Reservation for Play food & wine').replace("&#39;","'"), close: function (type, data) { jQuery(this).dialog('destroy'); }, modal: true }); 
       } 
	    jQuery('#reservationWizard77').dialog('open'); 
 } 
function getWidth() { 
  var currentWidth = 0; 
  if( typeof( window.innerWidth ) == 'number' ) { 
    currentWidth = window.innerWidth; 
  } else if( document.documentElement && ( document.documentElement.clientWidth ) ) { 
    currentWidth = document.documentElement.clientWidth; 
  } else if( document.body && ( document.body.clientWidth ) ) { 
    currentWidth = document.body.clientWidth; 
  } 
  return currentWidth; 
}; 
function updateIframe() { 
   var RezParameters = ''; 
   if (jQuery('#ddlStartDate77').length > 0) RezParameters = addParam(RezParameters, 'StartDate', jQuery('#ddlStartDate77').val()); 
       if (jQuery('#ddlStartTime77').length > 0) RezParameters = addParam(RezParameters, 'StartTime', jQuery('#ddlStartTime77').val()); 
   if (jQuery('#ddlGroupSize77').length > 0) RezParameters = addParam(RezParameters, 'GroupSize', jQuery('#ddlGroupSize77').val()); 
   RezParameters = addParam(RezParameters, 'DialogBox', 'y'); 
   RezParameters = addParam(RezParameters, 'ParentUrl', encodeURIComponent(document.location.href)); 
   RezParameters = addParam(RezParameters, 'psn', 'oe'); 
   width = getWidth(); 
   if (width < 710) { 
	    var iFrameUrl = 'http://www.playfood.ca/MobileReservation.aspx' + RezParameters; 
		jQuery(document.getElementById('reservationWizardiFrame77')).attr('src', iFrameUrl); 
	    jQuery('#reservationWizardiFrame77').addClass('reservationWizardiFrame77-resize'); 
	    jQuery('.reservationWizardiFrame77-resize').css("width",300); 
	    var dialogElementParent = jQuery("#reservationWizard77").parent(); 
	    dialogElementParent.width(350); 
	    jQuery("#reservationWizard77").parent().addClass("iFrameShiftLeft"); 
	    jQuery(".iFrameShiftLeft").css("width",350); 
	    jQuery(".iFrameShiftLeft").css("left",(width -350) / 2 ); 
    } else { 
	    var iFrameUrl = 'http://www.playfood.ca/tabid/7323/Default.aspx' + RezParameters; 
		jQuery(document.getElementById('reservationWizardiFrame77')).attr('src', iFrameUrl); 
	    jQuery('#reservationWizardiFrame77').addClass('reservationWizardiFrame77-resize'); 
	    jQuery('.reservationWizardiFrame77-resize').css("width",660); 
	    var dialogElementParent = jQuery("#reservationWizard77").parent(); 
	    dialogElementParent.width(710); 
	    jQuery("#reservationWizard77").parent().css("width",710); 
	    jQuery("#reservationWizard77").parent().css("left",(width -710) / 2 ); 
	}; 
}; 
function Events77(){
	    jQuery('form').each(function() {
		    this.reset(); 
	    });
	    jQuery('#MakeReservation77').click(function(){
	    	OpenLightbox77(); 
 	    }); 
	    jQuery('#ddlGroupSize77').change(function(){ 
	    	OpenLightbox77(); 
 	    }); 
	    jQuery('#ddlStartDate77').change(function(){ 
	    	OpenLightbox77(); 
 	    }); 
	    jQuery('#ddlStartTime77').change(function(){ 
	    	if (jQuery('#ddlStartTime77').val() == '00:00') {OpenLightbox77();} 
 	    }); 
	    jQuery('#ExtLink').remove(); 
       jQuery.receiveMessage(function (e) { 
           if (e.data === 'close') { 
               jQuery('#reservationWizard77').dialog('close'); 
           } 
       }, 'http://www.playfood.ca'); 
	    jQuery(window).resize(function() { 
	        updateIframe(); 
       }); 
} 
//http:'www.nczonline.net/blog/2009/07/28/the-best-way-to-load-external-javascript/ 
function LoadScript77(url, callback){
    var script = document.createElement('script')
    script.type = 'text/javascript';
    if (script.readyState){ 
            script.onreadystatechange = function(){ 
               if (script.readyState == 'loaded' ||script.readyState == 'complete'){
                   script.onreadystatechange = null; 
                   callback(); 
               }
           };
   } else {  
        script.onload = function(){
            callback();
        };
   }
   script.src = url;
   document.getElementsByTagName('head')[0].appendChild(script); 
}
 if (typeof jQuery == 'undefined'){ 
   LoadScript77('http://www.playfood.ca/js/jquery.min.js', function(){
       jQuery('document').ready(function (){ 
           if (typeof jQuery.ui == 'undefined'){ 
               LoadScript77('http://www.playfood.ca/js/jquery-ui.min.js', function(){ 
                   if (typeof jQuery.postmessage == 'undefined'){ 
                       LoadScript77('http://www.playfood.ca/js/jquery.ba-postmessage.js', function(){ 
                           Events77(); 
                       }); 
                   }else{ 
                       Events77(); 
                   }; 
               }); 
           }; 
       }); 
   }); 
 }else{ 
   if (typeof jQuery.ui == 'undefined'){ 
       if(jQuery.fn.jquery.split('.').map(function(i){return('0'+i).slice(-2)}).join('.') > '01.08.03'){ 
           LoadScript77('http://www.playfood.ca/js/jquery-ui.min.js', function(){  
               if (typeof jQuery.postmessage == 'undefined'){  
                   LoadScript77('http://www.playfood.ca/js/jquery.ba-postmessage.js', function(){  
                       Events77();  
                   });  
               }else{  
                   Events77();  
               }; 
           });  
       } else { 
           LoadScript77('https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js', function(){ 
               if (typeof jQuery.postmessage == 'undefined'){  
                   LoadScript77('http://www.playfood.ca/js/jquery.ba-postmessage.js', function(){  
                       Events77();  
                   });  
               }else{  
                   Events77();  
               }; 
           });  
       }; 
   }else{ 
       if (typeof jQuery.postmessage == 'undefined'){ 
           LoadScript77('http://www.playfood.ca/js/jquery.ba-postmessage.js', function(){ 
               Events77(); 
           }); 
       }else{ 
           Events77(); 
       }; 
   }; 
 };
