/*  Copyright 2018, University of St Andrews QuVis Interactive Simulations
jQuery JavaScript Library v2.0.n Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors http://jquery.com/ Released under the MIT license http://jquery.org/license
edge Adobe Edge Animate JavaScript Library v3.0 Copyright 2014 Adobe Systems Inc. and its licensors. Released under the CC BY-NC-SA license, creativecommons.org/licenses   
fastclick.js Version: 1.0.6 Copyright (c) 2014 The Financial Times Ltd. https://github.com/ftlabs/fastclick Released under the MIT license https://github.com/ftlabs/fastclick/blob/master/LICENSE
normalize.css v3 Copyright (c) Nicolas Gallagher and Jonathan Neal https://github.com/necolas/normalize.css Released under the MIT license https://github.com/necolas/normalize.css/blob/master/LICENSE.md
*/
(function($,Edge,compId){var Composition=Edge.Composition,Symbol=Edge.Symbol;var interval;var streaming=0;var detectorColor;var detectorsOn=true;var detector1=[[],[],[]];var detector2=[[],[],[]];var detectorCoinc=[[],[],[]];for(i=0;i<6;i++){detector1[i]=[0,0,0,0,0,0,0,0,0,0,0];detector2[i]=[0,0,0,0,0,0,0,0,0,0,0];detectorCoinc[i]=[0,0,0,0,0,0,0,0,0,0,0];}
var beamSplitter2=0;var input=1;var opacityPhoton1=0.5;var opacityPhoton2=0.5;var theta=0;var currentGraph=0;var counter=0;var intensity=0.5;var intensity2=1;var probability=0.5
var counterStep=1;var images=[];function preloadImages(){var prefixes=[0,1,2,3,5,6,7,8,9,10,'NoPhase_0'],length=prefixes.length;for(var i=0;i<length;i++){_preloadImages(prefixes[i]);}}
function _preloadImages(prefix){for(var i=0;i<60;i++){var name='PlotIOP13_'+prefix+'_'+i,image=new Image();image.onload=function(){};image.onerror=function(){console.error("Error occur while preloading image: "+name);};image.src='./images/'+name+'.png';images.push(image);}}
function State(name){this.nameo=name;this.inputo=input;this.streamingo=streaming;this.thetao=theta;this.detector1o=detector1;this.detector2o=detector2;this.detectorCoinco=detectorCoinc;this.beamSplitter2o=beamSplitter2;this.opacityPhoton1o=opacityPhoton1;this.opacityPhoton2o=opacityPhoton2;this.thetao=theta;this.currentGrapho=currentGraph;this.countero=counter;this.intensityo=intensity;this.intensity2o=intensity2;this.probabilityo=probability;this.restore=function(){input=this.inputo;streaming=this.streamingo;theta=this.thetao;detector1=this.detector1o;detector2=this.detector2o;detectorCoinc=this.detectorCoinco;beamSplitter2=this.beamSplitter2o;opacityPhoton1=this.opacityPhoton1o;opacityPhoton2=this.opacityPhoton2o;theta=this.thetao;currentGraph=this.currentGrapho;counter=this.countero;intensity=this.intensityo;intensity2=this.intensity2o;probability=this.probabilityo;}}
function randomParticle(){sym_disable($('#Stage_fireButton'));if(streaming==0)sym_disable($('#Stage_continuousButton'));singlePhoton=AdobeEdge.getComposition(compId).getStage().getSymbol('singlePhoton');if(beamSplitter2==0){particle=Math.round(Math.random());AdobeEdge.getComposition(compId).getStage().$('#Stage_singlePhoton').show();singlePhoton.$('particlePath0000').show();singlePhoton.$('particlePath0001').show();singlePhoton.$('particlePath0002').hide();singlePhoton.$('particlePath0003').hide();if(particle==1){singlePhoton.$('particlePath0000').hide();detector1[0][0]++;detectorColor=1;}
if(particle==0){singlePhoton.$('particlePath0001').hide();detector2[0][0]++;detectorColor=2;}}
else if(beamSplitter2==1){particle=Math.round(Math.random()*3);AdobeEdge.getComposition(compId).getStage().$('#Stage_singlePhoton').show();singlePhoton.$('particlePath0000').hide();singlePhoton.$('particlePath0001').hide();singlePhoton.$('particlePath0002').hide();singlePhoton.$('particlePath0003').hide();if(particle==3){singlePhoton.$('particlePath0003').show();detector1[5][0]++;detectorColor=1;}
if(particle==2){singlePhoton.$('particlePath0002').show();detector2[5][0]++;detectorColor=2;}
if(particle==1){singlePhoton.$('particlePath0000').show();detector2[5][0]++;detectorColor=2;}
if(particle==0){singlePhoton.$('particlePath0001').show();detector1[5][0]++;detectorColor=1;}}
singlePhoton.play(0);if(streaming==0){setTimeout(function(){sym_enable($('#Stage_fireButton'));sym_enable($('#Stage_continuousButton'));;},3000);}}
function continuousFire(){$('#Stage_button_labelCopy4').text('Stop');streaming=1;sym_disable($('#Stage_fireButton'));clearInterval(interval);switch(input){case 1:randomParticle();interval=setInterval(function(){randomParticle();},3000);break;case 6:randomParticle();interval=setInterval(function(){randomParticle();},3000);break;case 2:AdobeEdge.getComposition(compId).getStage().getSymbol('EMwave2').play(0);interval=setInterval(function(){randomEMWave();},3000);break;case 3:singlePhoton2();interval=setInterval(function(){singlePhoton2();},4000);break;case 4:AdobeEdge.getComposition(compId).getStage().getSymbol('EMwave2').play(0);interval=setInterval(function(){randomEMWave();},3000);break;case 5:singlePhoton2();interval=setInterval(function(){singlePhoton2();},4000);break;}
sym_enable($('#Stage_continuousButton'));}
function randomEMWave(){particle=Math.random();particle2=Math.random();if(particle<intensity){detector1[input-1][intensity2-1]++;a=true;detectorColor=1;}else{a=false;}
if(particle2<1-intensity){detector2[input-1][intensity2-1]++;b=true;detectorColor=2;}else{a=false;}
if(a&&b){detectorCoinc[input-1][intensity2-1]++;detectorColor=3;}
detectors();}
function stopStream(){clearInterval(interval);AdobeEdge.getComposition(compId).getStage().$('#Stage_singlePhoton').hide();AdobeEdge.getComposition(compId).getStage().$('#Stage_singlePhotons').hide();$('#Stage_button_labelCopy4').text('Kontinuierlich');streaming=0;console.log(input);if(input!=2&&input!=4){sym_enable($('#Stage_fireButton'));}}
function detectors(){if(detectorsOn){if(input!=1&&input!=6){$('#Stage_detector1Count').html('N<sub>1</sub> = '+detector1[input-1][intensity2-1]);$('#Stage_detector2Count').html('N<sub>2</sub> = '+detector2[input-1][intensity2-1]);$('#Stage_coincCount').html('N<sub>K</sub> = '+detectorCoinc[input-1][intensity2-1]);}
else{$('#Stage_detector1Count').html('N<sub>1</sub> = '+detector1[input-1][0]);$('#Stage_detector2Count').html('N<sub>2</sub> = '+detector2[input-1][0]);$('#Stage_coincCount').html('N<sub>K</sub> = '+detectorCoinc[input-1][0]);}
if(detectorColor==2){AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_greenFlash2').play(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_greenFlashGap').play(0);}
else if(detectorColor==1){AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_blueFlash2').play(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_blueFlashGap').play(0);}
else if(detectorColor==3){AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_greenFlash2').play(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_greenFlashGap').play(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_blueFlash2').play(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_blueFlashGap').play(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_bigGreenFlash').play(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_greenFlashGap2').play(0);}}}
function detectorsWF(){if(input!=1&&input!=6){$('#Stage_detector1Count').html('N<sub>1</sub> = '+detector1[input-1][intensity2-1]);$('#Stage_detector2Count').html('N<sub>2</sub> = '+detector2[input-1][intensity2-1]);$('#Stage_coincCount').html('N<sub>K</sub> = '+detectorCoinc[input-1][intensity2-1]);}
else{$('#Stage_detector1Count').html('N<sub>1</sub> = '+detector1[input-1][0]);$('#Stage_detector2Count').html('N<sub>2</sub> = '+detector2[input-1][0]);$('#Stage_coincCount').html('N<sub>K</sub> = '+detectorCoinc[input-1][0]);}}
function fastForward(){switch(input){case 1:for(i=0;i<100;i++){particle=Math.round(Math.random());if(particle==1){detector1[input-1][0]++;detectorColor=1;}
if(particle==0){detector2[input-1][0]++;detectorColor=2;}
if(i==99){detectors();}}
break;case 6:for(i=0;i<100;i++){particle=Math.round(Math.random());if(particle==1){detector1[input-1][0]++;detectorColor=1;}
if(particle==0){detector2[input-1][0]++;detectorColor=2;}
if(i==99){detectors();}}
break;case 2:for(i=0;i<100;i++){particle=Math.random();particle2=Math.random();if(particle<intensity){detector1[1][intensity2-1]++;a=true;detectorColor=1;}else{a=false;}
if(particle2<1-intensity){detector2[1][intensity2-1]++;b=true;detectorColor=2;}else{a=false;}
if(a&&b){detectorCoinc[1][intensity2-1]++;detectorColor=3;}
if(i==99){detectors();}}
break;case 3:for(i=0;i<100;i++){particle=Math.random();if(particle<probability){a=1;detector1[2][intensity2-1]++;detectorColor=1;}
else{a=0;detector2[2][intensity2-1]++;detectorColor=2;}
if(i==99){detectors();}}
break;case 4:for(i=0;i<100;i++){particle=Math.random();particle2=Math.random();if(particle<intensity){detector1[input-1][intensity2-1]++;a=true;detectorColor=1;}else{a=false;}
if(particle2<1-intensity){detector2[input-1][intensity2-1]++;b=true;detectorColor=2;}else{a=false;}
if(a&&b){detectorCoinc[input-1][intensity2-1]++;detectorColor=3;}
if(i==99){detectors();}}
break;case 5:for(i=0;i<100;i++){particle=Math.random();if(particle<probability){a=1;detector1[input-1][intensity2-1]++;detectorColor=1;}
else{a=0;detector2[input-1][intensity2-1]++;detectorColor=2;}
if(i==99){detectors();}}
break;}}
function insertBeamSplitter2(){beamSplitter2=1;$('#Stage_button_labelCopy6').text('Strahlteiler 2 entfernen');$('#Stage_beamsplitter').show();if($('#Stage_labelElements').hasClass('selected')){$('#Stage_textBS2').show();$('#Stage_textPS').show();}}
function removeBeamSplitter2(){beamSplitter2=0;$('#Stage_button_labelCopy6').html('Strahlteiler 2 einf&uuml;gen');$('#Stage_beamsplitter').hide();$('#Stage_textBS2').hide();$('#Stage_textPS').hide();}
function showAllLabels(){$('#Stage_textPS').show();$('#Stage_textBS2').show();$('#Stage_textBS1').show();$('#Stage_textM2').show();$('#Stage_textM1').show();$('#Stage_textD2').show();$('#Stage_textD1').show();$('#Stage_Text8').show();}
function hideAllLabels(){$('#Stage_textPS').hide();$('#Stage_textBS2').hide();$('#Stage_textBS1').hide();$('#Stage_textM2').hide();$('#Stage_textM1').hide();$('#Stage_textD2').hide();$('#Stage_textD1').hide();$('#Stage_Text8').hide();}
function singlePhoton2(){sym_disable($('#Stage_fireButton'));if(streaming==0)sym_disable($('#Stage_continuousButton'));if(beamSplitter2==0){probability=0.5}
if(beamSplitter2==1){probability=0.5-0.5*Math.cos(theta);debug(probability);}
particle=Math.random();$('#Stage_singlePhotons').show();AdobeEdge.getComposition(compId).getStage().getSymbol('singlePhotons').play(0);if(streaming==0){setTimeout(function(){sym_enable($('#Stage_fireButton'));sym_enable($('#Stage_continuousButton'));},4000);}
else{sym_enable($('#Stage_continuousButton'));}}
function showProbabilityBox(){if($('#Stage_showProb').hasClass('selected')){$('#Stage_probabilityDetector1Box').show();$('#Stage_probabilityDetector2Box').show();}
else{$('#Stage_probabilityDetector1Box').hide();$('#Stage_probabilityDetector2Box').hide();}}
function displayProbability(){switch(input){case 1:$('#Stage_probabilityDetector1Text').html('Wahrschein-<br>lichkeit '+50+'%');$('#Stage_probabilityDetector2Text').html('Wahrschein-<br>lichkeit '+50+'%');break;case 6:$('#Stage_probabilityDetector1Text').html('Wahrschein-<br>lichkeit '+50+'%');$('#Stage_probabilityDetector2Text').html('Wahrschein-<br>lichkeit '+50+'%');break;case 2:if(beamSplitter2==1){$('#Stage_probabilityDetector1Text').html('Intensit&auml;t <br>'+(intensity*100).toFixed(0)+'%');$('#Stage_probabilityDetector2Text').html('Intensit&auml;t <br>'+((1-intensity)*100).toFixed(0)+'%');}
else{$('#Stage_probabilityDetector1Text').html('Intensit&auml;t <br>'+50+'%');$('#Stage_probabilityDetector2Text').html('Intensit&auml;t <br>'+50+'%');}
break;case 3:if(beamSplitter2==0){$('#Stage_probabilityDetector1Text').html('Wahrschein-<br>lichkeit '+50+'%');$('#Stage_probabilityDetector2Text').html('Wahrschein-<br>lichkeit '+50+'%');}
else{$('#Stage_probabilityDetector1Text').html('Wahrschein-<br>lichkeit '+(probability*100).toFixed(0)+'%');$('#Stage_probabilityDetector2Text').html('Wahrschein-<br>lichkeit '+((1-probability)*100).toFixed(0)+'%');}
break;case 4:if(beamSplitter2==1){$('#Stage_probabilityDetector1Text').html('Intensit&auml;t <br>'+(intensity*100).toFixed(0)+'%');$('#Stage_probabilityDetector2Text').html('Intensit&auml;t <br>'+((1-intensity)*100).toFixed(0)+'%');}
else{$('#Stage_probabilityDetector1Text').html('Intensit&auml;t <br>'+50+'%');$('#Stage_probabilityDetector2Text').html('Intensit&auml;t <br>'+50+'%');}
break;case 5:if(beamSplitter2==0){$('#Stage_probabilityDetector1Text').html('Wahrschein-<br>lichkeit '+50+'%');$('#Stage_probabilityDetector2Text').html('Wahrschein-<br>lichkeit '+50+'%');}
else{$('#Stage_probabilityDetector1Text').html('Wahrschein-<br>lichkeit '+(probability*100).toFixed(0)+'%');$('#Stage_probabilityDetector2Text').html('Wahrschein-<br>lichkeit '+((1-probability)*100).toFixed(0)+'%');}
break;}}
function debug(value){$('#Stage_debug').text(value);}
function step_functions(step){clearTimeout(AdobeEdge.step_animation);$('#Stage_introductionRadio').hide();$('#Stage_controlsRadio').hide();if(counterStep!=0){previous=new State('previous');}
counterStep=0;sym_disable($('#Stage_radioClassicalParticles'));sym_disable($('#Stage_radioElectromagneticWave'));sym_disable($('#Stage_radioSinglePhotons'));switch(step){case 1:input=1;beamSplitter2=0;AdobeEdge.getComposition(compId).getStage().getSymbol('mirrors').stop(0);sym_select($('#Stage_radioClassicalParticles'));stopEMWave();stopPhotons();clearMeasurements();continuousFire();displayProbability();$('#Stage_phaseShifterLabelBox').hide();$('#Stage_beamsplitterLabelBox').hide();break;case 2:input=2;intensity=0.5;sym_select($('#Stage_radioElectromagneticWave'));AdobeEdge.getComposition(compId).getStage().getSymbol('mirrors').stop('mirrors2');stopPhotons();stopParticles();clearMeasurements();continuousFire();displayProbability();$('#Stage_phaseShifterLabelBox').hide();$('#Stage_beamsplitterLabelBox').hide();break;case 3:input=3;sym_select($('#Stage_radioSinglePhotons'));AdobeEdge.getComposition(compId).getStage().getSymbol('mirrors').stop(0);stopEMWave();stopParticles();clearMeasurements();continuousFire();displayProbability();$('#Stage_body31').hide();$('#Stage_phaseShifterLabelBox').hide();$('#Stage_beamsplitterLabelBox').hide();break;case 4:beamSplitter2=1;stopEMWave();theta=0*Math.PI;probability=0.5-0.5*Math.cos(theta);intensity=0.5-0.5*Math.cos(theta);intensity2=0+1;input=2;sym_select($('#Stage_radioElectromagneticWave'));AdobeEdge.getComposition(compId).getStage().getSymbol('mirrors').stop('mirrors2');stopPhotons();stopParticles();clearMeasurements();continuousFire();displayProbability();insertBeamSplitter2();$('#Stage_body31').hide();$('#Stage_phaseShifterLabelBox').hide();$('#Stage_beamsplitterLabelBox').hide();break;case 5:theta=0.5*Math.PI;probability=0.5-0.5*Math.cos(theta);intensity=0.5-0.5*Math.cos(theta);intensity2=5+1;$('#Stage_body31').css('width',Math.round((theta/Math.PI)*20)+'px');$('#Stage_body31').show();$('#Stage_phaseShifterLabelBox').show();$('#Stage_beamsplitterLabelBox').show();input=2;sym_select($('#Stage_radioElectromagneticWave'));AdobeEdge.getComposition(compId).getStage().getSymbol('mirrors').stop('mirrors2');stopPhotons();stopParticles();clearMeasurements();continuousFire();displayProbability();insertBeamSplitter2();break;}}
function clearMeasurements(){detector1[input-1][intensity2-1]=0;detector2[input-1][intensity2-1]=0;detectorCoinc[input-1][intensity2-1]=0;detectorsWF();}
function showInputClassicalParticles(){if(beamSplitter2==0){input=1;}
else{input=6;}
detectorsWF();$('#Stage_body31').hide();$('#Stage_showProbLabel').html('Asymptotische <br>Wahrscheinlichkeiten');displayProbability();AdobeEdge.getComposition(compId).getStage().getSymbol('mirrors').stop(0);$('#Stage_phaseShiftBox').hide();sym_enable($('#Stage_fireButton'));stopEMWave();stopPhotons();$('#Stage_checkbox_labelCopy').html('Asymptotische Wahrscheinlichkeiten');}
function showInputElectromagneticWave(){if(beamSplitter2==0){input=2;}
else{input=4;}
detectorsWF();displayProbability();$('#Stage_phaseShiftBox').show();$('#Stage_showProbLabel').html('Asymptotische Intensit&auml;ten <br> (Eingangsintensit&auml;t ist 100%)');AdobeEdge.getComposition(compId).getStage().getSymbol('mirrors').stop('mirrors2');if(beamSplitter2==0){$('#Stage_phaseShiftBox').hide();$('#Stage_phaseShiftBox').css('background-color','#dfdfdf');sym_disable($('#Stage_slider'));}
else{$('#Stage_body31').show();}
stopParticles();stopPhotons();sym_disable($('#Stage_fireButton'));$('#Stage_checkbox_labelCopy').html('Asymptotische Intensit&auml;ten <br> (Eingangsintensit&auml;t ist 100%)');}
function showInputSinglePhotons(){if(beamSplitter2==0){input=3;}
else{input=5;}
detectorsWF();displayProbability();sym_enable($('#Stage_fireButton'));$('#Stage_phaseShiftBox').show();$('#Stage_showProbLabel').html('Asymptotische <br>Wahrscheinlichkeiten');AdobeEdge.getComposition(compId).getStage().getSymbol('mirrors').stop(0);stopEMWave();stopParticles();if(beamSplitter2==0){$('#Stage_phaseShiftBox').hide();$('#Stage_phaseShiftBox').css('background-color','#dfdfdf');sym_disable($('#Stage_slider'));$('#Stage_checkbox_labelCopy').html('Asymptotische Wahrscheinlichkeiten');}
else{$('#Stage_body31').show();}}
function setOpacity(){opacityPhoton1=0.5+0.5*Math.cos(theta);opacityPhoton2=0.5-0.5*Math.cos(theta);debug(opacityPhoton1+' '+opacityPhoton2);if(opacityPhoton1<=0.025&&opacityPhoton1>=0.01){opacityPhoton1=0.1;opacityPhoton2=0.9;}
if(opacityPhoton2<=0.025&&opacityPhoton2>=0.01){opacityPhoton2=0.1;opacityPhoton1=0.9;}}
function stopEMWave(){AdobeEdge.getComposition(compId).getStage().getSymbol('EMwave2').stop(0);AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOp13_NoPhase_0_",0);$('#PlotIOp13_NoPhase_0_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_0_",0);$('#PlotIOP13_0_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_1_",0);$('#PlotIOP13_1_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_2_",0);$('#PlotIOP13_2_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_3_",0);$('#PlotIOP13_3_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_4_",0);$('#PlotIOP13_4_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_5_",0);$('#PlotIOP13_5_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_6_",0);$('#PlotIOP13_6_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_7_",0)
$('#PlotIOP13_7_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_8_",0);$('#PlotIOP13_8_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_9_",0);$('#PlotIOP13_9_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_10_",0);$('#PlotIOP13_10_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_11_",0);$('#PlotIOP13_11_0').hide();}
function clearEMWave(){AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOp13_NoPhase_0_",0);$('#PlotIOp13_NoPhase_0_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_0_",0);$('#PlotIOP13_0_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_1_",0);$('#PlotIOP13_1_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_2_",0);$('#PlotIOP13_2_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_3_",0);$('#PlotIOP13_3_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_4_",0);$('#PlotIOP13_4_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_5_",0);$('#PlotIOP13_5_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_6_",0);$('#PlotIOP13_6_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_7_",0)
$('#PlotIOP13_7_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_8_",0);$('#PlotIOP13_8_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_9_",0);$('#PlotIOP13_9_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_10_",0);$('#PlotIOP13_10_0').hide();AdobeEdge.getComposition(compId).getStage().displayGraph("#PlotIOP13_11_",0);$('#PlotIOP13_11_0').hide();}
function stopPhotons(){AdobeEdge.getComposition(compId).getStage().getSymbol('singlePhotons').stop(0);$('#Stage_singlePhotons').hide();}
function stopParticles(){AdobeEdge.getComposition(compId).getStage().getSymbol('singlePhoton').stop(0);$('#Stage_singlePhoton').hide();}
function clearDetectors(){AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_greenFlash2').stop(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_greenFlashGap').stop(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_blueFlash2').stop(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_blueFlashGap').stop(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_bigGreenFlash').stop(0);AdobeEdge.getComposition(compId).getStage().getSymbol('#Stage_greenFlashGap2').stop(0);}
function sym_features(){$('#Stage').css({'-webkit-user-select':'none','-moz-user-select':'none','-ms-user-select':'none','user-select':'none'});if(sym_ie()==9){makeUnselectable($('#Stage')[0]);function makeUnselectable(node){if(node.nodeType==1)node.setAttribute("unselectable","on");var child=node.firstChild;while(child){makeUnselectable(child);child=child.nextSibling;}}}
if(!$('#Stage').data('link_areas')){$('#Stage').data('link_areas',true);$('#Stage_links').children().each(function(){$(this).append('<div id="'+$(this).attr('id')+'_area"></div>');$('#'+$(this).attr('id')+'_area').css({'background':'black','opacity':'0','position':'absolute','width':'100%','height':'100%','left':'0px','top':'0px'});});}
$('#Stage').find('.button > div, .checkbox .tickbox, .radio .tickbox, .radio .tickbox div').css({'border-top-color':'#B5B8BA','border-right-color':'#898E91','border-bottom-color':'#5A6165','border-left-color':'#898E91'});$('#Stage .slider').not('.vertical').children().children().css({'width':'100%','border-top-color':'#575E62','border-right-color':'#8C9295','border-bottom-color':'#AEB2B4','border-left-color':'#8C9295'});$('#Stage .slider.vertical').children().children().css({'height':'100%','border-top-color':'#8C9295','border-right-color':'#575E62','border-bottom-color':'#8C9295','border-left-color':'#AEB2B4'});var is_chrome=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;if(is_chrome){$('#Stage .slider').each(function(){var webkit_origin=$(this).find('.handle')[0].style.webkitTransformOrigin;$(this).find('.handle')[0].style.transformOrigin=webkit_origin;});}
$(function(){FastClick.attach(document.body);});yepnope({load:"normalize.css"});if(sym_ie()==9){$('#Stage').find('.button > div, .checkbox .tickbox, .radio .tickbox').css({'background':'url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlYmViZWIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)'});$('#Stage .radio .tickbox div').css({'background':'url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMwMDJkMDAiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjYmZmZmJmIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)'});}
$('#Stage').find('*').each(function(){if($(this).css('-webkit-transform')!=''&&$(this).css('-webkit-transform')!='none')
$(this).css('-webkit-transform',$(this).css('-webkit-transform'));});$('#Stage').find('.button, .checkbox, .radio, .slider, .movable').each(function(){if(!$(this).hasClass('disabled'))sym_enable(this)});$('#Stage .disabled').each(function(){sym_disable(this)});$('#Stage').find('.checkbox, .radio').each(function(){if(!$(this).hasClass('selected'))sym_deselect(this)});$('#Stage .selected').each(function(){sym_select(this)});$('#Stage .slider').each(function(){if(!$(this).attr('class').match(/min_(\d+)/))var min=0;else var min=$(this).attr('class').match(/min_(\d+)/)[1]*1;if(!$(this).attr('class').match(/max_\d+/))var max=100;else var max=$(this).attr('class').match(/max_(\d+)/)[1]*1;if(!$(this).attr('class').match(/snap_\d+/))var snap=1;else var snap=$(this).attr('class').match(/snap_(\d+)/)[1]*1;if(!$(this).attr('class').match(/val_\d+/))var val=min;else var val=$(this).attr('class').match(/val_(\d+)/)[1]*1;$(this).data('min',min);$(this).data('max',max);$(this).data('snap',snap);$(this).data('default',val);sym_val(this,$(this).data('val')===undefined?val:$(this).data('val'));});if(!$('#Stage').data('slider_events')){$('#Stage').data('slider_events',true);$(document).on('mousedown mousemove touchstart touchmove',function(e){var slider=$('#Stage .slider.active');if(slider.length){e.preventDefault();var min=slider.data('min');var max=slider.data('max');var snap=slider.data('snap');var range,pos;var scale=$('#Stage').attr('style').match(/scale *\(([0-9\.]+)\)/)[1]*1;if(slider.hasClass('vertical')){range=slider.children().height();pos=-slider.children().offset().top;if(e.type=='mousedown'||e.type=='mousemove')pos+=e.pageY;else pos+=e.originalEvent.touches[0].pageY;}else{range=slider.children().width();pos=-slider.children().offset().left;if(e.type=='mousedown'||e.type=='mousemove')pos+=e.pageX;else pos+=e.originalEvent.touches[0].pageX;}
pos=Math.min(Math.max(pos,0),range*scale)/scale;var snap_steps=(max-min)/snap;var snap_interval=range/snap_steps;pos=Math.round(pos/snap_interval)*snap_interval;slider.find('.handle').css(slider.hasClass('vertical')?'top':'left',pos+'px');stopEMWave();detectors();clearDetectors();clearInterval(interval);AdobeEdge.getComposition(compId).getStage().getSymbol('singlePhotons').stop(0);$('#Stage_singlePhotons').hide();streaming2=streaming;stopStream();streaming=streaming2;debug(streaming);var val=Math.round(min+pos/range*(max-min));slider.data('val',val);}});$(document).on('mouseup touchend',function(e){$('#Stage_slider').on('mouseup touchend',function(){if((input==4||input==2)&&streaming==1){AdobeEdge.getComposition(compId).getStage().getSymbol('EMwave2').play(0);}
if((input==3||input==5)&&streaming==1){continuousFire();}})
$('#Stage .slider.active').removeClass('active');});}
$('#Stage .movable').each(function(){if(!$(this).attr('class').match(/minX_(\d+)/))var minX=1;else var minX=$(this).attr('class').match(/minX_(\d+)/)[1]*1;if(!$(this).attr('class').match(/maxX_\d+/))var maxX=899;else var maxX=$(this).attr('class').match(/maxX_(\d+)/)[1]*1;if(!$(this).attr('class').match(/minY_\d+/))var minY=41;else var minY=$(this).attr('class').match(/minY_(\d+)/)[1]*1;if(!$(this).attr('class').match(/maxY_\d+/))var maxY=589;else var maxY=$(this).attr('class').match(/maxY_(\d+)/)[1]*1;$(this).data('minX',minX);$(this).data('maxX',maxX);$(this).data('minY',minY);$(this).data('maxY',maxY);});if(!$('#Stage').data('movable_events')){$('#Stage').data('movable_events',true);$(document).on('mousedown mousemove touchstart touchmove',function(e){var movable=$('#Stage .movable.active');if(movable.hasClass('movable')){if(movable.data('minX')>=0||movable.data('minX')<0){e.preventDefault();var tempX=0;var tempY=0;if(e.type=='mousedown'||e.type=='mousemove'){if(!e.pageX){tempX=e.clientX+document.body.scrollLeft;tempY=e.clientY+document.body.scrollTop;}else{tempX=e.pageX;tempY=e.pageY;}}else{tempX=e.originalEvent.touches[0].pageX;tempY=e.originalEvent.touches[0].pageY;}
if(e.type=='mousedown'||e.type=='touchstart'){movable.data('x0',tempX);movable.data('y0',tempY);movable.data('xStart',parseInt(movable.css('left')));movable.data('yStart',parseInt(movable.css('top')));}
var scale=$('#Stage').attr('style').match(/scale *\(([0-9\.]+)\)/)[1]*1;var newX=movable.data('xStart')+(tempX-movable.data('x0'))/scale;var newY=movable.data('yStart')+(tempY-movable.data('y0'))/scale;newX=Math.min(Math.max(newX,movable.data('minX')),movable.data('maxX')-movable.width());newY=Math.min(Math.max(newY,movable.data('minY')),movable.data('maxY')-movable.height());movable.css('left',Math.round(newX));movable.css('top',Math.round(newY));movable.data('xPos',Math.round(newX));movable.data('yPos',Math.round(newY));}}});$(document).on('mouseup touchend',function(e){$('#Stage .movable.active').addClass('unActive');$('#Stage .movable.active').removeClass('active');});}
if(!$('#Stage').data('step_events')){$('#Stage').data('step_events',true);$('#Stage_steps').children().find('*').each(function(){if($(this).attr('id')&&$(this).attr('id').match(/_highlight_circle$/))
$(this).css({'outline':'transparent solid 1px'});});$('#Stage_steps_step_buttons').children().each(function(){$(this).append('<div id="'+$(this).attr('id')+'_area"></div>');$('#'+$(this).attr('id')+'_area').css({'background':'black','opacity':'0','position':'absolute','width':'100%','height':'100%','left':'0px','top':'0px'});});var i=1;while(i){if(!$('#Stage_steps_step'+i).length)break;$('#Stage_steps_step'+i).click(function(){sym_step(this.id.match(/\d+/)*1)});i++;}
$('#Stage').data('step_count',i-1);}}
function sym_enable(element){$(element).removeClass('disabled');$(element).css({'opacity':''});$('#'+$(element).attr('id')+'_mask').remove();if($(element).data('css_events'))return;$(element).data('css_events',true);$(element).append('<div id="'+$(element).attr('id')+'_area"></div>');$('#'+$(element).attr('id')+'_area').css({'background':'black','opacity':'0','position':'absolute','width':'100%','height':'100%','left':'0px','top':'0px'});if($(element).hasClass('button')){$(element).on('mouseover touchstart',function(){$(this).children().first().css({'border-top-color':'#009CFE','border-right-color':'#0089DF','border-bottom-color':'#0076C1','border-left-color':'#0089DF'});});$(element).on('mousedown touchstart',function(){$(this).children().first().attr('style',$(this).children().first().attr('style')
+'background:-moz-linear-gradient(top, #e1f3fe 0%, #9cd8fd 100%);'
+'background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#e1f3fe), color-stop(100%,#9cd8fd));'
+'background:-webkit-linear-gradient(top, #e1f3fe 0%,#9cd8fd 100%);'
+'background:-o-linear-gradient(top, #e1f3fe 0%,#9cd8fd 100%);'
+'background:-ms-linear-gradient(top, #e1f3fe 0%,#9cd8fd 100%);'
+'background:linear-gradient(to bottom, #e1f3fe 0%,#9cd8fd 100%);');if(sym_ie()==9)$(this).children().first().css({'background':'url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2UxZjNmZSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM5Y2Q4ZmQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)'});});$(element).on('mouseout touchend',function(){$(this).children().first().css({'border-top-color':'#B5B8BA','border-right-color':'#898E91','border-bottom-color':'#5A6165','border-left-color':'#898E91'});});$(element).on('mouseout mouseup touchend',function(){$(this).children().first().attr('style',$(this).children().first().attr('style')
+'background:-moz-linear-gradient(top, #fdfdfd 0%, #ebebeb 100%);'
+'background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#ebebeb));'
+'background:-webkit-linear-gradient(top, #fdfdfd 0%,#ebebeb 100%);'
+'background:-o-linear-gradient(top, #fdfdfd 0%,#ebebeb 100%);'
+'background:-ms-linear-gradient(top, #fdfdfd 0%,#ebebeb 100%);'
+'background:linear-gradient(to bottom, #fdfdfd 0%,#ebebeb 100%);');if(sym_ie()==9)$(this).children().first().css({'background':'url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlYmViZWIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)'});});}
else if($(element).hasClass('checkbox')||$(element).hasClass('radio')){$('#'+$(element).attr('id')+'_area').on('click',function(){if($(this).parent().hasClass('selected')){if($(this).parent().hasClass('radio'))return;sym_deselect($(this).parent());}
else{sym_select($(this).parent());}});$(element).on('mouseover touchstart',function(){$(this).find('.tickbox').css({'border-top-color':'#009CFE','border-right-color':'#0089DF','border-bottom-color':'#0076C1','border-left-color':'#0089DF'});});$(element).on('mousedown touchstart',function(){$(this).find('.tickbox').attr('style',$(this).find('.tickbox').attr('style')
+'background:-moz-linear-gradient(top, #e1f3fe 0%, #9cd8fd 100%);'
+'background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#e1f3fe), color-stop(100%,#9cd8fd));'
+'background:-webkit-linear-gradient(top, #e1f3fe 0%,#9cd8fd 100%);'
+'background:-o-linear-gradient(top, #e1f3fe 0%,#9cd8fd 100%);'
+'background:-ms-linear-gradient(top, #e1f3fe 0%,#9cd8fd 100%);'
+'background:linear-gradient(to bottom, #e1f3fe 0%,#9cd8fd 100%);');if(sym_ie()==9)$(this).find('.tickbox').css({'background':'url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2UxZjNmZSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM5Y2Q4ZmQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)'});});$(element).on('mouseout touchend',function(){$(this).find('.tickbox').css({'border-top-color':'#B5B8BA','border-right-color':'#898E91','border-bottom-color':'#5A6165','border-left-color':'#898E91'});});$(element).on('mouseout mouseup touchend',function(){$(this).find('.tickbox').attr('style',$(this).find('.tickbox').attr('style')
+'background:-moz-linear-gradient(top, #fdfdfd 0%, #ebebeb 100%);'
+'background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#ebebeb));'
+'background:-webkit-linear-gradient(top, #fdfdfd 0%,#ebebeb 100%);'
+'background:-o-linear-gradient(top, #fdfdfd 0%,#ebebeb 100%);'
+'background:-ms-linear-gradient(top, #fdfdfd 0%,#ebebeb 100%);'
+'background:linear-gradient(to bottom, #fdfdfd 0%,#ebebeb 100%);');if(sym_ie()==9)$(this).find('.tickbox').css({'background':'url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlYmViZWIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)'});});if($(element).hasClass('radio')){$(element).on('mouseover touchstart',function(){$(this).find('.tickbox div').css({'opacity':'0.8','border-top-color':'#009CFE','border-right-color':'#0089DF','border-bottom-color':'#0076C1','border-left-color':'#0089DF'});});$(element).on('mouseout touchend',function(){$(this).find('.tickbox div').css({'opacity':'','border-top-color':'#B5B8BA','border-right-color':'#898E91','border-bottom-color':'#5A6165','border-left-color':'#898E91'});});}}
else if($(element).hasClass('slider')){$(element).on('mouseover mouseup',function(){$(this).find('.handle').css({'background-position':'0% 50%'});});$(element).on('mousedown touchstart',function(){$(this).find('.handle').css({'background-position':'0% 100%'});$(this).addClass('active');});$(element).on('mouseout touchend',function(){$(this).find('.handle').css({'background-position':'0% 0%'});});}
else if($(element).hasClass('movable')){$(element).css('cursor','pointer');$(element).on('mouseover mouseup',function(){});$(element).on('mousedown touchstart',function(){$(this).addClass('active');});$(element).on('mouseout touchend',function(){});}}
function sym_disable(element){if(!$(element).hasClass('disabled')){$(element).addClass('disabled');if(!$(element).hasClass('movable'))
$(element).css({'opacity':'0.4'});$('#'+$(element).attr('id')+'_mask').show();$(element).after('<div id="'+$(element).attr('id')+'_mask"></div>');$('#'+$(element).attr('id')+'_mask').css({'background':'black','opacity':'0','position':$(element).css('position'),'width':$(element).css('width'),'height':$(element).css('height'),'left':$(element)[0].style.left,'top':$(element)[0].style.top,'right':$(element)[0].style.right,'bottom':$(element)[0].style.bottom});}}
function sym_select(element){$(element).addClass('selected');$(element).find('.tickbox div').show();if($(element).hasClass('radio')){$(element).data('selecting',true);var group=$(element).attr('class').match(/group_[^ ]+/)[0];$('#Stage .'+group).each(function(){if($(this).data('selecting'))$(this).data('selecting',false);else sym_deselect(this);});}}
function sym_deselect(element){$(element).removeClass('selected');$(element).find('.tickbox div').hide();}
function sym_val(element,val){var min=$(element).data('min');var max=$(element).data('max');var range=$(element).hasClass('vertical')?$(element).children().height():$(element).children().width();var pos=(val-min)/(max-min)*range;$(element).find('.handle').css($(element).hasClass('vertical')?'top':'left',pos+'px');$(element).data('val',val);$(element).data('timeout_val',val);}
function sym_step(step){$('#Stage').data('step',step);var sym=AdobeEdge.getComposition(compId).getSymbols('steps')[0];sym.stop(step+'');sym.$('step_buttons').children().children().css({'border-color':'#999999'});sym.$('step'+step).children().css({'border-color':'#1F7258'});sym.$('step_buttons').children().children().children().css({'color':'#999999'});sym.$('step'+step).children().children().css({'color':'#1F7258'});step_functions(step);}
function sym_ie(){var version=false;if(navigator.appVersion.indexOf("MSIE")!=-1)
version=parseFloat(navigator.appVersion.split("MSIE")[1]);return version;}

//Edge symbol: 'stage'
(function(symbolName){Symbol.bindElementAction(compId,symbolName,"document","compositionReady",function(sym,e){sym_features();preloadImages()
sym.$('.disabled').each(function(){$(this).removeClass('disabled');sym_disable(this);});yepnope({load:"normalize.css"});sym.$('textIntroduction').html("<b>Bewege die Maus &uuml;ber oder klicke auf die einzelnen Komponenten des Aufbaus um mehr &uuml;ber sie zu erfahren.</b> <br><br> Klicke danach auf <b>Steuerung</b> um die Art der Eingangsteilchen zu w&auml;hlen, einen zweiten Strahlteiler oder einen Phasenschieber einzubauen, und die Teilchen durch den Aufbau zu schicken.")
sym.$('textBeamSplitter1').html("Der <b>Strahlteiler</b> besteht aus einer versilberten Glasplatte die man auch Halbspiegel nennt. Der Strahlteiler versetzt ein einzelnes Photon bis zur Detektion in einen Superpositionszustand, in dem man ihm nicht eindeutig einer der beiden m&ouml;glichen Wege zuordnen kann. Das Photon in diesem Superpositionszustand wird transparent dargestellt. Beachte dass die Energie des Photons im Superpositionszustand nicht in zwei H&auml;lften geteilt wird. F&uuml;r klassische Teilchen ist der Strahlteiler eine Platte mit zuf&auml;llig positionierten L&ouml;chern, so dass im Mittel die H&auml;lfte der Teilchen passieren und die andere H&auml;lfte reflektiert wird. ");sym.$('textPhaseShifter').html("Ein <b>Phasenschieber</b> ist eine transparente Glasplatte in der die Lichtgeschwindigkeit geringer ist als in Luft. Wenn der Phasenschieber bei einzelnen Photonen und elektromagnetischen Wellen in einen der Strahleng&auml;nge gesetzt wird, nimmt die Zeit f&uuml;r das Durchlaufen dieses Strahlengangs zu. Dies f&uuml;hrt zu einer relativen Phasendifferenz der beiden Strahleng&auml;nge. Du kannst die Dicke der Platte und somit die Phasendifferenz einstellen. ");sym.$('textMirror1').html("Zwei <b>Spiegel</b> reflektieren die Strahlen zu den Detektoren.");sym.$('textMirror2').html("Zwei <b>Spiegel</b> reflektieren die Strahlen zu den Detektoren.");sym.$('textCoinc_count').html("Der <b>Koinzidenz-Z&auml;hler</b> schl&auml;gt aus wenn beide Detektoren etwa gleichzeitig klicken. ");sym.$('textBeamSplitter2').html("Klassische Teilchen werden am <b>zweiten Strahlteiler</b> entweder reflektiert oder transmittiert. Bei einzelnen Photonen und elektromagnetischen Wellen f&uuml;hrt der zweite Strahlteiler zur Interferenz zwischen den beiden Strahlen. ");sym.$('detector1Count').html('N<sub>1</sub> = '+detector1[0][0]);sym.$('detector2Count').html('N<sub>2</sub> = '+detector2[0][0]);sym.$('coincCount').html('N<sub>K</sub> = '+detector2[0][0]);sym.$('slider_label1').html('&pi;/2');sym.$('slider_label3').html('&pi;');sym.$('textDetector1').html('Die <b>Detektoren</b> registrieren, wenn sie ein Photon oder Teilchen erreicht und in ein elektrisches Signal umgewandelt wird. F&uuml;r elektromagnetische Wellen schl&auml;gt der Detektor zu zuf&auml;lligen Zeiten aus, solange die Welle auf den Detektor trifft. ');sym.$('textDetector2').html('Die <b>Detektoren</b> registrieren, wenn sie ein Photon oder Teilchen erreicht und in ein elektrisches Signal umgewandelt wird. F&uuml;r elektromagnetische Wellen schl&auml;gt der Detektor zu zuf&auml;lligen Zeiten aus, solange die Welle auf den Detektor trifft. ');sym.$('textInput').html('Als <b>Eingang</b> kannst Du klassische Teilchen, elektromagnetische Wellen oder einzelne Photonen (Quantenteilchen) w&auml;hlen.');sym.$('radio_label').html('Steuerung');sym.$('radio_label2').html('Einf&uuml;hrung');sym.$('textBS1').html('Strahl-<br>teiler 1');sym.$('textBS2').html('Strahl-<br>teiler 2');sym.$('textPS').html('Phasen-<br>schieber');sym.$('button_labelCopy4').html('Kontinuierlich');sym.$('button_labelCopy6').html('Strahlteiler 2 einf&uuml;gen');sym.$('button_label').html('Messungen zur&uuml;cksetzen');sym.$('Text').html('Koinzidenz-<br>Z&auml;hler');sym.initializeGraph=function(graphTitle,x,y){for(var i=0;i<59;i++){var el=sym.createChildSymbol("EMWave",'EMRectangle');el.element.attr("id",graphTitle+i);sym.$("#"+graphTitle+i).css({'top':y,'left':x,'position':'absolute'});sym.getSymbol("#"+graphTitle+i).$('image').css({'background-image':'url("images/'+graphTitle+i+'.png")'});sym.$("#"+graphTitle+i).hide();}}
sym.hideGraph=function(graphTitle){for(var j=0;j<59;j++){sym.$(graphTitle+j).hide();}}
sym.displayGraph=function(graphTitle,value){sym.hideGraph(graphTitle);sym.$(graphTitle+value).show();}
sym.initializeGraph("PlotIOp13_NoPhase_0_",0,0);sym.initializeGraph("PlotIOP13_0_",0,0);sym.initializeGraph("PlotIOP13_1_",0,0);sym.initializeGraph("PlotIOP13_2_",0,0);sym.initializeGraph("PlotIOP13_3_",0,0);sym.initializeGraph("PlotIOP13_4_",0,0);sym.initializeGraph("PlotIOP13_5_",0,0);sym.initializeGraph("PlotIOP13_6_",0,0);sym.initializeGraph("PlotIOP13_7_",0,0);sym.initializeGraph("PlotIOP13_8_",0,0);sym.initializeGraph("PlotIOP13_9_",0,0);sym.initializeGraph("PlotIOP13_10_",0,0);sym.initializeGraph("PlotIOP13_11_",0,0);$(document).on('mousedown mousemove touchstart touchmove',function(e){var slider=sym.$('slider');if(slider.hasClass('active')&&!slider.data('timeout')){slider.data('timeout',setTimeout(function(){slider.data('timeout',false);if(slider.data('timeout_val')===slider.data('val'))return;slider.data('timeout_val',slider.data('val'));theta=(slider.data('val')/180)*Math.PI;probability=0.5-0.5*Math.cos(theta);intensity=0.5-0.5*Math.cos(theta);intensity2=slider.data('val')/18+1;debug(intensity2);sym.$('body31').css('width',Math.round((theta/Math.PI)*20)+'px');displayProbability();},20));}});var text_ids=['phaseShifter','mirror1','mirror2','beamSplitter1','beamSplitter2','coinc_count','detector1','detector2','input'];for(var t in text_ids){$('#Stage_setup_'+text_ids[t]).click(popup_event);$('#Stage_setup_'+text_ids[t]).mouseover(popup_event);$('#Stage_setup_'+text_ids[t]).mouseout(popup_event);}
function popup_event(e){var text_id=e.currentTarget.id.replace('setup_','text_');if(!$('#'+text_id).length)text_id=text_id.replace(/[12]$/,'s');var fixed_id=$('.fixed_text').attr('id');if(e.type=='click'){$('.fixed_text').hide().removeClass('fixed_text');if(fixed_id!=text_id)$('#'+text_id).show().addClass('fixed_text');}
else{if(e.type=='mouseover'||fixed_id!=text_id)e.type=='mouseover'?$('#'+text_id).show():$('#'+text_id).hide();if(e.type=='mouseover'&&fixed_id&&fixed_id!=text_id){$('#'+fixed_id).hide()
fixed_id=false;}}}});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_controlsRadio}","click",function(sym,e){detectorsOn=true;sym.$('.group_test1').each(function(){if(sym.$('controlsRadio').hasClass('selected')){sym.stop('controls');}});switch(input){case 1:showProbabilityBox();showInputClassicalParticles();clearTimeout(interval);if(streaming==1){continuousFire();}
detectorsWF();sym_select($('#Stage_radioClassicalParticles'));break;case 6:showProbabilityBox();showInputClassicalParticles();debug(input);clearTimeout(interval);if(streaming==1){continuousFire();}
detectorsWF();sym_select($('#Stage_radioClassicalParticles'));break;case 2:showProbabilityBox();showInputElectromagneticWave();debug(input);if(streaming==1){continuousFire();}
detectorsWF();sym_select($('#Stage_radioElectromagneticWave'));break;case 3:showInputSinglePhotons();debug(input);clearTimeout(interval);if(streaming==1){continuousFire();}
detectorsWF();sym_select($('#Stage_radioSinglePhotons'));break;}
if(streaming==0){stopStream();stopEMWave();}
if(beamSplitter2==1){sym.$('body31').css('width',Math.round((theta/Math.PI)*20)+'px');sym.$('beamsplitter').show();sym.$('body31').show();}});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_introductionRadio}","click",function(sym,e){clearTimeout(interval);sym.$('.group_test1').each(function(){if(sym.$(this).hasClass('selected')){sym.stop('simulation');stopEMWave();stopPhotons();stopParticles();clearDetectors();}});timeline='simulation';});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_link_st_andrews}","click",function(sym,e){window.open('http://www.st-andrews.ac.uk/physics/quvis','_blank');});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_tab_simulation}","click",function(sym,e){stopEMWave();sym.stop('controls');sym_select($('#Stage_controlsRadio'));sym.getSymbol("singlePhoton").stop();sym.getSymbol("singlePhotons").stop();sym.getSymbol("EMwave2").stop();sym_features();$('#Stage').data('step',false);clearTimeout(AdobeEdge.step_animation);clearTimeout(interval);$('#Stage_introductionRadio').show();$('#Stage_controlsRadio').show();counterStep=1;sym_enable($('#Stage_radioClassicalParticles'));sym_enable($('#Stage_radioElectromagneticWave'));sym_enable($('#Stage_radioSinglePhotons'));$('#Stage_phaseShifterLabelBox').hide();$('#Stage_beamsplitterLabelBox').hide();previous.restore();clearDetectors();detectorsWF();switch(previous.inputo){case 1:showProbabilityBox();showInputClassicalParticles();debug(input);clearTimeout(interval);if(streaming==1){continuousFire();}
detectorsWF();sym_select($('#Stage_radioClassicalParticles'));break;case 2:showProbabilityBox();showInputElectromagneticWave();debug(input);if(streaming==1){continuousFire();}
detectorsWF();sym_select($('#Stage_radioElectromagneticWave'));break;case 3:showProbabilityBox();showInputSinglePhotons();debug(input);clearTimeout(interval);if(streaming==1){continuousFire();}
detectorsWF();sym_select($('#Stage_radioSinglePhotons'));break;case 4:showProbabilityBox();showInputElectromagneticWave();debug(input);if(streaming==1){continuousFire();}
detectorsWF();sym_select($('#Stage_radioElectromagneticWave'));break;case 5:showProbabilityBox();showInputSinglePhotons();debug(input);clearTimeout(interval);if(streaming==1){continuousFire();}
detectorsWF();sym_select($('#Stage_radioSinglePhotons'));break;case 6:showProbabilityBox();showInputClassicalParticles();debug(input);clearTimeout(interval);if(streaming==1){continuousFire();}
detectorsWF();sym_select($('#Stage_radioClassicalParticles'));break;}
if(streaming==0){stopStream();stopEMWave();}
if(beamSplitter2==1){sym.$('body31').css('width',Math.round((theta/Math.PI)*20)+'px');sym.$('beamsplitter').show();sym.$('body31').show();}
else{sym.$('beamsplitter').hide();sym.$('body31').hide();sym.$('button_labelCopy6').html('Strahlteiler 2 einf&uuml;gen');}});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_tab_explanation}","click",function(sym,e){sym.stop('explanation');sym_features();sym_step(1);clearDetectors();showAllLabels();});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_radioClassicalParticles}","click",function(sym,e){showInputClassicalParticles();clearDetectors();detectorsWF();$('#Stage_textPS').hide();showProbabilityBox();debug(input);clearTimeout(interval);if(streaming==1){continuousFire();}});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_radio2Copy2}","click",function(sym,e){sym.$('.group_test1').each(function(){if(sym.$(this).hasClass('selected')){var text='';switch(sym.$(this).attr('id')){case'Stage_radio':text='radio 1.1';break;case'Stage_radio2':text='radio 1.2';break;case'Stage_radio3':text='radio 1.3';break;case'Stage_radio4':text='radio 1.4';break;}
sym.$('test_label').text(text);}});});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_radioElectromagneticWave}","click",function(sym,e){clearDetectors();showProbabilityBox();showInputElectromagneticWave();debug(input);if(streaming==1){continuousFire();}
detectorsWF();(beamSplitter2&&sym.$('labelElements').hasClass('selected'))?$('#Stage_textPS').show():$('#Stage_textPS').hide();});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_fireButton}","click",function(sym,e){clearDetectors();switch(input){case 1:randomParticle();break;case 6:randomParticle();break;case 2:break;case 3:singlePhoton2();break;case 4:break;case 5:singlePhoton2();break;}});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_continuousButton}","click",function(sym,e){clearDetectors();if(streaming==0){continuousFire();}
else{stopStream();stopEMWave();}});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_fastForwardButton}","click",function(sym,e){clearDetectors();fastForward();});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_beamSplitterButton}","click",function(sym,e){clearDetectors();streaming2=streaming;stopStream();streaming=streaming2;stopEMWave();clearTimeout(interval);if(beamSplitter2==0){insertBeamSplitter2();$('#Stage_phaseShiftBox').css('background-color','#ffe89a');sym_enable($('#Stage_slider'));$('#Stage_phaseShiftBox').show();}
else{removeBeamSplitter2();$('#Stage_phaseShiftBox').css('background-color','#dfdfdf');sym_disable($('#Stage_slider'));clearEMWave();intensity=0.5;probability=0.5;$('#Stage_phaseShiftBox').hide();}
if(beamSplitter2!=0){theta=(sym.$('slider').data('val')/180)*Math.PI;probability=0.5-0.5*Math.cos(theta);intensity=0.5-0.5*Math.cos(theta);intensity2=sym.$('slider').data('val')/18+1;}
displayProbability();switch(input){case 1:input=6;sym.$('textPS').hide();$('#Stage_phaseShiftBox').hide();break;case 6:input=1;sym.$('textPS').hide();break;case 2:input=4;debug(input);$('#Stage_phaseShiftBox').css('background-color','#ffe89a');sym_enable($('#Stage_slider'));$('#Stage_phaseShiftBox').show();if($('#Stage_body31').css('display')=='block'){$('#Stage_body31').hide();}
else{$('#Stage_body31').show();}
break;case 3:input=5;$('#Stage_phaseShiftBox').css('background-color','#ffe89a');sym_enable($('#Stage_slider'));$('#Stage_phaseShiftBox').show();if($('#Stage_body31').css('display')=='block'){$('#Stage_body31').hide();}
else{$('#Stage_body31').show();}
break;case 4:input=2;if($('#Stage_body31').css('display')=='block'){$('#Stage_body31').hide();}
else{$('#Stage_body31').show();}
break;case 5:input=3;if($('#Stage_body31').css('display')=='block'){$('#Stage_body31').hide();}
else{$('#Stage_body31').show();}
break;}
detectorsWF();detectorsWF();if(streaming==1){continuousFire();}});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_clearMeasurements}","click",function(sym,e){clearDetectors();clearMeasurements();});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_labelElements}","click",function(sym,e){if(sym.$('labelElements').hasClass('selected')){showAllLabels();if(beamSplitter2==0){$('#Stage_textBS2').hide();$('#Stage_textPS').hide();}}
else{hideAllLabels();}});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_radioSinglePhotons}","click",function(sym,e){clearDetectors();showProbabilityBox();showInputSinglePhotons();debug(input);clearTimeout(interval);if(streaming==1){continuousFire();}
detectorsWF();(beamSplitter2&&sym.$('labelElements').hasClass('selected'))?$('#Stage_textPS').show():$('#Stage_textPS').hide();});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_showProb}","click",function(sym,e){showProbabilityBox();displayProbability();});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",0,function(sym,e){showAllLabels();});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",179,function(sym,e){if(sym.$('labelElements').hasClass('selected')){showAllLabels();}
else{hideAllLabels();}});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_link_quantumphysics}","click",function(sym,e){window.open('http://quantumphysics.iop.org','_blank');});
//Edge binding end
Symbol.bindElementAction(compId,symbolName,"${_link_iop}","click",function(sym,e){window.open('http://www.iop.org','_blank');});
//Edge binding end
})("stage");
//Edge symbol end:'stage'

