<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */

  // load viewer library
  $libraryPath = 'cmsAdmin/lib/viewer_functions.php';
  $dirsToCheck = array('/home2/castleki/public_html/','','../','../../','../../../');
  foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

  // load records
  list($galleryRecords, $galleryMetaData) = getRecords(array(
    'tableName'   => 'gallery',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $galleryRecord = @$galleryRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$galleryRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Gallery Test 3 Castle Kid | Jumping Castles, Children's Party Rentals, Toronto, Ajax, Pickering, Whitby, Oshawa, Durham, GTA</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Category" content="Castle Kid Ajax, Pickering, Whitby, Oshawa, Clarington, Courtice, Uxbridge">
<meta name="Classification" content="Castle Kid Ajax, Pickering, Whitby, Oshawa, Clarington, Uxbridge">
<meta name="description" content="Castle Kid is offers Jumping Castle Rentals place in the GTA and Durham Region! Having a party, or have a party coming up soon? Book a jumping castle and amuse all the kids at your child's next party! (Website designed by http://www.monstermosh.com)">
<meta name="keywords" content="party,party fun,party inflatable,indoor bounce,indoor jumping,Oshawa,oshawa kids party,jumping castles,bounce,bounce house,bounce castle,air castle,castle kid,castle king,jumpers,bouncy,fun party,ajax rentals,jumping castle,party fun,inflatable slide,inflatable bouncer,bouncers,sliders,air sliders,inflatable,fun,kid castle,kid of the castle,castles,rentals,air rentals,water inflatables,water bounce,inflatable rentals,oshawa inflatable,durham inflatable,durham,durham jump,durham kids,gta bounce,gta inflatable,toronto inflatable,toronto kids party,inflatable,inflatable screens,kids bounce,ontario rentals,Bowmanville, Courtice, Oshawa, Port Perry, Whitby, Ajax, Pickering, Toronto, Bracebridge, Muskoka area" />
<meta name="Subject" content="Castle Kid Ajax, Pickering, Whitby, Oshawa, Clarington, Uxbridge">

<link href="style.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="facebox/facebox.css" media="screen" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="fillers" type="text/css">
<script type="text/javascript" rel="jqueryLib" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js"></script>
<script src="facebox/facebox.js" type="text/javascript"></script>

<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

</script>
		
		<script>
		$(document).ready(function(){
				
			$(".gallery_image").mouseover(function(){
			    $(this).addClass("gallery_image_hover");
			});
		
			$(".gallery_image").mouseout(function(){
			    $(this).removeClass("gallery_image_hover");
			});
			
			$(".gallery_image").click(function(){
			    var animg = $(this).attr("id");
			    jQuery.facebox({ image: 'image/' + animg });
			});
						
		});	
		</script>		

  <style type="text/css">
    body          { font-family: arial; }
    .instructions { border: 3px solid #000; background-color: #EEE; padding: 10px; text-align: left; margin: 25px}
  </style>

</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="10" marginwidth="0" marginheight="10" text="#000000" background="bckgrd_image.png" onLoad="MM_preloadImages('button_home_on_132_122.jpg','button_about_on_93_122.jpg','button_contact_on_106_122.jpg','button_prices_on_98_122.jpg','button_booking_on_136_122.jpg','button_gallery_on_117_122.jpg','button_testimonials_on_131_122.jpg','button_links_on_207_122.jpg')">
<div align="center">
  <table width="1052" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="595" valign="top" width="1024"> 
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="bckgrd_filler">
          <tr> 
            <td width="1024" height="188" valign="top"> 
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="1024" height="188" valign="top" align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="1020" height="188">
                      <param name=movie value="flash_header_1020_188.swf">
                      <param name=quality value=high>
                      <embed src="flash_header_1020_188.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1020" height="188">
                      </embed> 
                    </object></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr> 
            <td valign="top" height="122"> 
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="1024" height="122" valign="top" align="center"><a href="index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','button_home_on_132_122.jpg',1)"><img name="Image2" border="0" src="button_home_off_132_122.jpg" width="132" height="122"></a><a href="about.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','button_about_on_93_122.jpg',1)"><img name="Image3" border="0" src="button_about_off_93_122.jpg" width="93" height="122"></a><a href="contact.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','button_contact_on_106_122.jpg',1)"><img name="Image4" border="0" src="button_contact_off_106_122.jpg" width="106" height="122"></a><a href="prices.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','button_prices_on_98_122.jpg',1)"><img name="Image5" border="0" src="button_prices_off_98_122.jpg" width="98" height="122"></a><a href="booking.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','button_booking_on_136_122.jpg',1)"><img name="Image6" border="0" src="button_booking_off_136_122.jpg" width="136" height="122"></a><a href="gallery.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','button_gallery_on_117_122.jpg',1)"><img name="Image7" border="0" src="button_gallery_off_117_122.jpg" width="117" height="122"></a><a href="testimonials.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','button_testimonials_on_131_122.jpg',1)"><img name="Image8" border="0" src="button_testimonials_off_131_122.jpg" width="131" height="122"></a><a href="links.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image9','','button_links_on_207_122.jpg',1)"><img name="Image9" border="0" src="button_links_off_207_122.jpg" width="207" height="122"></a></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr> 
            <td height="285" valign="top"> 
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="13" height="10"></td>
                  <td width="998"></td>
                  <td width="13"></td>
                </tr>
                <tr> 
                  <td height="147"></td>
                  <td valign="top" align="left"> 
                    <div align="left"> 
                      <!-- /INSTRUCTIONS -->
                      <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
                      <p><img src="header_gallery.png" width="340" height="90"><br>
                        <?php echo $galleryRecord['content'] ?>
                      </p>
                    </div>
                  </td>
                  <td></td>
                </tr>
                <tr> 
                  <td height="19"></td>
                  <td valign="top"> 
                    <h3 align="left">Small Jumping Castle</h3>
                    <table width="30%" border="0" cellpadding="0" height="10" align="left">
                      <tr> 
                        <td align="left" > 
                      <tr> 
                        <?php foreach ($galleryRecords as $record): ?>
                        <?php foreach ($record['small_jumping_castles'] as $upload): ?>
                        <td align="center" width="50%"> 
                          <table height="10">
                            <tr> 
                              <td height="36" valign="bottom"><div id="<?php echo $upload['urlPath'];?>" class="gallery_image"> <img src="imgsize.php?w=<?php echo $upload['width'];?>&h=<?php echo $upload['height'];?>&img=<?php echo $upload['thumbUrlPath'];?>" width="<?php echo $upload['thumbWidth2'] ?>" height="<?php echo $upload['thumbHeight2'] ?>" alt="" style="border:hidden" /></div>										 					  
                              </td>
                            <tr> </tr>
                            <td height="2"> 
                              <div align="left" class="medium-title"> 
                              </div>
                            </td>
                            </tr>
                          </table>
                        </td>
                        <?php $maxCols=3; if (@++$count % $maxCols == 0): ?>
                      </tr>
                      <tr>
                        <?php endif; ?>
                        <?php endforeach ?>
                        <?php endforeach ?>
                      </tr>
                    </table>
                    <h3>&nbsp;</h3>
                      </td>
                  <td></td>
                </tr>
                <tr> 
                  <td height="19"></td>
                  <td valign="top">
                    <h3 align="left">12x12 Jumping Castles</h3>
                    <table width="30%" border="0" cellpadding="0" height="50" align="left">
                      <tr> 
                        <td align="center" > 
                      <tr> 
                        <?php foreach ($galleryRecords as $record): ?>
                        <?php foreach ($record['12x12_castles'] as $upload): ?>
                        <td align="center" width="50%"> 
                          <table height="50">
                            <tr> 
                              <td height="36" valign="bottom"><a href="<?php echo $upload['urlPath'] ?>" target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" style="border:hidden" /></a> 
                              </td>
                            <tr> </tr>
                            <td height="2"> 
                              <div align="left" class="medium-title"> 
                              </div>
                            </td>
                            </tr>
                          </table>
                        </td>
                        <?php $maxCols2=3; if (@++$count2 % $maxCols2 == 0): ?>
                      </tr>
                      <tr> 
                        <?php endif; ?>
                        <?php endforeach ?>
                        <?php endforeach ?>
                      </tr>
                    </table>
                    <h3>&nbsp;</h3>
                      </td>
                  <td></td>
                </tr>
                <tr> 
                  <td height="19"></td>
                  <td valign="top">
                    <h3 align="left">13x13 Jumping Castles</h3>
                    <table width="30%" border="0" cellpadding="0" height="50" align="left">
                      <tr> 
                        <td align="center" > 
                      <tr> 
                        <?php foreach ($galleryRecords as $record): ?>
                        <?php foreach ($record['13x13_castles'] as $upload): ?>
                        <td align="center" width="50%"> 
                          <table height="50">
                            <tr> 
                              <td height="36" valign="bottom"><a href="<?php echo $upload['urlPath'] ?>" target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" style="border:hidden" /></a> 
                              </td>
                            <tr> </tr>
                            <td height="2"> 
                              <div align="left" class="medium-title"> 
                              </div>
                            </td>
                            </tr>
                          </table>
                        </td>
                        <?php $maxCols3=3; if (@++$count3 % $maxCols3 == 0): ?>
                      </tr>
                      <tr> 
                        <?php endif; ?>
                        <?php endforeach ?>
                        <?php endforeach ?>
                      </tr>
                    </table>
                    <h3>&nbsp;</h3>
                      </td>
                  <td></td>
                </tr>
                <tr> 
                  <td height="19"></td>
                  <td valign="top">
                    <h3 align="left">15x15 Jumping Castles</h3>
                    <table width="30%" border="0" cellpadding="0" height="50" align="left">
                      <tr> 
                        <td align="center" > 
                      <tr> 
                        <?php foreach ($galleryRecords as $record): ?>
                        <?php foreach ($record['15x15_castles'] as $upload): ?>
                        <td align="center" width="50%"> 
                          <table height="50">
                            <tr> 
                              <td height="36" valign="bottom"><a href="<?php echo $upload['urlPath'] ?>" target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" style="border:hidden" /></a> 
                              </td>
                            <tr> </tr>
                            <td height="2"> 
                              <div align="left" class="medium-title"> 
                                <h2> 
                                  <p>&nbsp; 
                                </h2>
                              </div>
                            </td>
                            </tr>
                          </table>
                        </td>
                        <?php $maxCols4=3; if (@++$count4 % $maxCols4 == 0): ?>
                      </tr>
                      <tr> 
                        <?php endif; ?>
                        <?php endforeach ?>
                        <?php endforeach ?>
                      </tr>
                    </table>
                      </td>
                  <td></td>
                </tr>
                <tr> 
                  <td height="19"></td>
                  <td valign="top">
                    <h3 align="left">Combo Jumping Castles</h3>
                    <table width="30%" border="0" cellpadding="0" height="50" align="left">
                      <tr> 
                        <td align="center" > 
                      <tr> 
                        <?php foreach ($galleryRecords as $record): ?>
                        <?php foreach ($record['combo_castles'] as $upload): ?>
                        <td align="center" width="50%"> 
                          <table height="50">
                            <tr> 
                              <td height="36" valign="bottom"><a href="<?php echo $upload['urlPath'] ?>" target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" style="border:hidden" /></a> 
                              </td>
                            <tr> </tr>
                            <td height="2"> 
                              <div align="left" class="medium-title"> 
                              </div>
                            </td>
                            </tr>
                          </table>
                        </td>
                        <?php $maxCols5=3; if (@++$count5 % $maxCols5 == 0): ?>
                      </tr>
                      <tr> 
                        <?php endif; ?>
                        <?php endforeach ?>
                        <?php endforeach ?>
                      </tr>
                    </table>
                      </td>
                  <td></td>
                </tr>
                <tr> 
                  <td height="28"></td>
                  <td valign="top">
                    <?php if (!$galleryRecord): ?>
                    <p>No record found!<br/>
                      <br/>
                      <?php endif ?>
                    </p>
                      </td>
                  <td></td>
                </tr>
                <tr>
                  <td height="5"></td>
                  <td></td>
                  <td></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
      <td width="28"></td>
    </tr>
    <tr> 
      <td height="135" colspan="2" valign="top"> 
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="bckgrd_bottom_castle">
          <tr> 
            <td height="99" width="480"></td>
            <td width="544"></td>
            <td width="28"></td>
          </tr>
          <tr> 
            <td height="20" valign="top" align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href="mailto:info@managhan.biz?Subject=Request%20from%20Castle%20Kid%20Site...">Webmaster</a> 
              <a href="disclaimer.php">(C)2010 Castle Kid - Disclaimer</a></font></td>
            <td valign="top" align="left"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Site 
              maintained and promoted by: <a href="http://www.managhan.biz">Managhan 
              Design Solutions</a></font></td>
            <td></td>
          </tr>
          <tr> 
            <td height="16"></td>
            <td></td>
            <td></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>
</body>
</html>
