// Javascript Document
var loaderAnimationEl = null;
function loadingAnimation(r,a,w,c){
	if (r)
		if (w == 'map' || w == 'search') return;
	if (r) {
		loaderAnimationEl = document.getElementById("loaderAnimationEl");
		if (w == 'pubguide' || w == 'klub') {
			if (!loaderAnimationEl) {
				var b;
				if (!a) b = document.body;
				else b = jQuery(a).parent().parent().parent();
				jQuery("<span></span>").attr('id','loaderAnimationEl').css('visibility','hidden').prependTo(b);
				loaderAnimationEl = document.getElementById("loaderAnimationEl");
			}
			if (loaderAnimationEl) {
				if (c) {
					if (document.title.indexOf("|")>0)
						document.title = c + ' | ' + document.title.split(" | ")[1];
				}
				if (!r) {
					//loaderAnimationEl.className = 'hide';
					loaderAnimationEl.style.visibility = 'visible';
				}
				else {
					loaderAnimationEl.className = '';
					if (a) {
						if (typeof a != 'string') {
							loaderAnimationEl.className = a.parentNode.className;
						}
						else if (w == 0) loaderAnimationEl.className = a;
					}
					loaderAnimationEl.style.visibility = 'visible';
				}
			}
		}
		else if (w == 'kategorie' && c) {
			if (!loaderAnimationEl) {
				a = jQuery(a.parentNode.parentNode.parentNode.parentNode);
				jQuery("<span></span>").attr('id','loaderAnimationEl').css('visibility','hidden').prependTo(a);
				loaderAnimationEl = document.getElementById("loaderAnimationEl");
			}
				loaderAnimationEl.style.visibility = 'visible';
				loaderAnimationEl.className = 'kategorie';
		}
	}
	else {
		loaderAnimationEl = document.getElementById("loaderAnimationEl");
		if (loaderAnimationEl) {
			loaderAnimationEl.className = 'hide';
			loaderAnimationEl.style.visibility = 'visible';
		}
	}
}

function tb_parseQuery ( query ) {
   var Params = {};
   if ( ! query ) {return Params;}// return empty object
   var Pairs = query.split(/[;&]/);
   for ( var i = 0; i < Pairs.length; i++ ) {
	  var KeyVal = Pairs[i].split('=');
	  if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
	  var key = unescape( KeyVal[0] );
	  var val = unescape( KeyVal[1] );
	  val = val.replace(/\+/g, ' ');
	  Params[key] = val;
   }
   return Params;
}

