var load_method = (window.ie?'load':'domready');// fix for IE cannot open internet site
//var accordion;
window.addEvent(load_method, function()
{
    if ($('accordion')){
        var accordion = new Accordion('.acc-head', 'div.acc-content', {
    		opacity: false,alwaysHide: true,
    		onActive: function(toggler){
    			toggler.addClass('active-title');

    		},
    		onBackground: function(toggler){
    			toggler.removeClass('active-title');
    		}
    	},  $('accordion'));
    }
    if ($('cellar-slide')){
        var slide = new SimpleSlideShow({
          startIndex: 0,
          slides: $$('.cellar-slide'),
          currentIndexContainer: 'slideNow', //an element or it's id
          maxContainer: 'slideMax',
          nextLink: 'nextImg',
          prevLink: 'prevImg'
        });
    }
    if ( $('sign-button')){
        $('email').addEvent('blur',function(e){
             url = $('sign-button').href;
            var queryString = url.match(/\?(.+)/)[1]
            var par = TB_parseQuery(queryString);
            $('sign-button').href = 'index.php?route=lightbox/lightbox/newsletter&email='+$('email').value+'&KeepThis=true&TB_iframe=true'+'&height='+par['height']+'&width='+par['width'];
            //alert($('sign-button').href);
        });
    }

});
function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}
/**sifr config**/
var trajanpro = {
	src: '/store/media/trajan-pro.swf',
	wmode: 'transparent'
	};
var timesNewRome = {
	src: '/store/media/times.swf',
	wmode: 'transparent'
	};
sIFR.activate(trajanpro,timesNewRome);

sIFR.replace(trajanpro, {
  selector: '.sifr-gold',
  css:{
		'.sIFR-root':{ 'color':'#fae8ba'},
		'a':{ 'color':'#fae8ba','text-decoration':'underline'},
		'a:hover':{ 'color':'#fae8ba','text-decoration':'none'}
	}});
sIFR.replace(trajanpro, {
  selector: '.sifr-grey',
  css:{
		'.sIFR-root':{ 'color':'#370a0a'},
        'a':{'color':'#370a0a','text-decoration':'none'},
        'a:hover':{'color':'#370a0a','text-decoration':'underline'}

	}});

sIFR.replace(trajanpro, {
  selector: '.sifr-red',
  css:{
            '.sIFR-root':{ 'color':'#680b27'}

	}});

sIFR.replace(trajanpro, {
  selector: '.guide-content h3, .review-content h3, .contact-content h3, .recommend h3, .info-content h3, .sifr-dark',
  css:{
		'.sIFR-root':{ 'color':'#170308','text-align':'center'}

	}});

sIFR.replace(trajanpro, {
  selector: '.cellar h2',
  css:{
		'.sIFR-root':{ 'color':'#010101','text-decoration':'underline','text-align':'center'}
	}});


sIFR.replace(trajanpro, {
  selector: '.news-head',
  css:{
		'.sIFR-root':{ 'color':'#140105','text-decoration':'underline'},
        'a':{'color':'#140105','text-decoration':'underline'},
        'a:hover':{'color':'#140105','text-decoration':'none'}
	}});


sIFR.replace(timesNewRome, {
  selector: '.feature-products .offer-time',
  css:{
		'.sIFR-root':{ 'color':'#3e0922','text-align':'center'},
		'.small':{'font-size':'13.6px'},
		'.medium':{'font-size':'19px'},
		'.large':{'font-size':'22px'}
	}});

sIFR.replace(timesNewRome, {
  selector: '.weekly-offer-small .offer-time',
  css:{
		'.sIFR-root':{ 'color':'#fffefe','text-align':'center','font-size':'14px'},
		'.gold':{'font-size':'19px','color':'#feeccd'},
		'.light-brown':{'color':'#e5c891'}
	}});


sIFR.replace(timesNewRome, {
  selector: '.feature-products2 .offer-time',
  css:{
		'.sIFR-root':{ 'color':'#3e0922','font-size':'19px'},
		'.small':{'font-size':'19px'},
		'.medium':{'font-size':'22px'},
		'.large':{'font-size':'23px'}
	}});

sIFR.replace(trajanpro, {
  selector: '.region-map h3',
  css:{
		'.sIFR-root':{ 'color':'#531f2b','font-size':'14px','display':'inline','text-decoration':'underline'}
	}});