//=========================================================

//Edge symbol: 'checkbox_tickbox'
(function(symbolName){})("checkbox_tickbox");
//Edge symbol end:'checkbox_tickbox'

//=========================================================

//Edge symbol: 'radio_tickbox'
(function(symbolName){})("radio_tickbox");
//Edge symbol end:'radio_tickbox'

//=========================================================

//Edge symbol: 'exploration'
(function(symbolName){})("steps");
//Edge symbol end:'steps'

//=========================================================

//Edge symbol: 'highlight_1'
(function(symbolName){Symbol.bindTimelineAction(compId,symbolName,"Default Timeline","complete",function(sym,e){sym.play(0);});
//Edge binding end
})("highlight_1");
//Edge symbol end:'highlight_1'

//=========================================================

//Edge symbol: 'singlePhoton'
(function(symbolName){Symbol.bindTimelineAction(compId,symbolName,"Default Timeline","complete",function(sym,e){sym.$('particlePath0000').hide();sym.$('particlePath0001').hide();sym.$('particlePath0002').hide();sym.$('particlePath0003').hide();});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",2939,function(sym,e){detectors();});
//Edge binding end
})("singlePhoton");
//Edge symbol end:'singlePhoton'

//=========================================================

//Edge symbol: 'singlePhotons'
(function(symbolName){Symbol.bindTimelineAction(compId,symbolName,"Default Timeline","complete",function(sym,e){sym.$('photon').hide();sym.$('photonCopy').hide();sym.$('connectionLine').hide();});
//Edge binding end
Symbol.bindTimelineAction(compId,symbolName,"Default Timeline","play",function(sym,e){sym.$('photon').show();sym.$('photonCopy').show();sym.$('connectionLine').show();});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",3500,function(sym,e){if(beamSplitter2==1){setOpacity();sym.$('photon').css('opacity',opacityPhoton2);sym.$('photonCopy').css('opacity',opacityPhoton1);sym.$('connectionLine').css('opacity',Math.min(opacityPhoton1,opacityPhoton2));}
if(particle<probability){a=1;detector1[input-1][intensity2-1]++;detectorColor=1;}
else{a=0;detector2[input-1][intensity2-1]++;detectorColor=2;}});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",3900,function(sym,e){detectors();});
//Edge binding end
})("singlePhotons");
//Edge symbol end:'singlePhotons'

