Ext.onReady(function(){
	
	var catalog = [{
        title: 'Administration',
		cls:'active',
		iconCls:'icon-apps',
        samples: [{
            text: 'Home Page',
			linkid: 'adminHomePage',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/adminHomePage.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/adminHomePage.jpg',
            desc: 'Home page for the admin area of the service. Includes summaries, charts, statistics and menus.'
        },{
            text: 'Appearance Settings',
			linkid: 'appearanceSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/appearanceSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/appearanceSettings.jpg',
            desc: 'Screen that contains links to all of the appearance setting pages within the admin area.'
        },{
            text: 'Global Cart Settings',
			linkid: 'globalCartSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/globalCartSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/globalCartSettings.jpg',
            desc: 'Screen than contains links to all of the global settings pages within the admin area.'
		}]
    },{
        title: 'Categories',
		iconCls:'icon-apps',
        samples: [{
            text: 'Manage Categories',
			linkid: 'manageCategories',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/manageCategories.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/manageCategories.jpg',
            desc: 'This is where you can manage the product categories for your store, as well as sub-categories.'
        },{
            text: 'Add a New Category',
			linkid: 'addNewCategory',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/addNewCategory.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/addNewCategory.jpg',
            desc: 'Section that allows you to create new categories and sub-categories for your store.'
        }]
	},{
		title: 'Products',
		iconCls:'icon-apps',
        samples: [{
            text: 'Manage Products',
			linkid: 'manageProducts',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/manageProducts.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/manageProducts.jpg',
            desc: 'You can manage all of your store&#39;s products from this screen including information, images and pricing.'
		},{
            text: 'Add a New Product',
			linkid: 'addNewProduct',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/addNewProduct.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/addNewProduct.jpg',
            desc: 'Screen that let&#39;s you add new products into your store including images, pricing and a whole lot more!'
        },{
            text: 'Manage Price Group',
			linkid: 'managePriceGroup',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/managePriceGroup.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/managePriceGroup.jpg',
            desc: 'Control product pricing by creating price groups within your store and then assigning them to products.'
        },{
            text: 'Manufacturers',
			linkid: 'manufacturers',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/manufacturers.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/manufacturers.jpg',
            desc: 'Define the product manufacturers used throughout your store.  Helps customers identify various brands.'
        },{
            text: 'Bulk Product Loader',
			linkid: 'bulkProductLoader',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/bulkProductLoader.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/bulkProductLoader.jpg',
            desc: 'Easily use spreadsheets to manage your products and simply upload those into your store with a few easy steps.'
        },{
            text: 'Bulk Images Loader',
			linkid: 'bulkImagesLoader',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/bulkImagesLoader.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/bulkImagesLoader.jpg',
            desc: 'This screen provides an easy way to upload multiple product images into your online store.'
        },{
            text: 'Thumbnail Generator',
			linkid: 'thumbnailGenerator',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/thumbnailGenerator.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/thumbnailGenerator.jpg',
            desc: 'Page that will create multiple sizes of the product images to be used throughout various sections of your web site.'
        },{
            text: 'Global Attributes',
			linkid: 'globalAttributes',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/globalAttributes.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/globalAttributes.jpg',
            desc: 'You can define global attributes that can be accessed and used within your store&#39;s products.'
        },{
            text: 'Recommended Products',
			linkid: 'recommendedProducts',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/recommendedProducts.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/recommendedProducts.jpg',
            desc: 'Designate recommended products that will appear for your customers depending on what they add to their shopping cart.'
        },{
            text: 'Gift Certificates',
			linkid: 'giftCertificates',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/giftCertificates.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/giftCertificates.jpg',
            desc: 'You can allow gift certificates to be created, purchased and used within your store.'
        }]
    },{
        title: 'Users',
        samples: [{
            text: 'Browse Users',
			linkid: 'browseUsers',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/browseUsers.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/browseUsers.jpg',
            desc: 'Manage the users who are currently registered within your store including their contact information.'
        },{
            text: 'Add a New User',
			linkid: 'addNewUser',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/addNewUser.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/addNewUser.jpg',
            desc: 'Manually add users to your system that may call in and place an order by phone.'
        }]
    },{
        title: 'Orders',
        samples: [{
            text: 'Browse Orders',
			linkid: 'browseOrders',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/browseOrders.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/browseOrders.jpg',
            desc: 'Browse existing and past store orders so that you can edit, process and complete those orders.'
        },{
            text: 'Export to Quickbooks',
			linkid: 'exportQuickbooks',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/exportQuickbooks.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/exportQuickbooks.jpg',
            desc: 'Mechanism to allow you to export order data into the Quickbooks format.'
        }]
    },{
        title: 'Emails',
        iconCls:'icon-grid',
        samples: [{
            text: 'Newsletter Email Wizard',
			linkid: 'newsletterEmailWizard',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/newsletterEmailWizard.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/newsletterEmailWizard.jpg',
            desc: 'Create newsletters which can be sent out to your customers (registered users).'
        },{
            text: 'Product Update Email Wizard',
			linkid: 'productUpdateEmailWizard',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/productUpdateEmailWizard.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/productUpdateEmailWizard.jpg',
            desc: 'Send an email out to your customers announcing new products released in your store.'
        },{
            text: 'Sent Email Archive',
			linkid: 'sentEmailArchive',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/sentEmailArchive.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/sentEmailArchive.jpg',
            desc: 'View the email campaigns that you have previously sent to your customers.'
        },{
            text: 'Default Email Top & Bottom',
			linkid: 'defaultEmailTopBottom',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/defaultEmailTopBottom.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/defaultEmailTopBottom.jpg',
            desc: 'Define how the top (header) and bottom (footer) of your emails should appear when they are sent out.'
        },{
            text: 'Notification Emails',
			linkid: 'notificationEmails',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/notificationEmails.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/notificationEmails.jpg',
            desc: 'Configure the types of notification emails that should be sent to your administrators and your customers.'
        },{
            text: 'Subscriber Email Addresses',
			linkid: 'subscriberEmailAddresses',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/subscriberEmailAddresses.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/subscriberEmailAddresses.jpg',
            desc: 'You can manage all of your email subscribers from this screen.'
        },{
            text: 'Import Email Addresses',
			linkid: 'importEmailAddresses',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/importEmailAddresses.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/importEmailAddresses.jpg',
            desc: 'You can easily import in your existing customer&#39;s email addresses from an external file.'
        },{
            text: 'Export User Email Addresses',
			linkid: 'exportUserEmailAddresses',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/exportUserEmailAddresses.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/exportUserEmailAddresses.jpg',
            desc: 'Easily export all of your store&#39;s user email addresses to an external file.'
        },{
            text: 'Export Subscriber Email Addresses',
			linkid: 'exportSubscriberEmailAddresses',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/exportSubscriberEmailAddresses.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/exportSubscriberEmailAddresses.jpg',
            desc: 'Easily export all of your store&#39;s subscriber email addresses to an external file.'
        },{
            text: 'Check Bounced Email Addresses',
			linkid: 'checkBouncedEmailAddresses',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/checkBouncedEmailAddresses.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/checkBouncedEmailAddresses.jpg',
            desc: 'Check if any of your email addresses are not reaching their destination (bounced) due to bad email addresses.'
        }]
    },{
        title: 'Administrators',
        iconCls:'icon-tabs',
        samples: [{
            text: 'Browse Adminstrators',
			linkid: 'browseAdministrators',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/browseAdministrators.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/browseAdministrators.jpg',
            desc: 'Browse and manage all of the adminstrators within your store including their login information.'
        },{
            text: 'Create New Administrator',
			linkid: 'createNewAdminAccount',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/createNewAdminAccount.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/createNewAdminAccount.jpg',
            desc: 'Create a new adminstrator for your store who will be able to view orders and customer information.'
        },{
            text: 'Update Your Profile',
			linkid: 'updateYourProfile',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/updateYourProfile.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/updateYourProfile.jpg',
            desc: 'Screen that allows you to update your own adminstrator information.'
        }]
    },{
        title: 'Cart Settings',
        iconCls:'icon-grid',
        samples: [{
            text: 'Payment Methods',
			linkid: 'paymentMethods',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/paymentMethods.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/paymentMethods.jpg',
            desc: 'Use this section to select and create payment methods for your store to process your customer&#39;s purchases.'
        },{
            text: 'Shipping Management',
			linkid: 'shippingManagement',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/shippingManagement.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/shippingManagement.jpg',
            desc: 'This area allows you to control the shipping methods of your store such as UPS, FED-EX and USPS to name a few.'
        },{
            text: 'Edit Taxes',
			linkid: 'editTaxes',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editTaxes.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editTaxes.jpg',
            desc: 'Control and edit the tax information and settings for your store.'
        },{
            text: 'Edit Discounts & Promo Codes',
			linkid: 'editDiscountsPromoCodes',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editDiscountsPromoCodes.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editDiscountsPromoCodes.jpg',
            desc: 'Easily add global discounts for quantity purchases and define promotion codes that can be redeemed by your customers.'
        },{
            text: 'Edit Text Pages',
			linkid: 'editTextPages',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editTextPages.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editTextPages.jpg',
            desc: 'You can add information or text pages to your site that can be accessed by both the top and bottom menu bars.'
        },{
            text: 'Forms Control & Custom Fields',
			linkid: 'formsControlCustomFields',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/formsControlCustomFields.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/formsControlCustomFields.jpg',
            desc: 'Decide which information to collect from your customers when they order from your store.'
        },{
            text: 'File Manager',
			linkid: 'fileManager',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/fileManager.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/fileManager.jpg',
            desc: 'Utility that allows you to access and view all of the files within your store.'
        },{
            text: 'Database & Backup Tools',
			linkid: 'databaseBackupTools',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/databaseBackupTools.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/databaseBackupTools.jpg',
            desc: 'You can control your store&#39;s database files and manually perform backups from this screen.'
        },{
            text: 'Frontpage Slideshow Setting',
			linkid: 'frontpageSlideshowSetting',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/frontpageSlideshowSetting.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/frontpageSlideshowSetting.jpg',
            desc: 'Control the rotating home page banner that appears on your store&#39;s home page.'
        },{
            text: 'Product Review Settings',
			linkid: 'productReviewSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/productReviewSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/productReviewSettings.jpg',
            desc: 'Manage the product review settings for your store, view and approve visitor comments and product ratings.'
        }]
    },{
        title: 'Appearance',
        iconCls:'icon-grid',
        samples: [{
            text: 'Change Site Colors',
			linkid: 'changeSiteColors',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/changeSiteColors.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/changeSiteColors.jpg',
            desc: 'Change your store&#39;s look and feel by choosing different store templates.'
        },{
            text: 'Edit Site Colors',
			linkid: 'editSiteColors',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editSiteColors.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editSiteColors.jpg',
            desc: 'Define the color schemes and color settings for a particular store template.'
        },{
            text: 'Edit Site Layout',
			linkid: 'editSiteLayout',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editSiteLayout.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editSiteLayout.jpg',
            desc: 'Very powerful mechanism to control the layout of your store and the custom side sections within your site.'
        },{
            text: 'Catalog & Product Page Settings',
			linkid: 'catalogProductPageSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/catalogProductPageSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/catalogProductPageSettings.jpg',
            desc: 'You can define how products are displayed within your store in the catalog areas and product searches.'
        },{
            text: 'Edit Site Headers Text and Images',
			linkid: 'editSiteHeadersTextImages',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editSiteHeadersTextImages.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editSiteHeadersTextImages.jpg',
            desc: 'Decide which header images should be used in your various sections of your store.'
        },{
            text: 'Edit Site Buttons Text and Images',
			linkid: 'editSiteButtonsTextImages',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editSiteButtonsTextImages.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editSiteButtonsTextImages.jpg',
            desc: 'Decide which button styles and text your store should use and display.'
        },{
            text: 'Edit Default Site Images',
			linkid: 'editDefaultSiteImages',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editDefaultSiteImages.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editDefaultSiteImages.jpg',
            desc: 'This screen allows you to define all of the images used within your store such as your company logo.'
        },{
            text: 'Edit Site Header & Footer',
			linkid: 'editSiteHeaderFooter',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editSiteHeaderFooter.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editSiteHeaderFooter.jpg',
            desc: 'You can customize the header (top) and footer (bottom) sections of your store including images and verbiage.'
        },{
            text: 'Edit Site Home Page',
			linkid: 'editSiteHomePage',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editSiteHomePage.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editSiteHomePage.jpg',
            desc: 'There are a number of home page settings that you can choose from and use.'
        },{
            text: 'Edit Site Fonts',
			linkid: 'editSiteFonts',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/editSiteFonts.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/editSiteFonts.jpg',
            desc: 'Choose the font styles used in many areas of your online store including size, style and weight.'
        }]
	},{
        title: 'Global Cart Settings',
        iconCls:'icon-grid',
        samples: [{
            text: 'Company Information',
			linkid: 'companyInformation',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/companyInformation.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/companyInformation.jpg',
            desc: 'Settings screen where you can enter configuration information about your company.'
        },{
            text: 'Global Site Settings',
			linkid: 'globalSiteSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/globalSiteSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/globalSiteSettings.jpg',
            desc: 'Settings section where you can enter global configuration information for your store.'
        },{
            text: 'Order & Cart Settings',
			linkid: 'orderCartSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/orderCartSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/orderCartSettings.jpg',
            desc: 'Settings area where you can enter configuration information about your cart and ordering sections.'
        },{
            text: 'Security Settings',
			linkid: 'securitySettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/securitySettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/securitySettings.jpg',
            desc: 'Settings page where you can enter security configuration information for your website.'
        },{
            text: 'Bestseller Settings',
			linkid: 'bestsellerSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/bestsellerSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/bestsellerSettings.jpg',
            desc: 'Settings section where you can define best sellers rules configuration concerning your site.'
        },{
            text: 'Proxy Settings',
			linkid: 'proxySettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/proxySettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/proxySettings.jpg',
            desc: 'Settings area where you can enter proxy configuration information concerning your website.'
        },{
            text: 'Gift Message',
			linkid: 'giftMessage',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/giftMessage.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/giftMessage.jpg',
            desc: 'Settings screen where you can enter gift message configuration information for your store.'
        },{
            text: 'Digital Products',
			linkid: 'digitalProducts',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/digitalProducts.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/digitalProducts.jpg',
            desc: 'Settings page where you can enter digital products configuration information for your website.'
        },{
            text: 'Printable Invoice Settings',
			linkid: 'printableInvoiceSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/printableInvoiceSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/printableInvoiceSettings.jpg',
            desc: 'Settings screen where you can enter printable invoice configuration information for your store.'
        },{
            text: 'Search Engine Settings',
			linkid: 'searchEngineSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/searchEngineSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/searchEngineSettings.jpg',
            desc: 'Settings section where you can enter search engine configuration information for your website.'
        },{
            text: 'Wholesale Settings',
			linkid: 'wholesaleSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/wholesaleSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/wholesaleSettings.jpg',
            desc: 'Settings area where you can enter wholesale configuration information for your site.'
        },{
            text: 'POP3 & SMTP Email Settings',
			linkid: 'popSmtpEmailSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/popSmtpEmailSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/popSmtpEmailSettings.jpg',
            desc: 'Settings page where you can enter pop3 and smtp email configuration information for your store.'
        },{
            text: 'Country List',
			linkid: 'countryList',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/countryList.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/countryList.jpg',
            desc: 'Settings screen where you can enter country list configuration information for your website.'
        },{
            text: 'Languages & Currencies',
			linkid: 'languageCurrencies',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/languageCurrencies.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/languageCurrencies.jpg',
            desc: 'Settings area where you can enter language and currencies configuration information for your site.'
        },{
            text: 'CCS Settings',
			linkid: 'ccsSettings',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/ccsSettings.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/ccsSettings.jpg',
            desc: 'Settings page where you can enter ccs configuration information for your store.'
        },{
            text: 'PCI-DSS Compliancy',
			linkid: 'pciDssCompliancy',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/pciDssCompliancy.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/pciDssCompliancy.jpg',
            desc: 'This section can help assist you with some, but not all compliance issues related to cart setup only.'
        }]
    },{
        title: 'Charts & Reports',
        iconCls:'icon-tabs',
        samples: [{
            text: 'Charts',
			linkid: 'charts',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/charts.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/charts.jpg',
            desc: 'Screen that displays graphical representation of page views, unique hosts and dollars spent in your store.'
        },{
            text: 'Reports',
			linkid: 'reports',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/reports.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/reports.jpg',
            desc: 'Area that allows you to view many different types of reports regarding your website and store.'
        }]
    },{
        title: 'Marketing',
        iconCls:'icon-layout',
        samples: [{
            text: 'Google Base',
			linkid: 'googleBase',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/googleBase.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/googleBase.jpg',
            desc: 'Screen where you can upload your product information and make it available on Google and their product search.'
        },{
            text: 'Shopzilla Data Feed',
			linkid: 'shopzillaDataFeed',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/shopzillaDataFeed.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/shopzillaDataFeed.jpg',
            desc: 'Create a Shopzilla data feed that can be used in their product search engine.'
        },{
            text: 'Sale Prices',
			linkid: 'salePrices',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/salePrices.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/salePrices.jpg',
            desc: 'This area is used to offer sale prices and to globally modify all prices within your store.'
        },{
            text: 'iDev Affiliate Integration',
			linkid: 'idevAffiliate',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/idevAffiliateIntegration.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/idevAffiliateIntegration.jpg',
            desc: 'This section allows you to integrate with the iDevAffiliate application.'
        }]
    },{
        title: 'Plug-ins',
        iconCls:'icon-combo',
        samples: [{
            text: 'Data Export',
			linkid: 'dataExport',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/dataExport.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/dataExport.jpg',
            desc: 'This screen allows you to export your cart data to be used by third party applications.'
        },{
            text: 'Gift Certificates',
			linkid: 'giftCertficates',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/giftCertficates.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/giftCertficates.jpg',
            desc: 'Allows gift certificate configuration within your online store.'
        },{
            text: 'Product Feeds',
			linkid: 'productFeeds',
            url: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/screenshot/productFeeds.png',
            icon: 'http://www.awardscart.com/wp-content/uploads/2010/02/viewer/productFeeds.jpg',
            desc: 'From this page you can import products from selected drop shippers and wholesale vendors.'
        }]
	}];

    for(var i = 0, c; c = catalog[i]; i++){
        c.id = 'sample-' + i;
    }

	var menu = Ext.get('sample-menu-inner'), 
		ct = Ext.get('sample-box-inner');
	
	var tpl = new Ext.XTemplate(
        '<div id="sample-ct">',
            '<tpl for=".">',
            '<div><a name="{id}" id="{id}"></a><h2><div unselectable="on">{title}</div></h2>',
            '<dl>',
                '<tpl for="samples">',
                    '<dd ext:linkid="{linkid}">',
						'<a id="{linkid}" href="{url}" onclick="return hs.expand(this, &#123; align: &#39;center&#39;, dimmingOpacity: .75 &#125;)">',
							'<img title="" src="{icon}"/>',
						'</a>',
                        '<div class="highslide-heading">',
							'{text} (Screen Shot)',
						'</div>',
                        '<div>',
							'<h4>{text}</h4>',
							'<p>{desc}</p>',
						'</div>',
                    '</dd>',
                '</tpl>',
            '<div style="clear:left"></div></dl></div>',
            '</tpl>',
        '</div>'
    );

	tpl.overwrite(ct, catalog);
	
	
	var tpl2 = new Ext.XTemplate(
        '<tpl for="."><a href="#{id}" hidefocus="on" class="{cls}" id="a4{id}"><img src="http://www.awardscart.com/wp-content/uploads/2010/06/viewer/s.gif" class="{iconCls}">{title}</a></tpl>'
    );
    tpl2.overwrite(menu, catalog);
	
	
	function calcScrollPosition(){
		var found = false, last;
		ct.select('a[name]', true).each(function(el){
			last = el;
			if(el.getOffsetsTo(ct)[1] > -5){
				activate(el.id)
				found = true;
				return false;
			}
		});
		if(!found){
			activate(last.id);
		}
	}
	
	var bound;
	function bindScroll(){
		ct.on('scroll', calcScrollPosition, ct, {buffer:250});
		bound = true;
	}
	function unbindScroll(){
		ct.un('scroll', calcScrollPosition, ct);
		bound = false;
	}
	function activate(id){
		Ext.get('a4' + id).radioClass('active');
	}
	
	ct.on('mouseover', function(e, t){
        if(t = e.getTarget('dd')){
            Ext.fly(t).addClass('over');
        }
    });
    ct.on('mouseout', function(e, t){
        if((t = e.getTarget('dd')) && !e.within(t, true)){
            Ext.fly(t).removeClass('over');
        }
    });
  	ct.on('click', function(e, t){
        if((t = e.getTarget('dd', 5)) && !e.getTarget('a', 3)){
			var linkid = Ext.fly(t).getAttributeNS('ext', 'linkid');
			if(linkid){
				return hs.expand(document.getElementById(linkid), { align: 'center', dimmingOpacity: .75 });	
				//return hs.htmlExpand(document.getElementById(linkid), { objectType: 'iframe', width: 700, height: 600 } );	
			}
        }else if(t = e.getTarget('h2', 3, true)){
			t.up('div').toggleClass('collapsed');
		}		
    });  

	menu.on('click', function(e, t){
		e.stopEvent();
		if((t = e.getTarget('a', 2)) && bound){
			var id = t.href.split('#')[1];
			var top = Ext.getDom(id).offsetTop;
			Ext.get(t).radioClass('active');
			unbindScroll();
			ct.scrollTo('top', top, {callback:bindScroll});
		}
	});
	
	Ext.get('samples-cb').on('click', function(e){
		var img = e.getTarget('img', 2);
		if(img){
			Ext.getDom('samples').className = img.className;
			calcScrollPosition.defer(10);
		}
	});
	
	bindScroll();
});
