"Back"

Template Source: frontend/alogg/default/template/magiccart/alothemes/newsletter/subscribe.phtml

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<div class="block block-subscribe popup" style="display:none;">
    <div id="popup-newsletter">
        <form action="<?php echo $this->getFormActionUrl() ?>" method="post" id="popup-newsletter-validate-detail">
            <?php echo Mage::getStoreConfig('alothemes/newsletter/textContent'); ?>
        </form>
        <script type="text/javascript">
        //<![CDATA[
            var newsletterSubscriberFormDetail = new VarienForm('popup-newsletter-validate-detail');
            var searchForm = new Varien.searchForm('popup-newsletter', 'pnewsletter', '<?php echo $this->__('Enter Your Email Address Here...'?>');
        //]]>
        </script>
    </div>
</div>
<script type="text/javascript">
//<![CDATA[
    jQuery(document).ready(function($) {

        (function(selector){
            var popupCookie = Mage.Cookies.get('popupNewsletterOff');
            if(!popupCookie || popupCookie == 'undefined'){
                var $content = $(selector);
                var image   = Themecfg.newsletter.background_image;
                var color   = Themecfg.newsletter.background_color;
                var imageUrl = "<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'magiccart/'?>" + image;
                var popup   = $('#popup-newsletter', $content);
                var pwidth  = Themecfg.newsletter.width;
                var pheight = Themecfg.newsletter.height;
                var overlay = Themecfg.newsletter.overlayColor;
                pwidth   = typeof pwidth  !== 'undefined' ? pwidth : 800;
                pheight  = typeof pheight !== 'undefined' ? pheight : 400;
                overlay  = typeof overlay !== 'undefined' ? overlay : '#363636';
                popup.width(pwidth).height(pheight)
                if(Themecfg.newsletter.background_image) popup.css('background-image', 'url(' + imageUrl + ')');
                else if(color) popup.css('background-color', color);
                $content.fancybox({
                    padding: '0px',
                    transitionIn: 'fade',
                    transitionOut: 'fade',
                    // showCloseButton: false,
                    centerOnScroll: true,
                    type: 'inline',
                    overlayColor: overlay,
                    href : '#popup-newsletter',
                }).trigger('click');
                $('.subscribe-bottom input', popup).on('click', function(){
                    if($(this).parent().find('input:checked').length){
                        Mage.Cookies.set('popupNewsletterOff', true);
                    } else {
                        Mage.Cookies.set('popupNewsletterOff', undefined);
                    }
                });
            }

        })(".block-subscribe.popup");
    });
//]]>
</script>