$(document).ready(function(){if($('#head_meta_tag')&&$('#head_meta_tag').length>0){var content="<meta property='og:title' content='"+$('#head_meta_tag').text()+"' />";$('head').append(content);}
var heading=$('#index #main .welcome h2');if(heading.length){var headingClone=heading.clone();heading.after(headingClone.css({'position':'absolute','top':heading.offset().top+1,'left':heading.offset().left+1,'z-index':10,'color':'#000'}));heading.css({'z-index':11,'position':'relative'});$(window).resize(function(){headingClone.css({'top':heading.offset().top+1,'left':heading.offset().left+1});});}
if($('#tabs').length){var tabs=$('#tabs').show().attr('tooBig',false).find(".tab").hover(function(){$(this).find('.hover').show();$(this).find('.default').hide()},function(){$(this).find('.hover').hide();$(this).find('.default').show()}).end();$(window).scroll(function(){if(tabs.attr('tooBig')=='false'){if($(window).scrollTop()>152){tabs.css({top:40,position:'fixed'});}else{tabs.css({top:192,position:'absolute'});}}});$(window).resize(function(){tabs.css('left',$('#content').offset().left+974);if(tabs.offset().top+tabs.outerHeight()>$(window).height()){tabs.css('position','absolute');tabs.attr('tooBig',true);}else{tabs.css('position','fixed');tabs.attr('tooBig',false);}
$(window).scroll();}).resize();}
$('#mapOpener').click(function(){showPopup($('#map'));return false;});$('#sidebar .liveevents .more.hidden').click(function(event){$('#sidebar .liveevents .hidden').show(10);$(this).html('see all events').unbind('click');event.preventDefault();});$('.partner, .event, .softwarehalls ul li').click(function(event){if(!$(event.target).is('a')){document.location=$(this).find('a').attr('href');event.preventDefault();}});$('.exhibitorIcons a, .stand a').tooltip({delay:0,track:true,top:10,left:10,showURL:false,fade:250});$('.seminar .readMore').hide();$('.searchbox').focus(function(){$(this).select();});$(document).bind('openPopup',function(){var player=getVideoPlayer();if(player!==null){player.Pause();}})
$(document).bind('closePopup',function(){var player=getVideoPlayer();if(player!==null&&player.getTime()>0){player.DoPlay();}})
$('.popup').each(function(){var popup=$(this);$('a[href="#'+popup.attr('id')+'"]').click(function(){showPopup(popup);});});if(window.location.href.indexOf("#")>-1){var panelId=window.location.href.substr(window.location.href.indexOf("#")+1);if(panelId.length>0){showPopup($('#'+panelId+'.popup'));}}
if($.browser.msie&&$.browser.version==6){$('#navigation li').hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});}
$('#contactform textarea').keyup(function(){$(this).css('background-image',$(this).val()==''?'url("'+_imageUrl+'exhibitors/hint_question.png")':'none');})
$('#contactform textarea').focus(function(){$(this).css('background-image',$(this).val()==''?'url("'+_imageUrl+'exhibitors/hint_question.png")':'none');})
$('#contactform .button').click(function(){$('#contactform form').submit();})});function showPopup(popup,clearInputs){if(typeof(clearInputs)=='undefined'){clearInputs=true;}
if(popup.length){var width='500px';switch(popup.attr('id')){case'contactform':case'map':width='650px';break;}
var title=popup.find('h3').text();if(title!=''){popup.popup('open',{'title':title,'width':width,'clearInputs':clearInputs});popup.find('h3').css('display','none');}else{popup.popup('open',{'width':width,'clearInputs':clearInputs});}}}
function getVideoPlayer(){var videoPlayer=document.getElementById('videoPlayer');if(videoPlayer!==null&&typeof(videoPlayer.DoPlay)=='undefined'){videoPlayer=videoPlayer.getElementsByTagName('OBJECT')[0];}
return videoPlayer;}
function playVideo(videoFile){var videoPlayer=getVideoPlayer();videoPlayer.setConfig({'autoPlay':false,'loop':false,'initialScale':'scale','hideControls':true,'videoFile':videoFile});videoPlayer.DoPlay();document.getElementById('videos').style.display='none';$('#videos').popup('close');}
function checkLogoUpload(){if(document.getElementById('logoFile').value==''){alert('Please select a logo to upload.');return false;}
if((document.getElementById('currentLogo')!=null)&&!confirm('Are you sure you want to replace the existing logo?')){return false;}
document.showLoadingMessage('Please wait while the logo<br />is uploaded to the server.');return true;}