function winSize()
{
	var myWidth = 0, myHeight = 0, myHeight2 = 0,paginationOut,pubguideactivetab,temp;
	if( typeof( window.innerWidth ) == 'number' ) { //No-IE
	myWidth = window.innerWidth;
	myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ standard mode
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	pubguideactivetab = document.getElementById("pubguideactivetab");
	paginationOut = document.getElementById("paginationOut");
	if (pubguideactivetab) {
		myHeight2 = myHeight;
		if (paginationOut) {
			myHeight2 -= 17;
		}
		myHeight2 -= 323;
		temp = document.getElementById('notice');
		if (temp) {
			myHeight2 -= temp.offsetHeight;
		}
		temp = document.getElementById('NoItemFindLinksId');
		if (temp) {
			myHeight2 -= temp.offsetHeight;
		}
		pubguideactivetab.style.height = myHeight2 + 'px';
		if (paginationOut) {
			// alert('pubguideactivetab.scrollHeight = '+pubguideactivetab.scrollHeight+'\nmyHeight2 = '+myHeight2+'\npubguideactivetab.firstChild.offsetHeight = '+pubguideactivetab.firstChild.offsetHeight);
			if (pubguideactivetab.scrollHeight != '0' && pubguideactivetab.scrollHeight != myHeight2) {
				paginationOut.style.bottom = '117px';
			}
			else {
				paginationOut.style.bottom = (117 + myHeight2 - pubguideactivetab.firstChild.offsetHeight) + 'px';
			}
		}
	}
	if (document.getElementById("boxNazory") != null) {
		if (document.getElementById("tvujNazorForm")) myHeight -= 125;
		document.getElementById("boxNazory").style.height = (myHeight - 221) + 'px';
	}
}

function iframeResizer(trrr) {
	if (window.top == window.self) {
		if (window.parent && window.parent != window.self) {
			jQuery('<a></a>').css({'position':'absolute',bottom:"100%",left:0,'margin':'0 0 7px 7px'}).addClass("green").text('Návrat na předchozí stránku').attr("href","javascript:window.history.go(-1)").prependTo(jQuery("#all"));
		}
		else {
			jQuery('<a></a>').css({'position':'absolute',bottom:"100%",left:0,'margin':'0 0 7px 7px'}).addClass("green").text('Návrat na úvodní stránku').attr("href","./").prependTo(jQuery("#all"));
		}
	}
	jQuery(document).ready(function(){
		var all = jQuery("#all");
		var h = parseInt(all.height())+15;
		var w = parseInt(all.width())+2;
		if ($.browser.opera) h -= 1;
//		window.status = 'h='+h;
		window.top.top.jQuery("#cboxWrapper,#colorbox,#cboxContent,#cboxLoadedContent,#cboxIframeOut,#cboxIframe").css({height:h,width:w});
		var floaterLiner = jQuery("div#floaterLiner");
		if (parseInt(floaterLiner.css('marginBottom'))>(10-h/2)) {
			floaterLiner.css('margin-bottom',-(Math.floor(h/2)));
		}
/*
		if (trrr) {
			var chybova = window.top.top.document.getElementById("chybovahlaska");
			if (!chybova) {
//				alert('not found chybova');
				chybova = window.top.top.jQuery("<div></div>");
			}
			chybova.attr("id","chybovahlaska").html("<p>"+trrr+"</p>").removeClass('hide');
			window.top.top.jQuery('#modalWrap').append(chybova);
		}
*/
	});
}

function hideChybovka(){
/*
	var chybova = jQuery("#chybovahlaska");
	if (chybova) {
		chybova.fadeOut(function(){this.className='hide'});
	}
*/
}

function openIFrame(url, width, height) {
  $('<a />').colorbox({width: width + "px", height: height + "px", iframe:true, open: true, href: url});
}

(function($) {
jQuery.fn.pngFix = function(settings,fixDirectImg,fixBgImg,fixInput,fixElement,fixLowerImg) {
	// Settings
	settings = jQuery.extend({
		blankgif: '/images/blank.gif'
	}, settings);
	if (jQuery.browser.msie && jQuery.browser.version < 7) {
		//fix images with png-source
		if (fixDirectImg) {
			jQuery(this).find("img[src$=.png]").each(function(i,element) {
				element = jQuery(element);
				element.attr('width',element.width());
				element.attr('height',element.height());
				var prevStyle = '';
				var strNewHTML = '';
				var imgId = (element.attr('id')) ? 'id="' + element.attr('id') + '" ' : '';
				var imgClass = (element.attr('class')) ? 'class="' + element.attr('class') + '" ' : 'class="pngFixedImg" ';
				var imgTitle = (element.attr('title')) ? 'title="' + element.attr('title') + '" ' : '';
				var imgAlt = (element.attr('alt')) ? 'alt="' + element.attr('alt') + '" ' : '';
				var imgAlign = (element.attr('align')) ? 'float:' + element.attr('align') + ';' : '';
				var imgHand = (element.parent().attr('href')) ? 'cursor:hand;' : '';
				if (this.style.border) {prevStyle += 'border:'+this.style.border+';';this.style.border = '';}
				if (this.style.padding) {prevStyle += 'padding:'+this.style.padding+';';this.style.padding = '';}
				if (this.style.margin) {prevStyle += 'margin:'+this.style.margin+';';this.style.margin = '';}
				var imgStyle = (this.style.cssText);
				strNewHTML += '<span '+imgId+imgClass+imgTitle+imgAlt;
				strNewHTML += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand;
				strNewHTML += 'width:' + element.width() + 'px;' + 'height:' + element.height() + 'px;';
				strNewHTML += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + element.attr('src') + '\', sizingMethod=\'scale\');';
				strNewHTML += imgStyle+'"></span>';
				if (prevStyle != ''){
					strNewHTML = '<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:' + element.width() + 'px;' + 'height:' + element.height() + 'px;'+'">' + strNewHTML + '</span>';
				}
				element.hide();
				element.after(strNewHTML);
			});
		}
		// fix css background pngs
		if (fixBgImg) {
			jQuery(this).find("*").each(function(i,element){
				element = jQuery(element);
				var bgIMG = element.css('background-image');
				if(bgIMG.indexOf(".png")!=-1){
					var iebg = bgIMG.split('url(')[1].split(')')[0];
					element.css('background-image', 'none').get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + iebg + ",sizingMethod='scale')";
				}
			});
		}
		//fix input with png-source
		if (fixInput) {
			jQuery(this).find("input[src$=.png]").each(function(i,element) {
				element = jQuery(element);
				var bgIMG = element.attr('src');
				element.get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + bgIMG + '\', sizingMethod=\'scale\');';
			element.attr('src', settings.blankgif)
			});
		}
	}
	return jQuery;
};
})(jQuery);

function selectizeAllSelects(){
	$('select').each(function(vv,el)
	{
		if(el.parentNode.className.indexOf('enhanced') == -1)
		{
			el = jQuery(el);
			targetselect = el;
			targetselect.hide();
			var target = targetselect.parent();
			target.addClass('enhanced');
			target.append('<dl class="dropdown"><dt><a class="dropdown_toggle" href="#"></a></dt><dd><div class="options"><ul></ul></div></dd></dl>');
			target.find('dl').css('zIndex',z);
			z--;
			target.find('div.options').hide();
			var i = 0;
			targetselect.children().each(function(v,elm)
			{
				elm = jQuery(elm);
				target.find('ul').append('<li class="' + elm.attr('class') + '"><a href="#"><span class="value">' + elm.text() + '</span><span class="hide index">' + i + '</span></a></li>');
				if(elm.attr('selected') == true)
				{
					targetselect.parent().find('a.dropdown_toggle').append('<span></span>').find('span').text(elm.text());
				}
				i++;
			});
			var parentDiv = $(targetselect.parentNode);
			parentDiv.find('a.dropdown_toggle').live('click', function()
			{
				var theseOptions = $(this).parent().parent().find('.options');
				if(theseOptions.css('display')=='block')
				{
					$('.activedropdown').removeClass('activedropdown');
					theseOptions.hide();
				}
				else
				{
					theseOptions.parent().parent().addClass('activedropdown');
					theseOptions.show();
				}
				return false;
			});
			parentDiv.find('div.options a').live('click', function(e)
			{
				$('div.options').hide();
				var enhanced = jQuery(this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode);
				var realselect = enhanced.find('select').eq(0);
				realselect.attr("selectedIndex",$(this).find('span.index').text())
				enhanced.find('a.dropdown_toggle').empty().append('<span></span>').find('span').text($(this).find('span.value').text());
				realselect.trigger("change");
				return false;
			});
		}
	});
}

var checkExternalClick = function(event)
{
	if ($(event.target).parents('.activedropdown').length === 0)
	{
		$('.activedropdown').removeClass('activedropdown');
		$('.options').hide();
	}
};

var z = 7777;

jQuery(document).ready(function(){

	jQuery("a[rel=external]").each(function() {
		this.target = "_blank";
	});

	jQuery('#poznej,#guide,#zazitky,#ambasador,#czechs,#shopsquare div h3 a').each(function(){
		var el = jQuery(this);
		if (this.id == 'poznej' || this.id == 'zazitky' || this.id == 'ambasador' || this.id == 'guide' || this.id == 'czechs') {
			el.find('.footmenudiv').css({bottom:64,visibility:'hidden'}).addClass('hide').append(jQuery('<span />').attr('class','pngbg').html('<span />'));
			if (this.id == 'poznej' || this.id == 'zazitky') {
				if (jQuery.browser.msie && jQuery.browser.version < 7) {
					el.hover(
						function(){
							var thh = jQuery(this).addClass('hovered');
							thh = thh.children().eq(1).css('left',1);
							thh.removeClass('hide').css({'top':'auto','bottom':64,'visibility':'visible','display':'block'});
						},
						function(){
							var thh = jQuery(this);
							var thhD = thh.children().eq(1);
							thh.removeClass('hovered');
							thhD.addClass('hide').css({'top':'auto','bottom':64,'visibility':'hidden','display':'none'});
						}
					);
				}
				else {
					el.children().eq(1).css({'bottom':'auto','top':'0','marginTop':'0','visibility':'visible','display':'block'});
					el.hover(
						function(){
							var thh = jQuery(this).addClass('hovered');
							thh = thh.children().eq(1);
							thh.stop(true,false).animate({'top':-(thh.height()+20)},{queue:false,duration:500});
						},
						function(){
							var thh = jQuery(this);
							var thhD = thh.children().eq(1);
							var pvTop = thhD.css('top');
							thh.removeClass('hovered');
							thhD.css({'top':pvTop,'visibility':'visible','display':'block'});
							thhD.stop(true,false).animate({'top':0},{queue:false,duration:500});
						}
					);
				}
			}
			else {
				el.hover(
					function(){
						jQuery(this).addClass('hovered');
					},
					function(){
						jQuery(this).removeClass('hovered');
					}
				);
			}
		}
		else {
			el.hover(
				function(){
					jQuery(this).addClass('hovered');
				},
				function(){
					jQuery(this).removeClass('hovered');
				}
			);
		}
		el.append("<div class='pngbg'><span></span></div>");
	});
	if ($.browser.msie && $.browser.version < 7) {
		jQuery('span.doPngFix,span.bigimg').pngFix({blankgif:'/images/spacer.gif'},1,1,0,1,0);
		if (document.getElementById('shopitems')) {
			jQuery("#shopitems a").pngFix({blankgif:'/images/spacer.gif'},1,1,0,1,0);
		}
	}
	setTimeout(function(){
		selectizeAllSelects();
		$(document).mousedown(checkExternalClick);
	},1);
	jQuery("a.iframe").each(function(i,el){
		var params = tb_parseQuery(el.href);
		var optionsH = {iframe:true};
	if($.browser.msie){
		if (params['w'] && params['w'] > 0) optionsH.width = optionsH.initialWidth = parseInt(params['w'],10);
		if (params['h'] && params['h'] > 0) optionsH.height = optionsH.initialHeight = parseInt(params['h'],10)+36;
	} else {
		if (params['w'] && params['w'] > 0) optionsH.width = optionsH.initialWidth = parseInt(params['w'],10);
		if (params['h'] && params['h'] > 0) optionsH.height = optionsH.initialHeight = parseInt(params['h'],10);
	}
		jQuery(el).colorbox(optionsH,hideChybovka);
	});
 if (document.getElementById('poznejteBoxCont'))
 {
	var optionsH;
	if($.browser.msie && $.browser.version < 8) {
		optionsH = {preloading:false,iframe:true};optionsH.width = optionsH.initialWidth = 466;optionsH.height = 432;optionsH.initialHeight = 400;
	} else {
		optionsH = {preloading:false,iframe:true};optionsH.width = optionsH.initialWidth = 466;optionsH.height = optionsH.initialHeight = 400;
	}
	if($.browser.msie && $.browser.version < 8){
		jQuery('#poznejteBoxCont area[rel=reklamyplakatyaudia]').colorbox(optionsH,function(){ $("#cboxTopCenter").css({"height":"17px"}); $("#cboxTopCenter").removeAttr("style"); Cufon.replace('#contentTitle,#contentCurrent'); $("#colorbox").css({"padding":0});$("#cboxWrapper").css({"height":"400px"});});
	} else {
		jQuery('#poznejteBoxCont area[rel=reklamyplakatyaudia]').colorbox(optionsH,function(){Cufon.replace('#contentTitle,#contentCurrent')});
	}
 }
 if (document.getElementById('shoppingcart'))
 {
	var shoppingcart = jQuery("#shoppingcart");
	jQuery("#shoppingcarttoggler").click(function() {
		shoppingcart.toggleClass('openup');
	});
	jQuery("a.erase").attr('title','Odebrat zboží z košíku');
 }
 if (document.getElementById("hoverableproducts"))
 {
  jQuery("#hoverableproducts > span").hover(function(){this.className="hoveredSpan";},function(){this.className="";});
 }


 eshopTargetBlank();

});

function eshopTargetBlank() {
    var elements = document.getElementsByTagName("a");

    for (var i = 0; i < elements.length; i++) {

        if (elements[i].href.indexOf("eshop.prazdroj.cz") != -1) {
//             alert(elements[i].href);
            elements[i].onclick = function(e) {
                window.open(this.href);
                return preventDefaultAction(e);
            }
        }
    }
}

function preventDefaultAction(e) {
  if (e && e.preventDefault) {
      e.preventDefault;
  } else {
      window.event.returnValue = false;
  }
  return false;
}



Cufon.replace('h1 span,h1 a', {textShadow: '2px 2px rgba(0, 0, 0, 0.2)',color: '-linear-gradient(#EEDF86, #c3bc6c)'});
Cufon.replace('h2.textize,h3.textize,h4.textize,h5.textize,p.textize,label.textize,strong.textize,.textizeStar,a.textize,.popContentNumbers .textize,#sitemap li a.cuf,#profileboxLink1,#profileboxLink2,#puKlubUserName,#calendar th,#calendar .month_name',{hover:true});
Cufon.replace('#contentMenu a',{hover:true,textShadow:'1px 1px rgba(0,0,0,0.3)'});
Cufon.replace('.textizeShadow',{hover:true,textShadow:'1px 1px rgba(105,86,45,0.5)'});
Cufon.replace('strong.cufon');

function writeFlashVideo(swf,flv,w,h,where,img){
	var so = new SWFObject(swf, "index", w, h, "9.0.28", "#000000");
	so.useExpressInstall('../swf/expressinstall.swf');
	so.addParam("scale", "noscale");
	so.addParam("wmode","transparent");
	so.addParam("allowFullScreen","true");
	so.addParam("allowScriptAccess","always");
	so.addVariable("video", flv);
	so.addVariable("image", img);
	so.addVariable("autoplay", "false");
	so.write(where);
}

function selectVideoCepovani(a){
	var x,bg;
	if (a.parent().get(0).tagName.toLowerCase() == 'h3') {
		x = a.attr('id');
		bg = a.find('img').get(0).src.replace("-t.jpg",".jpg");
		window.location.hash = x.replace("jc-", "");
		x = a.attr('id').substr(0,x.length-8);
		jQuery('#poznejteBoxCepovaniVideos div.active,#poznejteBoxMenu a.active').removeClass('active');
		jQuery('#'+x+','+'#'+x+'-v').addClass('active');
		x = a.attr('id').replace("jc-","");
		x = x.substr(0,x.length-8)+'-'+x.substr(x.length-1);
		writeFlashVideo("../swf/videoplayer.swf","../flv/jakcepovat/"+x+".flv","440","280","cepovani-video-flash",bg);
	}
	else {
		x = document.getElementById(a.attr('id')+'-v');
		if (x) {
			jQuery(x.getElementsByTagName('a')[0]).trigger('click');
		}
	}
}

	function openLightbox(id) {
		var $meetId = $("a[rel=meet-" + id + "]", "#meetId");
		if($meetId[0]) {
			$meetId.trigger("click");
		}
	}

/*
var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;b<c.length;b++){this.screenStyleSheet.addRule(c[b],"behavior:expression(DD_belatedPNG.fixPng(this))")}}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlOffsets(a);this.vmlOpacity(a);if(a.isImg){this.copyImageBorders(a)}},attachHandlers:function(i){var d,c,g,e,b,f;d=this;c={resize:"vmlOffsets",move:"vmlOffsets"};if(i.nodeName=="A"){e={mouseleave:"handlePseudoHover",mouseenter:"handlePseudoHover",focus:"handlePseudoHover",blur:"handlePseudoHover"};for(b in e){if(e.hasOwnProperty(b)){c[b]=e[b]}}}for(f in c){if(c.hasOwnProperty(f)){g=function(){d[c[f]](i)};i.attachEvent("on"+f,g)}}i.attachEvent("onpropertychange",this.readPropertyChange)},giveLayout:function(a){a.style.zoom=1;if(a.currentStyle.position=="static"){a.style.position="relative"}},copyImageBorders:function(b){var c,a;c={borderStyle:true,borderWidth:true,borderColor:true};for(a in c){if(c.hasOwnProperty(a)){b.vml.color.shape.style[a]=b.currentStyle[a]}}},vmlFill:function(e){if(!e.currentStyle){return}else{var d,f,g,b,a,c;d=e.currentStyle}for(b in e.vml){if(e.vml.hasOwnProperty(b)){e.vml[b].shape.style.zIndex=d.zIndex}}e.runtimeStyle.backgroundColor="";e.runtimeStyle.backgroundImage="";f=true;if(d.backgroundImage!="none"||e.isImg){if(!e.isImg){e.vmlBg=d.backgroundImage;e.vmlBg=e.vmlBg.substr(5,e.vmlBg.lastIndexOf('")')-5)}else{e.vmlBg=e.src}g=this;if(!g.imgSize[e.vmlBg]){a=document.createElement("img");g.imgSize[e.vmlBg]=a;a.className=g.ns+"_sizeFinder";a.runtimeStyle.cssText="behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;";c=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;g.vmlOffsets(e)};a.attachEvent("onload",c);a.src=e.vmlBg;a.removeAttribute("width");a.removeAttribute("height");document.body.insertBefore(a,document.body.firstChild)}e.vml.image.fill.src=e.vmlBg;f=false}e.vml.image.fill.on=!f;e.vml.image.fill.color="none";e.vml.color.shape.style.backgroundColor=d.backgroundColor;e.runtimeStyle.backgroundImage="none";e.runtimeStyle.backgroundColor="transparent"},vmlOffsets:function(d){var h,n,a,e,g,m,f,l,j,i,k;h=d.currentStyle;n={W:d.clientWidth+1,H:d.clientHeight+1,w:this.imgSize[d.vmlBg].width,h:this.imgSize[d.vmlBg].height,L:d.offsetLeft,T:d.offsetTop,bLW:d.clientLeft,bTW:d.clientTop};a=(n.L+n.bLW==1)?1:0;e=function(b,p,q,c,s,u){b.coordsize=c+","+s;b.coordorigin=u+","+u;b.path="m0,0l"+c+",0l"+c+","+s+"l0,"+s+" xe";b.style.width=c+"px";b.style.height=s+"px";b.style.left=p+"px";b.style.top=q+"px"};e(d.vml.color.shape,(n.L+(d.isImg?0:n.bLW)),(n.T+(d.isImg?0:n.bTW)),(n.W-1),(n.H-1),0);e(d.vml.image.shape,(n.L+n.bLW),(n.T+n.bTW),(n.W),(n.H),1);g={X:0,Y:0};if(d.isImg){g.X=parseInt(h.paddingLeft,10)+1;g.Y=parseInt(h.paddingTop,10)+1}else{for(j in g){if(g.hasOwnProperty(j)){this.figurePercentage(g,n,j,h["backgroundPosition"+j])}}}d.vml.image.fill.position=(g.X/n.W)+","+(g.Y/n.H);m=h.backgroundRepeat;f={T:1,R:n.W+a,B:n.H,L:1+a};l={X:{b1:"L",b2:"R",d:"W"},Y:{b1:"T",b2:"B",d:"H"}};if(m!="repeat"||d.isImg){i={T:(g.Y),R:(g.X+n.w),B:(g.Y+n.h),L:(g.X)};if(m.search("repeat-")!=-1){k=m.split("repeat-")[1].toUpperCase();i[l[k].b1]=1;i[l[k].b2]=n[l[k].d]}if(i.B>n.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();

DD_belatedPNG.fix('#layerMenu li a small, #meetingTable #meetingFootFake div span.under, #meetingTable #meetingFootFake div.twoDigitNumber span.under, #meetingTable #meetingFootFake span.shadow, #meetingTable #meetingBody #meetingDates div .go small, #meetingTable #meetingBody #meetingDates div .notGo small, #invitationParts li.date, #invitationParts li.confirmedUsers, .lightbox2 #meetingTable #meetingBody #meetingDates div.day1, .lightbox2 #meetingTable #meetingBody #meetingDates div.day1 strong span, .lightbox2 #meetingTable #meetingBody #meetingDates div.day2, .lightbox2 #meetingTable #meetingBody #meetingDates div.day2 strong span, .lightbox2 #meetingTable #meetingBody #meetingDates div.day3, .lightbox2 #meetingTable #meetingBody #meetingDates div.day3 strong span, .popContainer2 #meetingTable #meetingBody #meetingDates div.day1, .popContainer2 #meetingTable #meetingBody #meetingDates div.day1 strong span, .popContainer2 #meetingTable #meetingBody #meetingDates div.day2, .popContainer2 #meetingTable #meetingBody #meetingDates div.day2 strong span, .popContainer2 #meetingTable #meetingBody #meetingDates div.day3, .popContainer2 #meetingTable #meetingBody #meetingDates div.day3 strong span, .popContent #selectedDates li span.bullet, #invitationParts li.links span.bullet, .popContent #selectedDates li span.line, #meetingTable span.shadowTop, .popContainer4 span.shadowTop, #meetingTable span.shadowBottom, .popContainer4 span.shadowBottom ');*/




