/**
  * @see Skin::getTemplate()
  */
 public function getTemplate(Page $page = null)
 {
     // CMS Homepage
     if (Http_Uri::getUri() === '/' && Settings::getInstance()->SETTINGS['agent'] === 1) {
         $this->template = 'homepage';
         // Blog Template (Use 2col)
     } else {
         if ($page && $page->info('app') == 'blog') {
             $this->template = '2col';
             // Directory Template (Use 2col)
         } else {
             if ($page && $page->info('app') == 'directory') {
                 $this->template = '2col';
                 // IDX Map Search
             } else {
                 if ($page && $page->info('app') == 'idx-map') {
                     $this->template = '2col';
                 } else {
                     if ($page && $page->info('name') == 'agents' && !isset($_GET['aname'])) {
                         $this->template = 'agents-list';
                     } else {
                         if ($page && $page->info('name') == 'agents' && isset($_GET['aname'])) {
                             $this->template = 'agents-details';
                             // Drone Page
                         } else {
                             if ($page && $page->info('app') == 'drone') {
                                 $this->template = '1col';
                                 // Plans Page
                             } else {
                                 if ($page && $page->info('app') == 'plans') {
                                     $this->template = '1col';
                                     // IDX Templates
                                 } else {
                                     if ($page && $page->info('app') == 'idx') {
                                         // IDX Search Results
                                         if ($page && $page->info('name') == 'search') {
                                             $this->template = 'idx/search';
                                             // IDX Details Page
                                         } else {
                                             if (in_array($page && $page->info('name'), array('details', 'map', 'birdseye', 'streetview', 'local'))) {
                                                 $this->template = 'idx/detail';
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     // Load Page Template
     return parent::getTemplate($page);
 }