//=========================================================

//=========================================================

//Edge symbol: 'greenFlashGap'
(function(symbolName){Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",250,function(sym,e){if(streaming==0){sym.stop(250);}});
//Edge binding end
Symbol.bindTimelineAction(compId,symbolName,"Default Timeline","complete",function(sym,e){});
//Edge binding end
})("greenFlashGap");
//Edge symbol end:'greenFlashGap'

//=========================================================

//Edge symbol: 'greenFlash'
(function(symbolName){Symbol.bindTimelineAction(compId,symbolName,"Default Timeline","complete",function(sym,e){});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",250,function(sym,e){});
//Edge binding end
})("greenFlash");
//Edge symbol end:'greenFlash'

//=========================================================

//Edge symbol: 'blueFlash2'
(function(symbolName){Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",250,function(sym,e){if(streaming==0){sym.stop(250);}});
//Edge binding end
})("blueFlash2");
//Edge symbol end:'blueFlash2'

//=========================================================

//Edge symbol: 'greenFlash2'
(function(symbolName){Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",250,function(sym,e){if(streaming==0){sym.stop(250);}});
//Edge binding end
})("greenFlash2");
//Edge symbol end:'greenFlash2'

//=========================================================

//Edge symbol: 'EMwave2'
(function(symbolName){Symbol.bindTimelineAction(compId,symbolName,"Default Timeline","complete",function(sym,e){sym.play(0);counter++;});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",21,function(sym,e){});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",0,function(sym,e){if(beamSplitter2==0||intensity2==5){sym.getComposition().getStage().displayGraph("#PlotIOp13_NoPhase_0_",counter%59);debug('#PlotIOp13_NoPhase_0_'+counter%59);}
else if(intensity2<5){intensity3=intensity2-1
sym.getComposition().getStage().displayGraph('#PlotIOP13_'+intensity3+'_',counter%59);debug('#PlotIOP13_'+intensity3+'_'+counter%59);}
else{sym.getComposition().getStage().displayGraph('#PlotIOP13_'+intensity2+'_',counter%59);debug('#PlotIOP13_'+intensity2+'_'+counter%59);}});
//Edge binding end
})("EMwave2");
//Edge symbol end:'EMwave2'

