var xmlhttp;
$(document).ready(function(){
xmlhttp=GetXmlHttpObject();
if(xmlhttp==null){
alert("Browser does not support HTTP Request");
return;
}
var urlPath = $(location).attr('href');
result = urlPath.search("intranet");
if(result>0){
gElem="";
}else{
gElem=osVersion=$.client.os;
gElem2=$(location).attr('href');
//alert($(window).height());
if($.browser.msie && parseInt($.browser.version, 10) === 8){
$("#siteInstructions").removeClass().addClass('w239 borderNova bgBlack bodyShadow ultraWhiteFont bold p5');
$("#iE8").show();
$("#subInstructions").attr("id","");
}
$.fn.repeat = function(speed, time){
var $this = $(this);
$this.fadeIn(speed);
setInterval(function(){
$this.fadeOut(speed, function(){$this.fadeIn(speed);});
}, time*500);
};
$('.pleaseStandby').repeat("slow", 1);
$("#subInstructions").repeat("slow", 5);
$("#noScriptMessage").hide();
$("#dialogBox").hide();
$(".dialog").center();
$(".dialogSubscription").fadeIn('slow').center();
$("#websiteDiv").hide();
$("#virtualScapes").center().show();
$("#introLoader").center().show();
$("#dialogMessage").center().show();
$("#footer").hide();
$("#bodyDiv").hide();
$.fn.doShow = function(){
if($('#bg').attr('complete')){
$.fn.callSlideIntro();
}else{
$('#bg').load(function(){
setTimeout(function(){$.fn.callSlideIntro()},1000);
});
}
}
$('#bg').attr('src','http://xydon.com/images/bgSpaceBack.jpg');
$.fn.doShow();
$(window).resize(function(){
//$.fn.doShow();
});
}
if(gElem=="Mac" || gElem=="iPhone/iPod" || gElem=="an unknown OS"){
$("#siteInstructions").hide();
$.fn.ajaxCallsNotMoron(gElem);
}else{
$(document).keyup(function(e){
if(e.which==122){
e.preventDefault();
if(!$("#f11").val()){
$("#f11").val(1);
$("#siteInstructions").show().animate({'margin-left':'-285px'},1000);
setTimeout($.fn.websiteDiv,1000);
$.fn.ajaxCallsNotMoron(gElem);
$.fn.closeAllPopUps();
}else{
$.fn.closeAllPopUps();
$("#f11").val('');
$("#siteInstructions").show().animate({'margin-left':'285px'},1000);
$("#websiteDiv").fadeOut('slow');
$(".dialog").fadeOut('slow');
}
return false;
}
});
}
function setSwishImage(navId){
$("#"+navId+"StandByeSwish").attr("src","/images/dummy.gif");
}
$(".menuNav").mouseover(function(){
navId = $(this).attr("id");
$("#"+navId+"Numbers").attr("src","/images/0secondNumbers.gif");
$("#"+navId+"StandByeSwish").show().attr("src","/images/standByeMouseOver.gif").fadeOut('slow');
});
$(".menuNav").mouseout(function(){
navId = $(this).attr("id");
$("#"+navId+"Numbers").attr("src","/images/dummy.gif");
$("#"+navId+"StandByeSwish").hide();
setTimeout(function(){setSwishImage(navId)},500);
});
$(".menuNav").click(function(){// this is services portfolio....
$.fn.closeAllPopUps();
navId = $(this).attr("id");
$("#homeOnDiv").hide();
$("#servicesOnDiv").hide();
$("#portfolioOnDiv").hide();
$("#productionOnDiv").hide();
$("#contactUsOnDiv").hide();
$("#homeOffDiv").fadeIn('slow');
$("#servicesOffDiv").fadeIn('slow');
$("#portfolioOffDiv").fadeIn('slow');
$("#productionOffDiv").fadeIn('slow');
$("#contactUsOffDiv").fadeIn('slow');
$("#"+navId+"OffDiv").hide();
$("#"+navId+"OnDiv").show();
ajaxCallsSetMenuNavigation(navId);
});
//controls the users option to subscribe or unsubscribe.
$('.subscription').click(function(){
statusId = $(this).attr("value");
ajaxCallsSetSubscriptionStatus(statusId);
});
$(".newsLetter").mouseover(function(){
thisId = $(this).attr("id");
if(thisId=="reset"){
$(this).attr('src','/images/resetButton.gif').fadeIn('slow');
}else{
$(this).attr('src','/images/submitButton.gif').fadeIn('slow');
}
});
$(".newsLetter").mouseout(function(){
thisId = $(this).attr("id");
if(thisId=="reset"){
$(this).attr('src','/images/resetButton.png').fadeIn('slow');
}else{
$(this).attr('src','/images/submitButton.png').fadeIn('slow');
}
});
$("#joinEmail").focus(function(){
$("#joinEmail").val('');
});
$(".newsLetter").click(function (){
thisId = $(this).attr("id");
if($("#joinEmail").val()=='' && thisId=="submit"){
$("#joinEmail").hide().val('Email Empty!').fadeIn('slow');
}else{
if(thisId=="reset"){
$("#joinEmail").hide().val('').fadeIn('slow');
}else{
$("#joinForm").hide();
$("#joinWhite").show().fadeOut('slow');
setTimeout($.fn.submittingData,550);
}
}
});
$.fn.submittingData = function(){
$("#submittingData").show();
setTimeout($.fn.showJoinForm,1000);
}
$.fn.showJoinForm = function(){
ajaxCallsSubmitEmail($("#joinEmail").val());
}
$.fn.dialogBox = (function(which){
if($('#dialogBox').is(':visible')){
$('#dialogBox').hide().draggable().fadeIn('slow');
}else{
$('#dialogBox').hide().center().draggable().fadeIn('slow');
}
});
$(".mouseOver").mouseover(function(){
thisId = $(this).attr("id");
if(thisId==2 || thisId==9 || thisId==26){
$("#elem_"+thisId).removeClass().addClass('w137 bgBlack pHt48 opacity75');
}else{
$("#elem_"+thisId).removeClass().addClass('w137 bgBlack pHt28 opacity75');
}
});
$(".mouseOver").mouseout(function(){
thisId = $(this).attr("id");
if(thisId==2 || thisId==9 || thisId==26){
$("#elem_"+thisId).removeClass().addClass('w137 bgBlack pHt48 opacity75 displayNone');
}else{
$("#elem_"+thisId).removeClass().addClass('w137 bgBlack pHt28 opacity75 displayNone');
}
});
$('.mouseOver').click(function(){
libraryId = $(this).attr("id");
$("#dialogTitle").html('');
if(libraryId=="virtual"){
$.fn.ajaxCallsVirtualScapes();
}else{
ajaxCallsSiteTextSection(libraryId);
$.fn.dialogBox();
}
});
$(".mouseOverPortfolio").mouseover(function(){
thisId = $(this).attr("id");
$("#elem_"+thisId).removeClass().addClass('w60 bgBlack pHt39 opacity75');
});
$(".mouseOverPortfolio").mouseout(function(){
thisId = $(this).attr("id");
$("#elem_"+thisId).removeClass().addClass('w60 bgBlack pHt39 opacity75 displayNone');
});
$('.mouseOverPortfolio').click(function(){
thisId = $(this).attr("id");
alert("pop portfolio sections");
});
//*******************************************************************************************
//*******************************************************************************************
//*******************************************************************************************
//Popup dialog boxes
//*******************************************************************************************
//*******************************************************************************************
//*******************************************************************************************
$('.closeSelectedDialog').click(function(){
$($(this).parent().parent().parent()).fadeOut('slow');
$("#dialogText").html('');
$("#dialogTitle").html('');
$("#xydonTextDisplay").html('');
$("#1MageTextDisplay").html('');
$("#jeongTextDisplay").html('');
return false;
});
$.fn.closeAllPopUps = function(){
$('#dialogRiskAssessmentIntro').hide();
$('#dialogJeongIntro').hide();
$('#dialog1MageIntro').hide();
$("#dialogXydonIntro").hide();
$("#dialogBox").hide();
$('#dialogLogin').hide();
$("#dialogTopNav").hide();
}
$('#internalPopUp').click(function(){
$.fn.closeAllPopUps();
var currUrl = $(location).attr('href');
if(currUrl.substr(0,10)=="http://192"){
window.open("intranet","_blank");
}else{
window.open("https://xydon.com/intranet","_blank");
}
});
$('.loginButton').click(function(){
username = $("#username").val();
password = $("#password").val();
ajaxCallsLogin(username,password);
});
$(".recentCompanyInfo").mouseover(function(){
thisId = $(this).attr("id");
$("#elem_"+thisId).removeClass().addClass('w61 bgBlack pHt37 opacity75');
});
$(".recentCompanyInfo").mouseout(function(){
thisId = $(this).attr("id");
$("#elem_"+thisId).removeClass().addClass('w61 bgBlack pHt37 opacity75 displayNone');
});
$('.recentCompanyInfo').click(function(){
newClientId = $(this).attr("id");
ajaxCallsCompanySection(newClientId);
$.fn.dialogBox();
});
//*******************************************************************************************
//*******************************************************************************************
//*******************************************************************************************
$(".topNav").mouseover(function(){
thisTop = $(this).attr("id");
$("#"+thisTop).hide().removeClass().addClass('cursorHand topNav opacity75').fadeIn('slow');
ajaxCallsSetTopNav(thisTop);
});
$(".topNav").mouseout(function(){
thisTop = $(this).attr("id");
$("#"+thisTop).removeClass().addClass('cursorHand topNav opacity40');
});
});
$.fn.websiteDiv = function(){
$("#websiteDiv").fadeIn('slow').center();
}
$.fn.center = function (){//centers any div on screen
this.css("position","absolute");
this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() + "px");
this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
return this;
}
function option1(){
$("#f11").val(1);
//alert("1");
if(gElem=="Mac" || gElem=="iPhone/iPod" || gElem=="an unknown OS"){
$("#siteInstructions").hide();
}else{
$("#siteInstructions").animate({'margin-left':'-285px'},1000);
}
$("#websiteDiv").fadeIn('slow').center();
$("#bodyDiv").hide().removeClass().fadeIn('slow');
$("#introLoader").hide();
}
function option2(){
//alert("2");
$("#f11").val('');
$("#introLoader").hide();
$("#bodyDiv").hide().removeClass().fadeIn('slow');
if(gElem=="Mac" || gElem=="iPhone/iPod" || gElem=="an unknown OS"){
$("#websiteDiv").fadeIn('slow').center();
$("#siteInstructions").hide();
}else{
$("#websiteDiv").hide();
$("#siteInstructions").show().animate({'margin-left':'285px'},1000);
}
}
$.fn.callSlideIntro = function(which){
$("#bodyDiv").hide().fadeIn('slow');
$("#footer").fadeIn('fast');
thisReload='';
if(navigator.userAgent.search(/Firefox/i)>0){
thisReload=2;
}else if(navigator.userAgent.search("Chrome")>0){
thisReload=1;
}else if(navigator.userAgent.search(/Safari/i)>0){
thisReload=2;
}else if(navigator.userAgent.search(/MSIE/i)>0 || navigator.userAgent.search(/.NET/i)>0){
thisReload=2;
$("#browserAppend").show().html("
Microsoft Internet Explorer Detected!
Your experience will be better with Firefox, Chrome, or Safari web browsers!
");
}else if(navigator.userAgent.search(/Presto/i)>0){
$("#browserAppend").show().html("Opera Detected!
Your experience will be better with Firefox, Chrome, or Safari web browsers!");
thisReload=2;
}
if(thisReload==1){
if(screen.width == window.innerWidth && screen.height == window.innerHeight){
option1();
}else{
option2();
}
}else if(thisReload==2){
if(!window.screenTop && !window.screenY){
option1();
}else{
option2();
}
}
}
//usage:
//string=trim(xmlhttp.responseText)
function trim(s){
return s.replace(/^\s*(.*?)\s*$/,"$1");
}
function ajaxCallsSetMenuNavigation(navId){
$("#mainSiteElements").hide();
$("#loading").show();
setTimeout(function(){delayNavigation(navId)}, 1000);
}
function delayNavigation(navId){
gNavId=navId;
if(gNavId=="production" && $("#prodCall").val()==""){
$("#prodCall").val(1);
pBot="pBot66";
}else{
pBot="";
}
url="ajaxFunctions.htm?op=ajaxCallsSetMenuNavigation&navId="+navId+"&pBot="+pBot;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageAjaxSetNavigation;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageAjaxSetNavigation(){
if(xmlhttp.readyState==4){
$("#loading").hide();
$('#mainSiteElements').hide().html(xmlhttp.responseText).fadeIn();
$("#mcs_container").mCustomScrollbar("vertical",100,"easeOutCirc",1.05,"auto","yes","no",0);
$("#mcs2_container").mCustomScrollbar("vertical",100,"easeOutCirc",1.05,"auto","yes","no",0);
$("#mcs3_container").mCustomScrollbar("vertical",100,"easeOutCirc",1.05,"auto","yes","no",0);
if(gNavId=="contactUs"){
$("#yourName").focus();
}
}
}
$.fn.ajaxCallsNotMoron = function(os){
var url="ajaxFunctions.htm?op=ajaxCallsNotMoron&os="+os;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageAjaxCallsNotMoron;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageAjaxCallsNotMoron(){
if(xmlhttp.readyState==4){
$("#showNavigationTip").show();
}
}
function ajaxCallsLogin(username,password){
var url="loginReg.htm?op=login&username="+username+"&password="+password;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageAjaxCallsLogin;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageAjaxCallsLogin(){
if(xmlhttp.readyState==4){
if(trim(xmlhttp.responseText)=="valid"){
$.fn.closeAllPopUps();
location.replace('functions.htm?op=chpass', '_blank'); return false;
}else{
$('#dialogTitleLogin').hide().html(xmlhttp.responseText).fadeIn();
}
}
}
function ajaxCallsSiteTextSection(libraryId){
var url="ajaxFunctions.htm?op=ajaxCallsSiteTextSection&libraryId="+libraryId;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageSiteTextSection;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageSiteTextSection(){
if(xmlhttp.readyState==4){
var mySplitResult = xmlhttp.responseText.split(":~:");
$("#dialogTitle").html(".\\ "+mySplitResult[0]);
$('#dialogText').html(mySplitResult[1]);
$(document).ready(function(){
$("#mcs_containerP").mCustomScrollbar("vertical",100,"easeOutCirc",1.05,"auto","yes","no",0);
});
}
}
function ajaxCallsCompanySection(newClientId){
var url="ajaxFunctions.htm?op=ajaxCallsCompanySection&newClientId="+newClientId;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageCompanySection;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageCompanySection(){
if(xmlhttp.readyState==4){
var mySplitResult = trim(xmlhttp.responseText).split(":~:");
$("#dialogTitle").html(".\\ "+mySplitResult[0]);
$('#dialogText').html(mySplitResult[1]);
$(document).ready(function(){
$("#mcs_containerP").mCustomScrollbar("vertical",100,"easeOutCirc",1.05,"auto","yes","no",0);
});
}
}
function ajaxCallsRecentProjects(table){
var url="ajaxFunctions.htm?op=ajaxCallsRecentProjects";
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageRecentProjects;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageRecentProjects(){
if(xmlhttp.readyState==4){
$("#recentProjects").html(xmlhttp.responseText);
}
}
function ajaxCallsSetTopNav(whichNav){
$.fn.closeAllPopUps();
var url="ajaxFunctions.htm?op=ajaxCallsSetTopNav&whichNav="+whichNav;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageSetTopNav;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageSetTopNav(){
if(xmlhttp.readyState==4){
$("#dialogTopNav").fadeIn('slow');
var mySplitResult = xmlhttp.responseText.split("_");
$("#dialogTitleTopNav").html(".\\ "+mySplitResult[0]);
$('#textBodyTopNav').html(mySplitResult[1]);
$('#dialogTitleTopCount').html(mySplitResult[2]);
}
}
function ajaxCallsSubmitEmail(email){
var url="ajaxFunctions.htm?op=ajaxCallsSubmitEmail&email="+email;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4){
var response = trim(xmlhttp.responseText);
if(response=="invalidEmail"){
$("#joinEmail").val('Invalid Email!');
}else if(response=="emailExists"){
$("#joinEmail").val('Already Subscribed!');
}else{
$("#joinEmail").val('Welcome, Email Added!');
}
$("#submittingData").hide();
$("#joinForm").fadeIn('slow');
}
}
}
function ajaxCallsLoadPortfolio(id){
var url="ajaxFunctions.htm?op=ajaxCallsLoadPortfolio&newClientId="+id;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageLoadPortfolio;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageLoadPortfolio(){
if(xmlhttp.readyState==4){
var mySplitResult = xmlhttp.responseText.split("~");
$("#portfolioContainer").fadeIn('slow');
$("#loadingPortfolio").hide();
$("#portfolioPhoto").hide().attr("src","/images/"+mySplitResult[0]).fadeIn('fast');
$("#siteUrl").hide().html(mySplitResult[1]).fadeIn('slow');
$("#roleTitle").hide().fadeIn('slow');
$("#role").hide().html(mySplitResult[2]).fadeIn('slow');
}
}
$.fn.productionPopup = function(productionId){
$.fn.closeAllPopUps();
gProdId=productionId;
if(productionId==1){
$('#dialogXydonIntro').center().fadeIn('slow').draggable();
}else if(productionId==2){
$('#dialog1MageIntro').center().fadeIn('slow').draggable();
}else if(productionId==3){
$('#dialogJeongIntro').center().fadeIn('slow').draggable();
}else if(productionId==4){
alert("Please contact us for a demo!");
//window.open(gElem2+'/ticketing');
}else if(productionId==5){
$('#dialogRiskAssessmentIntro').center().fadeIn('slow').draggable();
}
var url="ajaxFunctions.htm?op=ajaxCallsPopProductionElement&productionId="+productionId;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageLoadProduction;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageLoadProduction(){
if(xmlhttp.readyState==4){
if(gProdId==1){
$('#xydonTextDisplay').html(xmlhttp.responseText);
}else if(gProdId==2){
$('#1MageTextDisplay').html(xmlhttp.responseText);
}else if(gProdId==3){
$('#jeongTextDisplay').html(xmlhttp.responseText);
}else if(gProdId==5){
$('#riskAssessmentTextDisplay').show().html(xmlhttp.responseText);
}
}
}
function stripBadChars(text){
trimText=text.replace(/^\s*(.*?)\s*$/,"$1");
trimText=trimText.replace(/&/g,'ampersand');
trimText=trimText.replace(/'/g,'squote');
trimText=trimText.replace(/op/g,':op:');
trimText=trimText.replace(/[\n\r]/g, '
');
return trimText;
}
function ajaxCallsLikeDislikeSite(){
dislikeReason=stripBadChars($("#likeDislikeText").val());
likeDislikeId=$("#dislikeId").val();
var url="ajaxFunctions.htm?op=ajaxCallsDislikeSite&dislikeReason="+dislikeReason+"&likeDislikeId="+likeDislikeId;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageLikeDislikeSite;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageLikeDislikeSite(){
if(xmlhttp.readyState==4){
$("#likeDislikeText").hide().val('Thanks, all comments appreciated!').fadeIn('slow');
$("#dialogTitleTopCount").hide().html(trim(xmlhttp.responseText)).fadeIn('slow');
}
}
function ajaxCallsSubmitContactData(name,email,message){
var url="ajaxFunctions.htm?op=ajaxCallsSubmitContactData&name="+name+"&email="+email+"&message="+message;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4){
var response = trim(xmlhttp.responseText);
if(response=="invalidEmail"){
$("#yourEmail").val('Invalid Email!');
}else{
$("#yourName").val('');
$("#yourEmail").val('');
$("#message").val('Thank you, Message Sent!');
}
$("#submittingContactData").hide();
$("#contactForm").fadeIn('slow');
}
}
}
function ajaxCallsSetSubscriptionStatus(whichId){
gSubscriptionId=whichId;
var url="ajaxFunctions.htm?op=ajaxCallsSetSubscriptionStatus&whichId="+whichId;
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageSetSubscriptionStatus;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageSetSubscriptionStatus(){
if(xmlhttp.readyState==4){
var response = trim(xmlhttp.responseText);
$("#alertStatus").hide().fadeIn('slow');
var mySplitResult = gSubscriptionId.split("_");
if(mySplitResult[0]==1){
$("#code").removeClass().addClass('bold pHt25 alertBorder ui-state-success');
$("#msg").html('Subscribed to News Letters!');
$("#leftImage").attr("src","/images/leftSuccess.gif");
$("#rightImage").attr("src","/images/rightSuccess.gif");
}else{
$("#code").removeClass().addClass('bold pHt25 alertBorder ui-state-error');
$("#msg").html('Sorry to see you go!');
$("#leftImage").attr("src","/images/leftError.gif");
$("#rightImage").attr("src","/images/rightError.gif");
}
}
}
$.fn.ajaxCallsVirtualScapes = function(){
$.fn.closeAllPopUps();
var url="ajaxFunctions.htm?op=ajaxCallsVirtualScapes";
//alert(url);
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=messageSetVirtualScapes;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function messageSetVirtualScapes(){
if(xmlhttp.readyState==4){
$("#mainNavigation").html(xmlhttp.responseText).fadeIn('slow');
$("#virtualScapesIntro").show( "scale", {percent: 100, direction: 'vertical' }, 650);
setTimeout(function(){$.fn.callVirtualFadeIn()},550);
}
}
$.fn.callVirtualFadeIn = function(){
$("#virtualScapesIntro").removeClass().addClass('fLeft w307 bodyShadow vTop borderNova virtualTitleBodyBack');
$("#introTitle").removeClass().addClass('fLeft pTop5 pBot5 pLeft8 w299 borderNovaBottom virtualTitleBack bodyShadowTitle').fadeIn('fast');
$("#introText").fadeIn('slow');
$("#titleImage").attr('src','/images/virtualScapesTitleOneSize.gif').fadeIn('slow');
setTimeout(function(){$.fn.callVirtualIcons()},150);
}
$.fn.callVirtualIcons = function(){
$("#virtualScapesIcons").fadeIn('slow');
$("#topBar").show().animate({'margin-top':'-54px'},1000);
$("#bottomBar").show().animate({'margin-top':'43px'},1000);
setTimeout(function(){$.fn.callVirtualWarningText()},850);
}
$.fn.callVirtualWarningText = function(){
$("#warningTitle").fadeIn('slow');
$("#virtualScapesIcons").removeClass().addClass('fLeft pLeft21 w350 pHt152 pTop3');
$("#topBar").hide();
$("#bottomBar").hide();
$("#warningText").fadeIn('slow');
setTimeout(function(){$.fn.callVirtualMorphing()},250);
}
$.fn.callVirtualMorphing = function(){
$("#headPhonesMorph").fadeIn('slow');
$("#speakersMorph").fadeIn('slow');
setTimeout(function(){$.fn.callVirtualActual()},250);
}
$.fn.callVirtualActual = function(){
$("#headPhonesMorph").attr('src', '/images/headPhonesMorphAni.gif');
$("#speakersMorph").attr('src', '/images/speakersMorphAni.gif');
$("#virtualButtons").fadeIn('slow');
}
$.fx.prototype.cur = function(){
if(this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
return this.elem[ this.prop ];
}
var r = parseFloat( jQuery.css( this.elem, this.prop ) );
return typeof r == 'undefined' ? 0 : r;
}
function winCenterOpen(theURL, Name, popW, popH, scroll){
var leftJustification = (screen.width - popW) / 2;
var topJustification = (screen.height - popH) / 2;
winProperties = 'width='+popW+',height='+popH+',left='+leftJustification+',top='+topJustification+',scrollbars='+scroll+''
Win = window.open(theURL, Name, winProperties)
if (parseInt(navigator.appVersion) >= 4){
Win.window.focus();
}
}
function GetXmlHttpObject(){
if(window.XMLHttpRequest){
// code for IE7+, Firefox, Chrome, Opera, Safari
return new XMLHttpRequest();
}
if(window.ActiveXObject){
// code for IE6, IE5
return new ActiveXObject("Microsoft.XMLHTTP");
}
return null;
}