/* bpMain this is used to setup the methods that should be registered on any page. this can setup slideshows, services iframes, fancy box images and videos, mobile nav, and map functions. */ var bpMain = { setupAppDefault: function() { this.setupMinifyNavigation(); this.setupFancyBox(); this.setupMobileNav(); this.setupServicesIframe(); }, enableSlideShow: function(type) { type = type || 'modern'; switch(type) { case 'modern': this.setupSlideshow1(); break; case 'inner': this.setupSlideshow3(); break; case 'reviews': this.setupSlideshow2(); break; case 'adultortho': this.setupSlideshow4(); break; case 'nivo': this.setupNivoSlider(); break; case 'team': this.setupSlideshow5(); break; } }, addVideoPanels: function(attrName) { attrName = attrName || 'data-video-src'; var self = this; var elements = jQuery('[' + attrName + ']').each(function(index, element) { element = jQuery(element); var src = element.attr('data-video-src'); if(src) { var title = element.attr('data-title'); element.on('click', function() { self.viewVideo(title, src); }); } }); }, viewVideo: function(title, src) { var vid = { title: title, source: src }; var panel = new bpApp.videoPanel(vid, '', document.body); panel.setup(); panel.display(); }, /* this will setup the custom slideshow */ setupSlideshow1: function() { var optionsArray = [ /*{ title: '', content: '', className: '', image: '1.jpg', alt: '', url: '', crumbContent: '' },*/ { title: '', content: 'We Offer In-House Financing With NO Interest.', className: '', image: '2.jpg', alt: '', url: '', crumbContent: '' }, { title: '', content: 'We Offer In-House Financing With NO Interest.', className: '', image: '3.jpg', alt: '', url: '', crumbContent: '' }, { title: '', content: 'We Offer In-House Financing With NO Interest.', className: '', image: '5.jpg', alt: '', url: '', crumbContent: '' }, { title: '', content: 'We Offer In-House Financing With NO Interest.', className: '', image: '12fix.jpg', alt: '', url: '', crumbContent: '' }, { title: '', content: 'We Offer In-House Financing With NO Interest.', className: '', image: '13fix.jpg', alt: '', url: '', crumbContent: '' }, { title: '.', content: 'We Offer In-House Financing With NO Interest.', className: '', image: '7.jpg', alt: '', url: '', crumbContent: '' } ]; /* bg spotlight holder */ /* container ID, file path, background or not */ var startNumber = Math.round(Math.random() * optionsArray.length); var spotlight1 = new spotlightPanel('slides', '/slideshow/', true, startNumber); spotlight1.setup(optionsArray); }, /* this will setup the custom slideshow3 */ setupSlideshow3: function() { var optionsArray = [ { title: '', content: '', className: '', image: '11.jpg', alt: '', url: '', crumbContent: '' }, { title: '', content: '', className: '', image: '9.jpg', alt: '', url: '', crumbContent: '' } ]; /* bg spotlight holder */ /* container ID, file path, background or not */ var startNumber = Math.round(Math.random() * optionsArray.length); var spotlight3 = new spotlightPanel('slides', '/slideshow/', true, startNumber); spotlight3.setup(optionsArray); }, /* this will setup the custom slideshow3 */ setupSlideshow4: function() { var optionsArray = [ { title: '', content: '', className: '', image: '11.jpg', alt: '', url: '', crumbContent: '' } ]; /* bg spotlight holder */ /* container ID, file path, background or not */ var startNumber = Math.round(Math.random() * optionsArray.length); var spotlight4 = new spotlightPanel('slides', '/slideshow/', true, startNumber); spotlight4.setup(optionsArray); }, setupSlideshow2: function() { var optionsArray = [ { title: '', content: '