//=========================================================

//Edge symbol: 'mirrors'
(function(symbolName){})("mirrors");
//Edge symbol end:'mirrors'

//=========================================================

//=========================================================

//=========================================================

//=========================================================

//Edge symbol: 'highlight'
(function(symbolName){Symbol.bindTimelineAction(compId,symbolName,"Default Timeline","complete",function(sym,e){sym.play(0);});
//Edge binding end
})("highlight_1_1");
//Edge symbol end:'highlight_1_1'

//=========================================================

//=========================================================

//=========================================================

//=========================================================

//Edge symbol: 'highlight'
(function(symbolName){Symbol.bindTimelineAction(compId,symbolName,"Default Timeline","complete",function(sym,e){sym.play(0);});
//Edge binding end
})("highlight_1_1_2");
//Edge symbol end:'highlight_1_1_2'

//=========================================================

//=========================================================

//Edge symbol: 'blueFlashGap'
(function(symbolName){Symbol.bindTimelineAction(compId,symbolName,"Default Timeline","complete",function(sym,e){});
//Edge binding end
Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",250,function(sym,e){if(streaming==0){sym.stop(250);}});
//Edge binding end
})("blueFlashGap");
//Edge symbol end:'blueFlashGap'

//=========================================================

//Edge symbol: 'greenFlash2_1'
(function(symbolName){Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",250,function(sym,e){if(streaming==0){sym.stop(250);}});
//Edge binding end
})("bigGreenFlash");
//Edge symbol end:'bigGreenFlash'

//=========================================================

//Edge symbol: 'EMWave'
(function(symbolName){})("EMWave");
//Edge symbol end:'EMWave'
})(jQuery,AdobeEdge,"EDGE-19890435");