From f82e4459f52998ca3b4160befe90ec4f5d180a6d Mon Sep 17 00:00:00 2001 From: Touille Date: Sat, 7 Jan 2017 19:37:44 +0100 Subject: [PATCH 1/5] Fix Silent Runing Off on Fire --- Thrustmaster Warthog Script/ED+HCS v2.2.tmc | 6 +++--- .../ED+HCS v2.2_Functions.tmh | 3 +-- .../ED+HCS v2.2_Settings.tmh | 20 +++++++++---------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Thrustmaster Warthog Script/ED+HCS v2.2.tmc b/Thrustmaster Warthog Script/ED+HCS v2.2.tmc index ad958cf..138ffcb 100644 --- a/Thrustmaster Warthog Script/ED+HCS v2.2.tmc +++ b/Thrustmaster Warthog Script/ED+HCS v2.2.tmc @@ -115,10 +115,10 @@ int main() // -------------------------Data Management Switch (DMS) MapKeyIO(&Joystick, H3U, PULSE+CommsPanel, TEMPO(EXEC("initToggleSilentRuningOFFonFire();"), EXEC("initToggleHeatSinkonSilentRuning();"), ExtraPressDelay)); // UP - MapKeyIO(&Joystick, H3D, PULSE+RolePanel, EXEC("initToggleSilentRuning();")); // DOWN - MapKeyR(&Joystick, H3D, EXEC("initToggleSilentRuning();")); // DOWN RELEASE + MapKeyIO(&Joystick, H3D, PULSE+RolePanel, TEMPO(0,EXEC("initToggleSilentRuning();"), LongPressDelay)); // DOWN + MapKeyRIO(&Joystick, H3D, 0,EXEC("initToggleSilentRuning();")); // DOWN RELEASE MapKeyIO(&Joystick, H3L, PULSE+TargetPanel, PrevFireGroup); // /LEFT - MapKeyIO(&Joystick, H3R, PULSE+SystemPanel, NextFireGroup); // RIGHT + MapKeyIO(&Joystick, H3R, PULSE+SystemPanel, NextFireGroup); // RIGHT // -------------------------Countermeasures Management Switch (CMS) MapKey(&Joystick, H4U, UIUp); // UP UI UP diff --git a/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh b/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh index 61e405e..55f8f77 100644 --- a/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh +++ b/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh @@ -80,7 +80,6 @@ if(sHardPoints){ if(OptimalPIPMode){ vOptimalPIPBackup = vOptimalPIP; - //ActKey(KEYON+PULSE+EXEC("initPIPmPowerWepSys();")); ActKey(KEYON+PULSE+EXEC("initPIPPower(WEP,SYS);")); if(DebugMode)printf("HardPoints: Optimal PIP Mode Set\x0a"); } @@ -182,7 +181,7 @@ //TOGGLE: Silent Runing int initToggleSilentRuning(){ - if(Joystick[H3D] | Throttle[APAH]){ + if(Joystick[H3D] | Joystick[TG1] | Joystick[S2] | !Joystick[TG1] | !Joystick[S2]){ if(SilentRuningGameMode){ // Silent Runing [TOGGLE] Mode Ingame sSL=!sSL; if(sSL){ //Silent Runing [TOGGLE] Mode First Pulse Engage diff --git a/Thrustmaster Warthog Script/ED+HCS v2.2_Settings.tmh b/Thrustmaster Warthog Script/ED+HCS v2.2_Settings.tmh index 224bfe6..5cacb9e 100644 --- a/Thrustmaster Warthog Script/ED+HCS v2.2_Settings.tmh +++ b/Thrustmaster Warthog Script/ED+HCS v2.2_Settings.tmh @@ -21,7 +21,7 @@ int HeatSinkonSilentRuning =0; //[WARNING : Heat Sink Is limited Use with Caution] Automatic HeatSink On Silent Runing IF SilentRuningGameMode is Set to [1] Can be switched on the Fly Data Management Switch UP define HeatSinkonSilentRuningDelay 8000 //HeatSink On Silent Runing Deploy Delay if HeatSinkOnSilentRuning is set to [1] -// define VoiceAttack 1 //(Not Used Yet) If VoiceAttack set to 1 +// define VoiceAttack 1 //(Not Used Yet) If VoiceAttack set to 1 // -------------------------Match This with ED Key binding Ingame (Left if you use Unmodified ED KeyBinding File include with this script) @@ -60,20 +60,20 @@ // BASE SETTINGS // //--------------------------------------------------------------------------------------------------------------------------------------------------------------// - define PulseTime 25 //PULSE+ Delay time 25 - define DelayTime 75 //D() Delay time 75 - define KBLayout KB_ENG //Default Keyboard Layout KB_ENG + define PulseTime 25 //PULSE+ Delay time 25 + define DelayTime 75 //D() Delay time 75 + define KBLayout KB_ENG //Default Keyboard Layout KB_ENG //--------------------------------------------------------------------------------------------------------------------------------------------------------------// // PRESS DELAY SETTINGS // //--------------------------------------------------------------------------------------------------------------------------------------------------------------// - define MiniPressDelay 150 //Shortest Delay 150 - define ShortPressDelay 250 //Shorter Delay 250 - define MediumPressDelay 350 //Medium Delay 350 - define LongPressDelay 500 //Long Delay 500 - define ExtraPressDelay 1500 //Longest Delay 1500 - define PIPPressDelay 350 //PIP PressDelay 350 + define MiniPressDelay 150 //Shortest Delay 150 + define ShortPressDelay 250 //Shorter Delay 250 + define MediumPressDelay 350 //Medium Delay 350 + define LongPressDelay 500 //Long Delay 500 + define ExtraPressDelay 1500 //Longest Delay 1500 + define PIPPressDelay 350 //PIP PressDelay 350 //--------------------------------------------------------------------------------------------------------------------------------------------------------------// // LED SETTINGS // LED1, LED2, LED3, LED4, LED5 // 5 LED's MAXIMUM // From 6f0686b8d848d4c4301cd39367b274fb92f620eb Mon Sep 17 00:00:00 2001 From: Touille Date: Sun, 8 Jan 2017 11:24:49 +0100 Subject: [PATCH 2/5] Fix initVoicePTT() (Toggle and Push Mode) --- Thrustmaster Warthog Script/ED+HCS v2.2.tmc | 4 +- .../ED+HCS v2.2_Functions.tmh | 60 +++++++++++-------- .../ED+HCS v2.2_Settings.tmh | 52 ++++++++-------- 3 files changed, 64 insertions(+), 52 deletions(-) diff --git a/Thrustmaster Warthog Script/ED+HCS v2.2.tmc b/Thrustmaster Warthog Script/ED+HCS v2.2.tmc index 138ffcb..c1a97b8 100644 --- a/Thrustmaster Warthog Script/ED+HCS v2.2.tmc +++ b/Thrustmaster Warthog Script/ED+HCS v2.2.tmc @@ -65,7 +65,7 @@ int main() // ;) // //--------------------------------------------------------------------------------------------------------------------------------------------------------------// - printf("--------------------------V.2.2.1.4b----07/01/2017------------------------\x0a"); + printf("--------------------------V.2.2.1.5b----08/01/2017------------------------\x0a"); printf("-----------Enhanced Elite Dangerous Warthog Profile by CMDR Touille-------\x0a"); printf("------------------------------Fly Safe CMDR! o7---------------------------\x0a"); printf("-o/--o/--o/--o/--WraithMG11235-Aussiedroid-Synkc-Solarfly--o/--o/--o/--o/-\x0a"); @@ -143,6 +143,7 @@ int main() // -------------------------Mic Switch MapKey(&Throttle, MSP, EXEC("initVoicePTT();")); + MapKeyR(&Throttle, MSP, EXEC("initVoicePTT();")); //--HAT---------------------------------------------------------------------------------------------------------------------------------------------------------// @@ -295,6 +296,7 @@ int main() // if(ToggleCameraLED!=0 & sCameraMode){ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleCameraLED));} if(TogglePTTLED!=0 & sPTTState){ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+TogglePTTLED));} if(ToggleVoicePTTLED!=0 & vVoicePTT){ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleVoicePTTLED));} + if(TogglePTTModeLED!=0 & sPPTMode){ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+TogglePTTModeLED));} // if(ToggleSilentRuningLED!=0 & sSilentRuning){ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleSilentRuningLED));} if(ToggleSilentRuningonFireLED!=0 & SilentRuningOFFonFire){ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleSilentRuningonFireLED));} if(ToggleHeatSinkonSilentRuningLED!=0 & HeatSinkonSilentRuning){ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleHeatSinkonSilentRuningLED));} diff --git a/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh b/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh index 55f8f77..406c400 100644 --- a/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh +++ b/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh @@ -154,16 +154,24 @@ int initTogglePTT(){ if(!Joystick[S3]){ sPPTMode=!sPPTMode; //reverse the flag status - if(DebugMode)printf("PTTMode Change [%d]\x0a", sPPTMode); + if(sPPTMode){ + //if(DebugMode)printf("Mic Change [Internal:[0] External:[1][%d]\x0a", sPTTState); + if(TogglePTTModeLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+TogglePTTModeLED)); // ToggleMicLED ON + }else{ + //if(DebugMode)printf("Mic Change [Internal:[0] External:[1][%d]\x0a", sPTTState); + if(TogglePTTModeLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-TogglePTTModeLED)); // ToggleMicLED OFF + } + if(DebugMode)printf("PTTMode Change [Toggle:[0] PUSH:[1]] [%d]\x0a", sPPTMode); }else{ sPTTState=!sPTTState; //reverse the flag status if(sPTTState){ - if(DebugMode)printf("Mic State External PTT[%d]\x0a", sPTTState); + //if(DebugMode)printf("Mic Change [Internal:[0] External:[1][%d]\x0a", sPTTState); if(TogglePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+TogglePTTLED)); // ToggleMicLED ON }else{ - if(DebugMode)printf("Mic State Internal PTT[%d]\x0a", sPTTState); + //if(DebugMode)printf("Mic Change [Internal:[0] External:[1][%d]\x0a", sPTTState); if(TogglePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-TogglePTTLED)); // ToggleMicLED OFF } + if(DebugMode)printf("Mic Change [Internal:[0] External:[1][%d]\x0a", sPTTState); } } @@ -370,32 +378,32 @@ //FUNCTION: Voice PTT int initVoicePTT(){ - vVoicePTT=!vVoicePTT; - if(sPTTState){ - if(vVoicePTT){ - if(!sPPTMode)ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); - else ActKey(KEYON+DOWN+ExternalVoiceCommsPTT); - if(DebugMode)printf("External Mic Actived [%d] PTT State [%d] Mode [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); + if(sPTTState)vPTT = ExternalVoiceCommsPTT; //External Mic + if(!sPTTState)vPTT = InternalVoiceCommsPTT; //Internal Mic + if(Throttle[MSP]){ + vVoicePTT=!vVoicePTT; + if(!sPPTMode){ + vVoice=!vVoice; + if(vVoice){ //Talk [Toggle] + ActKey(KEYON+PULSE+vPTT); + if(DebugMode)printf("Mic Toggle Actived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); + if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleVoicePTTLED)); // ToggleVoiceLED ON + }else{ //Silence [Toggle} + ActKey(KEYON+PULSE+vPTT); + if(DebugMode)printf("Mic Toggle DesActived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); + if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleVoicePTTLED)); // ToggleVoiceLED OFF + } + }else{ //Talk [HOLD] + ActKey(KEYON+DOWN+vPTT); + if(DebugMode)printf("Mic Hold Actived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleVoicePTTLED)); // ToggleVoiceLED ON - }else{ - if(!sPPTMode)ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); - else ActKey(KEYON+UP+ExternalVoiceCommsPTT); - if(DebugMode)printf("External Mic DesActived [%d] PTT State [%d] Mode [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); - if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleVoicePTTLED)); // ToggleVoiceLED ON } } - else{ - if(vVoicePTT){ - if(!sPPTMode)ActKey(KEYON+PULSE+InternalVoiceCommsPTT); - else ActKey(KEYON+DOWN+InternalVoiceCommsPTT); - if(DebugMode)printf("Internal Mic Actived [%d] PTT State [%d] Mode [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); - if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleVoicePTTLED)); // ToggleVoiceLED ON - }else{ - if(!sPPTMode)ActKey(KEYON+PULSE+InternalVoiceCommsPTT); - else ActKey(KEYON+UP+InternalVoiceCommsPTT); - if(DebugMode)printf("Internal Mic DesActived [%d] PTT State [%d] Mode [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); - if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleVoicePTTLED)); // ToggleVoiceLED ON - } + if(!Throttle[MSP] & sPPTMode){ //Silence [HOLD] + vVoicePTT=!vVoicePTT; + ActKey(KEYON+UP+vPTT); + if(DebugMode)printf("Mic Hold DesActived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); + if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleVoicePTTLED)); // ToggleVoiceLED OFF } } diff --git a/Thrustmaster Warthog Script/ED+HCS v2.2_Settings.tmh b/Thrustmaster Warthog Script/ED+HCS v2.2_Settings.tmh index 5cacb9e..2cb83df 100644 --- a/Thrustmaster Warthog Script/ED+HCS v2.2_Settings.tmh +++ b/Thrustmaster Warthog Script/ED+HCS v2.2_Settings.tmh @@ -25,16 +25,16 @@ // -------------------------Match This with ED Key binding Ingame (Left if you use Unmodified ED KeyBinding File include with this script) - int FlightAssistGameMode =0; //Flight Miscellaneous / Toggle Flight Assist : [HOLD:0, TOGGLE:1] -// int DriveAssistGameMode =0; //Driving / Drive Assist : [HOLD:0, TOGGLE:1] + int FlightAssistGameMode =0; //Flight Miscellaneous / Toggle Flight Assist [HOLD:0, TOGGLE:1] +// int DriveAssistGameMode =0; //Driving / Drive Assist [HOLD:0, TOGGLE:1] - int HardPointsonFireGameMode =1; //Weapons / Firing Deploys Hardpoints : [OFF:0, ON:1] - int SilentRuningGameMode =1; //Cooling / Silent Runing : [HOLD:0, TOGGLE:1] + int HardPointsonFireGameMode =1; //Weapons / Firing Deploys Hardpoints [OFF:0, ON:1] + int SilentRuningGameMode =1; //Cooling / Silent Runing [HOLD:0, TOGGLE:1] - int RFlightThrootleGameMode =0; //Flight Throttle / Forward Only Throttle Reverse : [HOLD:0, TOGGLE:1] -// int RDriveThrootleGameMode =0; //Drive Throttle / Forward Only Throttle Reverse : [HOLD:0, TOGGLE:1] + int RFlightThrootleGameMode =0; //Flight Throttle / Forward Only Throttle Reverse [HOLD:0, TOGGLE:1] +// int RDriveThrootleGameMode =0; //Drive Throttle / Forward Only Throttle Reverse [HOLD:0, TOGGLE:1] -// int HeadLookGameMode =1; /Driving Mode Switches & Mode Switches / HeadLock : [HOLD:0, TOGGLE:1] +// int HeadLookGameMode =1; /Driving Mode Switches & Mode Switches / HeadLock [HOLD:0, TOGGLE:1] //--------------------------------------------------------------------------------------------------------------------------------------------------------------// // TOGGLE STATES // @@ -46,16 +46,16 @@ int sCargo; //Cargo Scoop Can be switched on the Fly [S3 + Switch] int sLights; //ShipLights Can be switched on the Fly [S3 + Switch] int sCombinedFire; //Separate Primary & Secondary Fire on Trigger 2 (full depression of trigger) OFF Can be switched on the Fly [S3 + Switch] - int sRCorrection =1; //Rotational Correction Default is ON Can be switched on the Fly [S3 + Switch] - int sPPTMode =0; //PTT Or PTP Toggle [0] or PUSH [1] Can be switched on the Fly [S3 + Switch] - int sPTTState; //Internal / External Mic External [1] Or Internal [0] Can be switched on the Fly [S3 + Switch] + int sRCorrection =1; //Rotational Correction [OFF:0, ON:1] Can be switched on the Fly [S3 + Switch] + int sPPTMode =1; //PTT Or PTP [Toggle:[0] PUSH:[1]] Can be switched on the Fly + int sPTTState =1; //Internal / External Mic [Internal:[0] External:[1]} Can be switched on the Fly [S3 + Switch] int sSilentRuning; //Silent Runing int sIDLE; //Throttle IDLE int sFA; //Flight Assist [TOGGLE] Mode Ingame : initToggleEnhancedFAOFF() int sSL; //Silent Runing [TOGGLE] Mode Ingame : initToggleSilentRuning() int sRT; //Reverse Throttle + int sVoice; //Voice [TOGGLE] Mode - //--------------------------------------------------------------------------------------------------------------------------------------------------------------// // BASE SETTINGS // //--------------------------------------------------------------------------------------------------------------------------------------------------------------// @@ -80,20 +80,21 @@ //--------------------------------------------------------------------------------------------------------------------------------------------------------------// define ToggleLandingGearLED 0 - define ToggleCargoScoopLED LED4 + define ToggleCargoScoopLED 0 define ToggleLightsLED 0 define ToggleHardpointsLED 0 - define ToggleCombinedFireLED LED1 - define ToggleRCorrectionLED LED3 + define ToggleCombinedFireLED LED4 + define ToggleRCorrectionLED 0 define ToggleCameraLED 0 - define ToggleSuperCruiseModeLED 0 + define ToggleSuperCruiseModeLED LED5 define TogglePTTLED 0 - define ToggleVoicePTTLED LED5 - define ToggleSilentRuningLED 0 + define ToggleVoicePTTLED 0 + define TogglePTTModeLED 0 + define ToggleSilentRuningLED LED1 define ToggleSilentRuningonFireLED LED2 - define ToggleHeatSinkonSilentRuningLED 0 - define ToggleIDLEonThrottleLED 0 //Work only if ThrottleLEDOnIDLE != 0 - define ToggleFALED 0 //Flight Assist LED + define ToggleHeatSinkonSilentRuningLED LED3 + define ToggleIDLEonThrottleLED 0 //Work only if ThrottleLEDOnIDLE != 0 + define ToggleFALED 0 //Flight Assist LED //--Throttle Backlight (Value 0-255)----------------------------------------------------------------------------------------------------------------------------// @@ -120,7 +121,9 @@ int vSecureEscapeFight; int vOptimalPIP; int vOptimalPIPBackup; - int vVoicePTT; + int vVoicePTT; //initVoicePTT() + int vPTT; //initVoicePTT() + int vVoice; int vSilentRuningBackup; int vLG =1; int vCS =1; @@ -135,8 +138,7 @@ define WEP 3 define MID 4 int PIPfull, PIPhalf, PIPMid; - - + //--------------------------------------------------------------------------------------------------------------------------------------------------------------// // AXIS CURVES // //--------------------------------------------------------------------------------------------------------------------------------------------------------------// @@ -176,8 +178,8 @@ printf("Landing Gears-----------------%d\x0a", sGears); printf("Cargo Scoop-------------------%d\x0a", sCargo); printf("Ship Lights-------------------%d\x0a", sLights); - printf("PPT Mode ---------------------%d\x0a", sPPTMode); - printf("PPT State---------------------%d\x0a", sPTTState); + printf("PPT [Toggle:[0] PUSH:[1]------%d\x0a", sPPTMode); + printf("PPT Internal:[0] External:[1]-%d\x0a", sPTTState); printf("--------------------------IN GAME SETTINGS--------------------------------\x0a"); printf("Flight Assist HOLD/TOGGLE-----%d\x0a", FlightAssistGameMode); // printf("Drive Assist HOLD/TOGGLE-_----%d\x0a", DriveAssistGameMode); From 9c581e8f797c067d92d3e2335e8d0d78f709e39d Mon Sep 17 00:00:00 2001 From: Touille Date: Sun, 8 Jan 2017 14:34:11 +0100 Subject: [PATCH 3/5] Cleaning Code (Simplify the debug msg) --- Thrustmaster Warthog Script/ED+HCS v2.2.tmc | 25 ++-- .../ED+HCS v2.2_Functions.tmh | 116 ++++++++++-------- 2 files changed, 77 insertions(+), 64 deletions(-) diff --git a/Thrustmaster Warthog Script/ED+HCS v2.2.tmc b/Thrustmaster Warthog Script/ED+HCS v2.2.tmc index c1a97b8..09b3c57 100644 --- a/Thrustmaster Warthog Script/ED+HCS v2.2.tmc +++ b/Thrustmaster Warthog Script/ED+HCS v2.2.tmc @@ -41,9 +41,14 @@ int main() if(Rudders == 2)initRudders(); // Initiate Axis Mappings + if(DebugMode)printf("-------------------------Hardware Initialisation--------------------------\x0a"); + if(DebugMode)printf("Initialising Joystick Axis\x0a"); initJoystickAxis(); + if(DebugMode)printf("Initialising Throttle Axis\x0a"); initThrottleAxis(); + if(DebugMode)printf("Initialising Joystick Curve\x0a"); initSetJoystickCurves(); + if(DebugMode)printf("Initialising Throttle Curve\x0a"); initSetThrottleCurves(); //Initiate MFD @@ -51,13 +56,15 @@ int main() if(USEMFD > 1)initLeftMFD(); // Initiate Led State + if(DebugMode)printf("Initialising LED States\x0a"); initLEDStates(); // Initiate Custom & PIP Functions (ED+HCS_Macros_v2.2.tmh) initCustomCommands(); // Initiate Combined Fire - initToggleCombinedFire(); +// if(DebugMode)printf("Initialising Combined Fire\x0a"); +// initToggleCombinedFire(); if(DebugMode){initPrintState();} @@ -86,7 +93,7 @@ int main() MapKey(&Joystick, TG1, EXEC("initPrimaryFire();")); MapKeyR(&Joystick, TG1, EXEC("initPrimaryFire();")); -// MapKey(&Joystick, TG2, 0); // Reseved for Macro initCombinedFire + MapKey(&Joystick, TG2, 0); // Reseved for Macro initCombinedFire MapKey(&Joystick, S1, TEMPO(EXEC("initToggleCombinedFire();"), EXEC("initToggleHardpoints();"), LongPressDelay)); @@ -139,7 +146,7 @@ int main() // -------------------------Left Throttle Button (RED) MapKeyIO(&Throttle, LTB, EXEC("initSetThrottleCurves();"), EXEC("initToggleReverseThrottle();")); - MapKeyR(&Throttle, LTB, EXEC("initToggleReverseThrottle();")); + MapKeyRIO(&Throttle, LTB, 0, EXEC("initToggleReverseThrottle();")); // -------------------------Mic Switch MapKey(&Throttle, MSP, EXEC("initVoicePTT();")); @@ -302,7 +309,6 @@ int main() if(ToggleHeatSinkonSilentRuningLED!=0 & HeatSinkonSilentRuning){ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleHeatSinkonSilentRuningLED));} if(ToggleIDLEonThrottleLED!=0 & sIDLE){ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleIDLEonThrottleLED));} // if(ToggleFALED!=0 & sFA){ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleFALED));} - if(DebugMode)printf("Initialising LED States\x0a"); } //----------------------------------------------------------------------------------------------------------------------Set Joystick @@ -312,7 +318,6 @@ int main() MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Joystick Control Y Axis MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Slew Control X Axis MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Slew Control Y Axis - if(DebugMode)printf("-------------------------Hardware Initialisation--------------------------\x0a");printf("Initialising Joystick Axis\x0a"); } //Joystick Curve Profile Three different presets are selectable On The Fly (FLAP position) @@ -330,24 +335,24 @@ int main() SetSCurve(&Throttle, SCX, 0, SL_DEADZONE, 0, SL_CURVE[vJoystickCurveProfile], SL_ZOOM[vJoystickCurveProfile]); SetSCurve(&Throttle, SCY, 0, SL_DEADZONE, 0, SL_CURVE[vJoystickCurveProfile], SL_ZOOM[vJoystickCurveProfile]); if (DebugMode){ - printf("----Joystick Curve Profile[%d]: Curve=%d, Zoom=%d\x0a", vJoystickCurveProfile, JS_CURVE[vJoystickCurveProfile], JS_ZOOM[vJoystickCurveProfile]); - printf("----Slew Curve Profile[%d]: Curve=%d, Zoom=%d\x0a", vJoystickCurveProfile, SL_CURVE[vJoystickCurveProfile], SL_ZOOM[vJoystickCurveProfile]); + printf("Set Joystick Curve Profile [%d]: Curve=%d, Zoom=%d\x0a", vJoystickCurveProfile, JS_CURVE[vJoystickCurveProfile], JS_ZOOM[vJoystickCurveProfile]); + printf("Set Slew Curve Profile [%d]: Curve=%d, Zoom=%d\x0a", vJoystickCurveProfile, SL_CURVE[vJoystickCurveProfile], SL_ZOOM[vJoystickCurveProfile]); } } //----------------------------------------------------------------------------------------------------------------------Set Throttle //Set Default Throttle Axis int initThrottleAxis(){ + //if(DebugMode)printf("Initialising Throttle Axis\x0a"); MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Right Throttle MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Left Throttle MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Friction Control Axis Curve (Sensor Range Zoom Scaling) SetCustomCurve(&Throttle, THR_FC, LIST(0,0, 33,25, 66,50, 80,75, 100,100)); // (OPTIONAL OVERRIDE) (Linear Recommended in ED) *LIST(Axis physical position, Axis output Value) - if(DebugMode)printf("Initialising Throttle Axis\x0a"); } //Set Throttle Curve two different presets are selectable On The Fly (S3 + RED Button on Throttle Arm) int initSetThrottleCurves(){ - if(DebugMode)printf("Initialising Throttle Curve\x0a"); + //if(DebugMode)printf("Initialising Throttle Curve\x0a"); vThrottleCurveProfile=!vThrottleCurveProfile; TrimDXAxis(DX_Z_AXIS, SET(0)); if(vThrottleCurveProfile)SetJCurve(&Throttle, THR_RIGHT, 50, 50); @@ -356,7 +361,7 @@ int main() else SetSCurve(&Throttle, THR_RIGHT, 0, 0, 0, 2, -2); } DXAxis(DX_Z_AXIS, -AxisVal(Throttle[THR_RIGHT], &axdata)); - if(DebugMode)printf("----Throttle Curve Profile[%d}\x0a", vThrottleCurveProfile); + if(DebugMode)printf("Set Throttle Curve Profile[%d}\x0a", vThrottleCurveProfile); } //----------------------------------------------------------------------------------------------------------------------Set Rudders diff --git a/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh b/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh index 406c400..e895192 100644 --- a/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh +++ b/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh @@ -13,17 +13,18 @@ if(sGears & vLG){ vLG=!vLG; //Reset On The FLY : Just switch ActKey(KEYON+PULSE+LandingGear); - if(DebugMode)printf("Landing Gear: DEPLOYED [%d]\x0a", sGears); + //if(DebugMode)printf("Landing Gear: DEPLOYED [%d]\x0a", sGears); if(ToggleLandingGearLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleLandingGearLED)); // ToggleLandingGearLED ON }else if (!sGears & !vLG){ vLG=!vLG; //Reset On The FLY : Just switch ActKey(KEYON+PULSE+LandingGear); - if(DebugMode)printf("Landing Gear: RETRACTED [%d]\x0a", sGears); + //if(DebugMode)printf("Landing Gear: RETRACTED [%d]\x0a", sGears); if(ToggleLandingGearLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleLandingGearLED)); // ToggleLandingGearLED OFF }else{ if(DebugMode)printf("Landing Gear Reset On The Fly\x0a"); } }else{vLG=!vLG;} + if(DebugMode)printf("Landing Gear [%d] [DEPLOYED:[1] RETRACTED:[0]]\x0a", sGears); } //TOGGLE: Cargo Scoop @@ -37,17 +38,18 @@ if(sCargo & vCS){ vCS=!vCS; //Reset On The FLY : Just switch ActKey(KEYON+PULSE+CargoScoop); - if(DebugMode)printf("Cargo Scoop: DEPLOYED [%d]\x0a", sCargo); + //if(DebugMode)printf("Cargo Scoop: DEPLOYED [%d]\x0a", sCargo); if(ToggleCargoScoopLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleCargoScoopLED)); // ToggleCargoScoopLED ON }else if(!sCargo & !vCS){ vCS=!vCS; //Reset On The FLY : Just switch ActKey(KEYON+PULSE+CargoScoop); - if(DebugMode)printf("Cargo Scoop: RETRACTED [%d]\x0a", sCargo); + //if(DebugMode)printf("Cargo Scoop: RETRACTED [%d]\x0a", sCargo); if(ToggleCargoScoopLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleCargoScoopLED)); // ToggleCargoScoopLED OFF }else{ if(DebugMode)printf("Cargo Scoop Reset On The Fly\x0a"); } }else{vCS=!vCS;} + if(DebugMode)printf("Cargo Scoop [%d] [DEPLOYED:[1] RETRACTED:[0]]\x0a", sCargo); } //TOGGLE: Light @@ -56,34 +58,33 @@ if (Throttle[EFRNORM]) sLights = 1; else sLights = 0; ActKey(KEYON+PULSE+ShipLights); if(sLights){ - if(DebugMode)printf("Light: ON [%d]\x0a", sLights); + //if(DebugMode)printf("Light: ON [%d]\x0a", sLights); if(ToggleLightsLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleLightsLED)); // ToggleLightsLED ON }else{ - if(DebugMode)printf("Light: OFF [%d]\x0a", sLights); + //if(DebugMode)printf("Light: OFF [%d]\x0a", sLights); if(ToggleLightsLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleLightsLED)); // ToggleLightsLED OFF } } + if(DebugMode)printf("Light [%d] [ON:[1] OFF:[0]]\x0a", sLights); } //TOGGLE: HardPoints int initToggleHardpoints(){ if(Joystick[S3]){ sHardPoints=!sHardPoints; //reverse the flag status - if(DebugMode)printf("HardPoints: State Reset\x0a"); + //if(DebugMode)printf("HardPoints: State Reset\x0a"); } if(!Joystick[S3]){ //Reset On The FLY S3 + SWITCH - if(vSecureEscapeFight){ - if(DebugMode)printf("HardPoints SecureEscapeFight [%d]\x0a", vSecureEscapeFight); - } + if(vSecureEscapeFight){if(DebugMode)printf("HardPoints SecureEscapeFight [%d]\x0a", vSecureEscapeFight);} sHardPoints=!sHardPoints; //reverse the flag status ActKey(KEYON+PULSE+DeployHardpoints); if(sHardPoints){ if(OptimalPIPMode){ + if(DebugMode)printf("HardPoints: Backup PIP Mode [%d]\x0a", vOptimalPIP); vOptimalPIPBackup = vOptimalPIP; ActKey(KEYON+PULSE+EXEC("initPIPPower(WEP,SYS);")); - if(DebugMode)printf("HardPoints: Optimal PIP Mode Set\x0a"); } - if(DebugMode)printf("HardPoints: DEPLOYED [%d]\x0a", sHardPoints); + //if(DebugMode)printf("HardPoints: DEPLOYED [%d]\x0a", sHardPoints); if(ToggleHardpointsLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleHardpointsLED)); // ToggleHardpointsLED ON }else{ if(OptimalPIPMode){ @@ -96,43 +97,46 @@ if(vOptimalPIPBackup == 6)ActKey(KEYON+PULSE+EXEC("initPIPPower(WEP,SYS);")); if(vOptimalPIPBackup == 7)ActKey(KEYON+PULSE+EXEC("initPIPPower(WEP,SYS,MID);")); if(vOptimalPIPBackup == 8)ActKey(KEYON+PULSE+EXEC("initPIPPower(WEP,ENG,MID);")); - if(DebugMode)printf("HardPoints: Optimal PIP Mode Reset [%d]\x0a", vOptimalPIPBackup); + if(DebugMode)printf("HardPoints: Reset PIP Mode [%d]\x0a", vOptimalPIPBackup); } - if(DebugMode)printf("HardPoints: RETRACTED [%d]\x0a", sHardPoints); + //if(DebugMode)printf("HardPoints: RETRACTED [%d]\x0a", sHardPoints); if(ToggleHardpointsLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleHardpointsLED)); // ToggleHardpointsLED OFF } } + if(DebugMode)printf("HardPoints [%d] [DEPLOYED:[1] RETRACTED:[0]]\x0a", sHardPoints); } //TOGGLE: Combined Fire int initToggleCombinedFire(){ + sCombinedFire=!sCombinedFire; //reverse the flag status if(sCombinedFire){ MapKey(&Joystick, TG2, CHAIN(PrimaryFire, SecondaryFire)); - if(DebugMode)printf("COMBINED Primary & Secondary Fire 1? [%d]\x0a", sCombinedFire); + //if(DebugMode)printf("COMBINED Primary & Secondary Fire 1? [%d]\x0a", sCombinedFire); if(ToggleCombinedFireLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleCombinedFireLED)); // ToggleCombinedFireLED ON }else{ MapKey(&Joystick, TG2, 0); - if(DebugMode)printf("SEPARATE Primary & Secondary Fire 0? [%d]\x0a", sCombinedFire); + //if(DebugMode)printf("SEPARATE Primary & Secondary Fire 0? [%d]\x0a", sCombinedFire); if(ToggleCombinedFireLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleCombinedFireLED)); // ToggleCombinedFireLED OFF } - sCombinedFire=!sCombinedFire; //reverse the flag status + if(DebugMode)printf("Primary & Secondary Fire [%d] [COMBINED:[1] SEPARATE[0]]\x0a", sCombinedFire); } //TOGGLE: Rotational Correction int initToggleRotationCorrection(){ ActKey(KEYON+PULSE+RotationalCorrection); if(Joystick[S3]){ //Reset On The FLY S3 + SWITCH - if(DebugMode)printf("Rotational Correction: RESET STATE\x0a"); + //if(DebugMode)printf("Rotational Correction: RESET STATE\x0a"); }else{ sRCorrection=!sRCorrection; //reverse the flag status if(sRCorrection){ - if(DebugMode)printf("Rotation Correction: ENABLED [%d]\x0a", sRCorrection); + //if(DebugMode)printf("Rotation Correction: ENABLED [%d]\x0a", sRCorrection); if(ToggleRCorrectionLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleRCorrectionLED)); // ToggleRotationCorrectionLED ON }else{ - if(DebugMode)printf("Rotation Correction: DISABLED [%d]\x0a", sRCorrection); + //if(DebugMode)printf("Rotation Correction: DISABLED [%d]\x0a", sRCorrection); if(ToggleRCorrectionLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleRCorrectionLED)); // ToggleRotationCorrectionLED OFF } } + if(DebugMode)printf("Rotation Correction [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sRCorrection); } //TOGGLE: Classified (External) 'Debug' Camera @@ -142,12 +146,13 @@ if(sCameraMode){ ActKey(KEYON+PULSE+SetSpeed0); DeferCall(60, &ActKey, KEYON+PULSE+SPC); - if(DebugMode)printf("Classified Camera Mode: ON [%d]\x0a", sCameraMode); + //if(DebugMode)printf("Classified Camera Mode: ON [%d]\x0a", sCameraMode); if(ToggleCameraLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleCameraLED)); // ToggleCameraLED ON }else{ - if(DebugMode)printf("Classified Camera Mode: OFF [%d]\x0a", sCameraMode); + //if(DebugMode)printf("Classified Camera Mode: OFF [%d]\x0a", sCameraMode); if(ToggleCameraLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleCameraLED)); // ToggleCameraLED OFF } + if(DebugMode)printf("Classified Camera [%d] [ON:[1] OFF:[0]]\x0a", sCameraMode); } //TOGGLE: PTT/PTP & External/Internal Voice @@ -155,23 +160,19 @@ if(!Joystick[S3]){ sPPTMode=!sPPTMode; //reverse the flag status if(sPPTMode){ - //if(DebugMode)printf("Mic Change [Internal:[0] External:[1][%d]\x0a", sPTTState); if(TogglePTTModeLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+TogglePTTModeLED)); // ToggleMicLED ON }else{ - //if(DebugMode)printf("Mic Change [Internal:[0] External:[1][%d]\x0a", sPTTState); if(TogglePTTModeLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-TogglePTTModeLED)); // ToggleMicLED OFF } - if(DebugMode)printf("PTTMode Change [Toggle:[0] PUSH:[1]] [%d]\x0a", sPPTMode); + if(DebugMode)printf("PTTMode Change [%d] [PUSH:[1] Toggle:[0]]\x0a", sPPTMode); }else{ sPTTState=!sPTTState; //reverse the flag status if(sPTTState){ - //if(DebugMode)printf("Mic Change [Internal:[0] External:[1][%d]\x0a", sPTTState); if(TogglePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+TogglePTTLED)); // ToggleMicLED ON }else{ - //if(DebugMode)printf("Mic Change [Internal:[0] External:[1][%d]\x0a", sPTTState); if(TogglePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-TogglePTTLED)); // ToggleMicLED OFF } - if(DebugMode)printf("Mic Change [Internal:[0] External:[1][%d]\x0a", sPTTState); + if(DebugMode)printf("Mic Change [%d] [External:[1]Internal:[0]]\x0a", sPTTState); } } @@ -179,12 +180,13 @@ int initToggleSuperCruiseMode(){ SupecruiseOnThrottle=!SupecruiseOnThrottle; // reverse the flag status if(SupecruiseOnThrottle){ - if(DebugMode)printf("Supecruise On Throttle Mode: ON [%d]\x0a", SupecruiseOnThrottle); + //if(DebugMode)printf("Supecruise On Throttle Mode: ON [%d]\x0a", SupecruiseOnThrottle); if(ToggleSuperCruiseModeLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleSuperCruiseModeLED)); // ToggleSuperCruiseModeLED ON }else{ - if(DebugMode)printf("Supecruise On Throttle Mode: OFF [%d]\x0a", SupecruiseOnThrottle); + //if(DebugMode)printf("Supecruise On Throttle Mode: OFF [%d]\x0a", SupecruiseOnThrottle); if(ToggleSuperCruiseModeLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleSuperCruiseModeLED)); // ToggleSuperCruiseModeLED OFF } + if(DebugMode)printf("Supecruise On Throttle [%d] [ON:[1] OFF:[0]]\x0a", SupecruiseOnThrottle); } //TOGGLE: Silent Runing @@ -197,10 +199,10 @@ if(sSilentRuning){ if(HeatSinkonSilentRuning){ ActKey(KEYON+PULSE+mHeatSinkonSilentRuning); - if(DebugMode)printf("Heat Sink On Silent Runing Engaged [%d]\x0a", sSilentRuning); + if(DebugMode)printf("Heat Sink On Silent Runing [%d] [ON:[1] OFF:[0]]\x0a", sSilentRuning); }else{ ActKey(KEYON+PULSE+SilentRunning); - if(DebugMode)printf("Silent Runing [Toggle] Engaged [%d]\x0a", sSilentRuning); + //if(DebugMode)printf("Silent Runing [Toggle] Engaged [%d]\x0a", sSilentRuning); } if(ToggleSilentRuningLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleSilentRuningLED)); // ToggleSilentRuningLED ON } @@ -208,28 +210,29 @@ if(!sSL){ //Silent Runing [TOGGLE] Mode Second Pulse DisEngage sSilentRuning=!sSilentRuning; ActKey(KEYON+PULSE+SilentRunning); - if(DebugMode)printf("Silent Runing [Toggle] DisEngaged [%d]\x0a", sSilentRuning); + //if(DebugMode)printf("Silent Runing [Toggle] DisEngaged [%d]\x0a", sSilentRuning); if(ToggleSilentRuningLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleSilentRuningLED)); // ToggleSilentRuningLED OFF } }else{ //Silent Runing [HOLD] Mode Engage sSilentRuning=!sSilentRuning; // reverse the flag status ActKey(KEYON+DOWN+SilentRunning); - if(DebugMode)printf("Silent Runing [HOLD] Engaged [%d]\x0a", sSilentRuning); + //if(DebugMode)printf("Silent Runing [HOLD] Engaged [%d]\x0a", sSilentRuning); if(ToggleSilentRuningLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleSilentRuningLED)); // ToggleSilentRuningLED ON } } else if(!SilentRuningGameMode & sSilentRuning){ //Silent Runing [HOLD] Mode DisEngage sSilentRuning=!sSilentRuning; // reverse the flag status ActKey(KEYON+UP+SilentRunning); - if(DebugMode)printf("Silent Runing [HOLD] DisEngaged [%d]\x0a", sSilentRuning); + //if(DebugMode)printf("Silent Runing [HOLD] DisEngaged [%d]\x0a", sSilentRuning); if(ToggleSilentRuningLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleSilentRuningLED)); // ToggleSilentRuningLED OFF } + if(DebugMode)printf("Silent Runing [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sSilentRuning); } //TOGGLE: Silent Runing OFF/ON on Fire int initToggleSilentRuningOFFonFire(){ SilentRuningOFFonFire=!SilentRuningOFFonFire; // reverse the flag status - if(DebugMode)printf("Silent Runing On Fire is [%d]\x0a", SilentRuningOFFonFire); + if(DebugMode)printf("Silent Runing On Fire [%d] [ENABLE:[1] DISABLE:[0]]\x0a", SilentRuningOFFonFire); if(SilentRuningOFFonFire & ToggleSilentRuningonFireLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleSilentRuningonFireLED)); // ToggleSilentRuningLED ON if(!SilentRuningOFFonFire & ToggleSilentRuningonFireLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleSilentRuningonFireLED)); // ToggleSilentRuningLED OFF } @@ -237,7 +240,7 @@ //TOGGLE: HeatSink on Silent Runing int initToggleHeatSinkonSilentRuning(){ HeatSinkonSilentRuning=!HeatSinkonSilentRuning; // reverse the flag status - if(DebugMode)printf("Heat Sink on Silent Runing is [%d]\x0a", HeatSinkonSilentRuning); + if(DebugMode)printf("Heat Sink on Silent Runing [%d] [ENABLE:[1] DISABLE:[0]]\x0a", HeatSinkonSilentRuning); if(HeatSinkonSilentRuning & ToggleHeatSinkonSilentRuningLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleHeatSinkonSilentRuningLED)); // ToggleHeatSinkonSilentRuningLED ON if(!HeatSinkonSilentRuning & ToggleHeatSinkonSilentRuningLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleHeatSinkonSilentRuningLED)); // ToggleHeatSinkonSilentRuningLED OFF } @@ -245,20 +248,21 @@ //TOGGLE: Menu and LED OFF on Idle (Check PERSONAL SETTINGS in Settings File) int initToggleIDLEonThrottle(){ if(Joystick[S3]){ //Reset On The FLY S3 + SWITCH - if(DebugMode)printf("IDLE On Throttle : RESET STATE\x0a"); + //if(DebugMode)printf("IDLE On Throttle : RESET STATE\x0a"); }else{ if(Throttle[IDLELON]) sIDLE = 1; else sIDLE = 0; if(GameMenuOnIDLE)ActKey(KEYON+PULSE+GameMenu); if(sIDLE){ ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, ThrottleLEDOnIDLE)); - if(DebugMode)printf("IDLE On Throttle : IDLE Mode [%d]\x0a", sIDLE); + //if(DebugMode)printf("IDLE On Throttle : IDLE Mode [%d]\x0a", sIDLE); if(ToggleIDLEonThrottleLED!=0 & ThrottleLEDOnIDLE!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleIDLEonThrottleLED)); // ToggleIDLEonThrottleLED ON }else{ ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, vThrottleLightBackup)); - if(DebugMode)printf("IDLE On Throttle : Active Mode [%d]\x0a", sIDLE); + //if(DebugMode)printf("IDLE On Throttle : Active Mode [%d]\x0a", sIDLE); if(ToggleIDLEonThrottleLED!=0 & ThrottleLEDOnIDLE!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleIDLEonThrottleLED)); // ToggleIDLEonThrottleLED OFF } } + if(DebugMode)printf("IDLE On Throttle [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sIDLE); } //TOGGLE: Enhanced Joystick Curves tailored for Flight Assist Off ONLY IF Rotational Correction is Enable @@ -323,14 +327,17 @@ if(Throttle[LTB]){ sRT=!sRT; if(RFlightThrootleGameMode){ActKey(KEYON+PULSE+ReverseThrottle);if(DebugMode)printf("Reverse Throttle Toggle\x0a");} - else{ActKey(KEYON+DOWN+ReverseThrottle);if(DebugMode)printf("Reverse Throttle Hold on\x0a");} + else{ActKey(KEYON+DOWN+ReverseThrottle); + //if(DebugMode)printf("Reverse Throttle Hold on\x0a"); + } }else{ if(!RFlightThrootleGameMode & sRT){ sRT=!sRT; ActKey(KEYON+UP+ReverseThrottle); - if(DebugMode)printf("Reverse Throttle Hold off\x0a"); + //if(DebugMode)printf("Reverse Throttle Hold off\x0a"); } } + if(DebugMode)printf("Reverse Throttle [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sRT ); } //--------------------------------------------------------------------------------------------------------------------------------------------------------------// @@ -386,25 +393,26 @@ vVoice=!vVoice; if(vVoice){ //Talk [Toggle] ActKey(KEYON+PULSE+vPTT); - if(DebugMode)printf("Mic Toggle Actived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); + //if(DebugMode)printf("Mic Toggle Actived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleVoicePTTLED)); // ToggleVoiceLED ON }else{ //Silence [Toggle} ActKey(KEYON+PULSE+vPTT); - if(DebugMode)printf("Mic Toggle DesActived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); + //if(DebugMode)printf("Mic Toggle DesActived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleVoicePTTLED)); // ToggleVoiceLED OFF } }else{ //Talk [HOLD] ActKey(KEYON+DOWN+vPTT); - if(DebugMode)printf("Mic Hold Actived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); + //if(DebugMode)printf("Mic Hold Actived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleVoicePTTLED)); // ToggleVoiceLED ON } } if(!Throttle[MSP] & sPPTMode){ //Silence [HOLD] vVoicePTT=!vVoicePTT; ActKey(KEYON+UP+vPTT); - if(DebugMode)printf("Mic Hold DesActived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); + //if(DebugMode)printf("Mic Hold DesActived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleVoicePTTLED)); // ToggleVoiceLED OFF } + if(DebugMode)printf("Mic Toggle [%d] [Actived[1] DesActived[0]; PTT [%d] [Internal:[0] External:[1]]; Mode [%d] [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); } //--------------------------------------------------------------------------------------------------------------------------------------------------------------// @@ -551,12 +559,12 @@ ActKey(KEYON+ CHAIN(PULSE+ BalancePower, D(),PIPfull, D(),PIPhalf, D(),PIPfull, D(),PIPMid, D(),PIPfull)); // Save the PIPS for Automatique PIP MOD RESET (OptimalPIPMode in Settings File) - if (x == ENG & y == SYS & z != MID){if(vOptimalPIP != 1) vOptimalPIP = 1;if(DebugMode)printf("Initialising PIP Commands 1? [%d]\x0a", vOptimalPIP);} - else if (x == ENG & y == WEP & z != MID){if(vOptimalPIP != 2) vOptimalPIP = 2;if(DebugMode)printf("Initialising PIP Commands 2? [%d]\x0a", vOptimalPIP);} - else if (x == SYS & y == ENG & z != MID){if(vOptimalPIP != 3) vOptimalPIP = 3;if(DebugMode)printf("Initialising PIP Commands 3? [%d]\x0a", vOptimalPIP);} - else if (x == SYS & y == WEP & z != MID){if(vOptimalPIP != 4) vOptimalPIP = 4;if(DebugMode)printf("Initialising PIP Commands 4? [%d]\x0a", vOptimalPIP);} - else if (x == WEP & y == ENG & z != MID){if(vOptimalPIP != 5) vOptimalPIP = 5;if(DebugMode)printf("Initialising PIP Commands 5? [%d]\x0a", vOptimalPIP);} - else if (x == WEP & y == SYS & z != MID){if(vOptimalPIP != 6) vOptimalPIP = 6;if(DebugMode)printf("Initialising PIP Commands 6? [%d]\x0a", vOptimalPIP);} - else if (x == WEP & y == SYS & z == MID){if(vOptimalPIP != 7) vOptimalPIP = 7;if(DebugMode)printf("Initialising PIP Commands 7? [%d]\x0a", vOptimalPIP);} - else if (x == WEP & y == ENG & z == MID){if(vOptimalPIP != 8) vOptimalPIP = 8;if(DebugMode)printf("Initialising PIP Commands 8? [%d]\x0a", vOptimalPIP);} + if (x == ENG & y == SYS & z != MID){if(vOptimalPIP != 1) vOptimalPIP = 1;if(DebugMode)printf("Initialising PIP Commands [%d]\x0a", vOptimalPIP);} + else if (x == ENG & y == WEP & z != MID){if(vOptimalPIP != 2) vOptimalPIP = 2;if(DebugMode)printf("Initialising PIP Commands [%d]\x0a", vOptimalPIP);} + else if (x == SYS & y == ENG & z != MID){if(vOptimalPIP != 3) vOptimalPIP = 3;if(DebugMode)printf("Initialising PIP Commands [%d]\x0a", vOptimalPIP);} + else if (x == SYS & y == WEP & z != MID){if(vOptimalPIP != 4) vOptimalPIP = 4;if(DebugMode)printf("Initialising PIP Commands [%d]\x0a", vOptimalPIP);} + else if (x == WEP & y == ENG & z != MID){if(vOptimalPIP != 5) vOptimalPIP = 5;if(DebugMode)printf("Initialising PIP Commands [%d]\x0a", vOptimalPIP);} + else if (x == WEP & y == SYS & z != MID){if(vOptimalPIP != 6) vOptimalPIP = 6;if(DebugMode)printf("Initialising PIP Commands [%d]\x0a", vOptimalPIP);} + else if (x == WEP & y == SYS & z == MID){if(vOptimalPIP != 7) vOptimalPIP = 7;if(DebugMode)printf("Initialising PIP Commands [%d]\x0a", vOptimalPIP);} + else if (x == WEP & y == ENG & z == MID){if(vOptimalPIP != 8) vOptimalPIP = 8;if(DebugMode)printf("Initialising PIP Commands [%d]\x0a", vOptimalPIP);} } \ No newline at end of file From f11742f26c240230460b69e06e3d4da7a3c2a235 Mon Sep 17 00:00:00 2001 From: Touille Date: Sun, 8 Jan 2017 14:44:31 +0100 Subject: [PATCH 4/5] Cleaning Code (Delete the Unused Debug Msg) ... 1rst Release Soon --- Thrustmaster Warthog Script/ED+HCS v2.2.tmc | 6 ---- .../ED+HCS v2.2_Functions.tmh | 36 ++----------------- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/Thrustmaster Warthog Script/ED+HCS v2.2.tmc b/Thrustmaster Warthog Script/ED+HCS v2.2.tmc index 09b3c57..dfb44a9 100644 --- a/Thrustmaster Warthog Script/ED+HCS v2.2.tmc +++ b/Thrustmaster Warthog Script/ED+HCS v2.2.tmc @@ -62,10 +62,6 @@ int main() // Initiate Custom & PIP Functions (ED+HCS_Macros_v2.2.tmh) initCustomCommands(); - // Initiate Combined Fire -// if(DebugMode)printf("Initialising Combined Fire\x0a"); -// initToggleCombinedFire(); - if(DebugMode){initPrintState();} //--------------------------------------------------------------------------------------------------------------------------------------------------------------// @@ -343,7 +339,6 @@ int main() //----------------------------------------------------------------------------------------------------------------------Set Throttle //Set Default Throttle Axis int initThrottleAxis(){ - //if(DebugMode)printf("Initialising Throttle Axis\x0a"); MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Right Throttle MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Left Throttle MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Friction Control Axis Curve (Sensor Range Zoom Scaling) @@ -352,7 +347,6 @@ int main() //Set Throttle Curve two different presets are selectable On The Fly (S3 + RED Button on Throttle Arm) int initSetThrottleCurves(){ - //if(DebugMode)printf("Initialising Throttle Curve\x0a"); vThrottleCurveProfile=!vThrottleCurveProfile; TrimDXAxis(DX_Z_AXIS, SET(0)); if(vThrottleCurveProfile)SetJCurve(&Throttle, THR_RIGHT, 50, 50); diff --git a/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh b/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh index e895192..08a5d0c 100644 --- a/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh +++ b/Thrustmaster Warthog Script/ED+HCS v2.2_Functions.tmh @@ -13,12 +13,10 @@ if(sGears & vLG){ vLG=!vLG; //Reset On The FLY : Just switch ActKey(KEYON+PULSE+LandingGear); - //if(DebugMode)printf("Landing Gear: DEPLOYED [%d]\x0a", sGears); if(ToggleLandingGearLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleLandingGearLED)); // ToggleLandingGearLED ON }else if (!sGears & !vLG){ vLG=!vLG; //Reset On The FLY : Just switch ActKey(KEYON+PULSE+LandingGear); - //if(DebugMode)printf("Landing Gear: RETRACTED [%d]\x0a", sGears); if(ToggleLandingGearLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleLandingGearLED)); // ToggleLandingGearLED OFF }else{ if(DebugMode)printf("Landing Gear Reset On The Fly\x0a"); @@ -38,12 +36,10 @@ if(sCargo & vCS){ vCS=!vCS; //Reset On The FLY : Just switch ActKey(KEYON+PULSE+CargoScoop); - //if(DebugMode)printf("Cargo Scoop: DEPLOYED [%d]\x0a", sCargo); if(ToggleCargoScoopLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleCargoScoopLED)); // ToggleCargoScoopLED ON }else if(!sCargo & !vCS){ vCS=!vCS; //Reset On The FLY : Just switch ActKey(KEYON+PULSE+CargoScoop); - //if(DebugMode)printf("Cargo Scoop: RETRACTED [%d]\x0a", sCargo); if(ToggleCargoScoopLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleCargoScoopLED)); // ToggleCargoScoopLED OFF }else{ if(DebugMode)printf("Cargo Scoop Reset On The Fly\x0a"); @@ -58,10 +54,8 @@ if (Throttle[EFRNORM]) sLights = 1; else sLights = 0; ActKey(KEYON+PULSE+ShipLights); if(sLights){ - //if(DebugMode)printf("Light: ON [%d]\x0a", sLights); if(ToggleLightsLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleLightsLED)); // ToggleLightsLED ON }else{ - //if(DebugMode)printf("Light: OFF [%d]\x0a", sLights); if(ToggleLightsLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleLightsLED)); // ToggleLightsLED OFF } } @@ -72,7 +66,6 @@ int initToggleHardpoints(){ if(Joystick[S3]){ sHardPoints=!sHardPoints; //reverse the flag status - //if(DebugMode)printf("HardPoints: State Reset\x0a"); } if(!Joystick[S3]){ //Reset On The FLY S3 + SWITCH if(vSecureEscapeFight){if(DebugMode)printf("HardPoints SecureEscapeFight [%d]\x0a", vSecureEscapeFight);} @@ -84,7 +77,6 @@ vOptimalPIPBackup = vOptimalPIP; ActKey(KEYON+PULSE+EXEC("initPIPPower(WEP,SYS);")); } - //if(DebugMode)printf("HardPoints: DEPLOYED [%d]\x0a", sHardPoints); if(ToggleHardpointsLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleHardpointsLED)); // ToggleHardpointsLED ON }else{ if(OptimalPIPMode){ @@ -99,7 +91,6 @@ if(vOptimalPIPBackup == 8)ActKey(KEYON+PULSE+EXEC("initPIPPower(WEP,ENG,MID);")); if(DebugMode)printf("HardPoints: Reset PIP Mode [%d]\x0a", vOptimalPIPBackup); } - //if(DebugMode)printf("HardPoints: RETRACTED [%d]\x0a", sHardPoints); if(ToggleHardpointsLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleHardpointsLED)); // ToggleHardpointsLED OFF } } @@ -111,11 +102,9 @@ sCombinedFire=!sCombinedFire; //reverse the flag status if(sCombinedFire){ MapKey(&Joystick, TG2, CHAIN(PrimaryFire, SecondaryFire)); - //if(DebugMode)printf("COMBINED Primary & Secondary Fire 1? [%d]\x0a", sCombinedFire); if(ToggleCombinedFireLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleCombinedFireLED)); // ToggleCombinedFireLED ON }else{ MapKey(&Joystick, TG2, 0); - //if(DebugMode)printf("SEPARATE Primary & Secondary Fire 0? [%d]\x0a", sCombinedFire); if(ToggleCombinedFireLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleCombinedFireLED)); // ToggleCombinedFireLED OFF } if(DebugMode)printf("Primary & Secondary Fire [%d] [COMBINED:[1] SEPARATE[0]]\x0a", sCombinedFire); @@ -125,14 +114,11 @@ int initToggleRotationCorrection(){ ActKey(KEYON+PULSE+RotationalCorrection); if(Joystick[S3]){ //Reset On The FLY S3 + SWITCH - //if(DebugMode)printf("Rotational Correction: RESET STATE\x0a"); }else{ sRCorrection=!sRCorrection; //reverse the flag status if(sRCorrection){ - //if(DebugMode)printf("Rotation Correction: ENABLED [%d]\x0a", sRCorrection); if(ToggleRCorrectionLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleRCorrectionLED)); // ToggleRotationCorrectionLED ON }else{ - //if(DebugMode)printf("Rotation Correction: DISABLED [%d]\x0a", sRCorrection); if(ToggleRCorrectionLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleRCorrectionLED)); // ToggleRotationCorrectionLED OFF } } @@ -146,10 +132,8 @@ if(sCameraMode){ ActKey(KEYON+PULSE+SetSpeed0); DeferCall(60, &ActKey, KEYON+PULSE+SPC); - //if(DebugMode)printf("Classified Camera Mode: ON [%d]\x0a", sCameraMode); if(ToggleCameraLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleCameraLED)); // ToggleCameraLED ON }else{ - //if(DebugMode)printf("Classified Camera Mode: OFF [%d]\x0a", sCameraMode); if(ToggleCameraLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleCameraLED)); // ToggleCameraLED OFF } if(DebugMode)printf("Classified Camera [%d] [ON:[1] OFF:[0]]\x0a", sCameraMode); @@ -180,10 +164,8 @@ int initToggleSuperCruiseMode(){ SupecruiseOnThrottle=!SupecruiseOnThrottle; // reverse the flag status if(SupecruiseOnThrottle){ - //if(DebugMode)printf("Supecruise On Throttle Mode: ON [%d]\x0a", SupecruiseOnThrottle); if(ToggleSuperCruiseModeLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleSuperCruiseModeLED)); // ToggleSuperCruiseModeLED ON }else{ - //if(DebugMode)printf("Supecruise On Throttle Mode: OFF [%d]\x0a", SupecruiseOnThrottle); if(ToggleSuperCruiseModeLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleSuperCruiseModeLED)); // ToggleSuperCruiseModeLED OFF } if(DebugMode)printf("Supecruise On Throttle [%d] [ON:[1] OFF:[0]]\x0a", SupecruiseOnThrottle); @@ -202,7 +184,6 @@ if(DebugMode)printf("Heat Sink On Silent Runing [%d] [ON:[1] OFF:[0]]\x0a", sSilentRuning); }else{ ActKey(KEYON+PULSE+SilentRunning); - //if(DebugMode)printf("Silent Runing [Toggle] Engaged [%d]\x0a", sSilentRuning); } if(ToggleSilentRuningLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleSilentRuningLED)); // ToggleSilentRuningLED ON } @@ -210,20 +191,17 @@ if(!sSL){ //Silent Runing [TOGGLE] Mode Second Pulse DisEngage sSilentRuning=!sSilentRuning; ActKey(KEYON+PULSE+SilentRunning); - //if(DebugMode)printf("Silent Runing [Toggle] DisEngaged [%d]\x0a", sSilentRuning); if(ToggleSilentRuningLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleSilentRuningLED)); // ToggleSilentRuningLED OFF } }else{ //Silent Runing [HOLD] Mode Engage sSilentRuning=!sSilentRuning; // reverse the flag status ActKey(KEYON+DOWN+SilentRunning); - //if(DebugMode)printf("Silent Runing [HOLD] Engaged [%d]\x0a", sSilentRuning); if(ToggleSilentRuningLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleSilentRuningLED)); // ToggleSilentRuningLED ON } } else if(!SilentRuningGameMode & sSilentRuning){ //Silent Runing [HOLD] Mode DisEngage sSilentRuning=!sSilentRuning; // reverse the flag status ActKey(KEYON+UP+SilentRunning); - //if(DebugMode)printf("Silent Runing [HOLD] DisEngaged [%d]\x0a", sSilentRuning); if(ToggleSilentRuningLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleSilentRuningLED)); // ToggleSilentRuningLED OFF } if(DebugMode)printf("Silent Runing [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sSilentRuning); @@ -247,22 +225,18 @@ //TOGGLE: Menu and LED OFF on Idle (Check PERSONAL SETTINGS in Settings File) int initToggleIDLEonThrottle(){ - if(Joystick[S3]){ //Reset On The FLY S3 + SWITCH - //if(DebugMode)printf("IDLE On Throttle : RESET STATE\x0a"); - }else{ + if(!Joystick[S3]){ //Reset On The FLY S3 + SWITCH if(Throttle[IDLELON]) sIDLE = 1; else sIDLE = 0; if(GameMenuOnIDLE)ActKey(KEYON+PULSE+GameMenu); if(sIDLE){ ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, ThrottleLEDOnIDLE)); - //if(DebugMode)printf("IDLE On Throttle : IDLE Mode [%d]\x0a", sIDLE); if(ToggleIDLEonThrottleLED!=0 & ThrottleLEDOnIDLE!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleIDLEonThrottleLED)); // ToggleIDLEonThrottleLED ON }else{ ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, vThrottleLightBackup)); - //if(DebugMode)printf("IDLE On Throttle : Active Mode [%d]\x0a", sIDLE); if(ToggleIDLEonThrottleLED!=0 & ThrottleLEDOnIDLE!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleIDLEonThrottleLED)); // ToggleIDLEonThrottleLED OFF } + if(DebugMode)printf("IDLE On Throttle [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sIDLE); } - if(DebugMode)printf("IDLE On Throttle [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sIDLE); } //TOGGLE: Enhanced Joystick Curves tailored for Flight Assist Off ONLY IF Rotational Correction is Enable @@ -328,13 +302,11 @@ sRT=!sRT; if(RFlightThrootleGameMode){ActKey(KEYON+PULSE+ReverseThrottle);if(DebugMode)printf("Reverse Throttle Toggle\x0a");} else{ActKey(KEYON+DOWN+ReverseThrottle); - //if(DebugMode)printf("Reverse Throttle Hold on\x0a"); } }else{ if(!RFlightThrootleGameMode & sRT){ sRT=!sRT; ActKey(KEYON+UP+ReverseThrottle); - //if(DebugMode)printf("Reverse Throttle Hold off\x0a"); } } if(DebugMode)printf("Reverse Throttle [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sRT ); @@ -393,23 +365,19 @@ vVoice=!vVoice; if(vVoice){ //Talk [Toggle] ActKey(KEYON+PULSE+vPTT); - //if(DebugMode)printf("Mic Toggle Actived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleVoicePTTLED)); // ToggleVoiceLED ON }else{ //Silence [Toggle} ActKey(KEYON+PULSE+vPTT); - //if(DebugMode)printf("Mic Toggle DesActived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleVoicePTTLED)); // ToggleVoiceLED OFF } }else{ //Talk [HOLD] ActKey(KEYON+DOWN+vPTT); - //if(DebugMode)printf("Mic Hold Actived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+ToggleVoicePTTLED)); // ToggleVoiceLED ON } } if(!Throttle[MSP] & sPPTMode){ //Silence [HOLD] vVoicePTT=!vVoicePTT; ActKey(KEYON+UP+vPTT); - //if(DebugMode)printf("Mic Hold DesActived [%d] PTT [Internal:[0] External:[1]] [%d] Mode [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); if(ToggleVoicePTTLED!=0)ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-ToggleVoicePTTLED)); // ToggleVoiceLED OFF } if(DebugMode)printf("Mic Toggle [%d] [Actived[1] DesActived[0]; PTT [%d] [Internal:[0] External:[1]]; Mode [%d] [Toggle:[0] PUSH:[1]] [%d]\x0a", vVoicePTT, sPTTState, sPPTMode); From f1ec162ef2400fcc7be7b6a32cef07ba560dc73c Mon Sep 17 00:00:00 2001 From: Touille Date: Sun, 8 Jan 2017 15:51:51 +0100 Subject: [PATCH 5/5] 2.2.1.5r --- ....2.2.1.8.binds => ED+HCS v2.2.5.1.8.binds} | 2 +- ...ult Keybinds - HCS Voice Packs 170101.html | 2492 ----------------- ...ollup-522.js.t\303\251l\303\251chargement" | 145 - .../css(1).php | 1 - .../css(2).php | 1 - .../css(3).php | 1 - .../css(4).php | 1 - .../css(5).php | 1 - .../css(6).php | 1 - .../css.php | 1 - ..._dropdown.js.t\303\251l\303\251chargement" | 11 - ...orizontal.js.t\303\251l\303\251chargement" | 11 - ...ollup-522.js.t\303\251l\303\251chargement" | 2467 ---------------- ...ollup-522.js.t\303\251l\303\251chargement" | 24 - .../image.php | Bin 8197 -> 0 bytes ...query.min.js.t\303\251l\303\251chargement" | 5 - .../login-form.html | 111 - ...login_md5.js.t\303\251l\303\251chargement" | 1 - .../logo.png | Bin 10458 -> 0 bytes .../HCS Default Keybinds ED 2.2.pdf | Bin 0 -> 41460 bytes ED+HCS v2.2.txt => ED+HCS v2.2.5.txt | 28 +- ... Thrustmaster Warthog Chart - Joystick.jpg | Bin 652298 -> 647071 bytes ... Thrustmaster Warthog Chart - Throttle.jpg | Bin 719714 -> 726600 bytes Thrustmaster Warthog Script/ED+HCS v2.2.tmc | 2 +- .../ED+HCS v2.2_Settings.tmh | 4 +- 25 files changed, 18 insertions(+), 5292 deletions(-) rename Default Keybinds - Elite Dangerous/{Warthog+HCS.2.2.1.8.binds => ED+HCS v2.2.5.1.8.binds} (99%) delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101.html delete mode 100644 "Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/conversation-rollup-522.js.t\303\251l\303\251chargement" delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/css(1).php delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/css(2).php delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/css(3).php delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/css(4).php delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/css(5).php delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/css(6).php delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/css.php delete mode 100644 "Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/css_b_comp_menu_dropdown.js.t\303\251l\303\251chargement" delete mode 100644 "Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/css_b_comp_menu_horizontal.js.t\303\251l\303\251chargement" delete mode 100644 "Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/footer-rollup-522.js.t\303\251l\303\251chargement" delete mode 100644 "Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/header-rollup-522.js.t\303\251l\303\251chargement" delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/image.php delete mode 100644 "Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/jquery.min.js.t\303\251l\303\251chargement" delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/login-form.html delete mode 100644 "Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/login_md5.js.t\303\251l\303\251chargement" delete mode 100644 Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/logo.png create mode 100644 Default Keybinds - HCS Voice Packs/HCS Default Keybinds ED 2.2.pdf rename ED+HCS v2.2.txt => ED+HCS v2.2.5.txt (54%) diff --git a/Default Keybinds - Elite Dangerous/Warthog+HCS.2.2.1.8.binds b/Default Keybinds - Elite Dangerous/ED+HCS v2.2.5.1.8.binds similarity index 99% rename from Default Keybinds - Elite Dangerous/Warthog+HCS.2.2.1.8.binds rename to Default Keybinds - Elite Dangerous/ED+HCS v2.2.5.1.8.binds index 752c59b..fa6de76 100644 --- a/Default Keybinds - Elite Dangerous/Warthog+HCS.2.2.1.8.binds +++ b/Default Keybinds - Elite Dangerous/ED+HCS v2.2.5.1.8.binds @@ -1,5 +1,5 @@ - + en-GB {NoDevice} diff --git a/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101.html b/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101.html deleted file mode 100644 index 58dc416..0000000 --- a/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101.html +++ /dev/null @@ -1,2492 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default Keybinds - HCS Voice Packs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
- - - -
- -
-
- -
-
- -
-
-
-
- -
-
- -
-
-
- - - -
- - -
- - - - - -
-
    - - - - - - - - - - - - - - - - - - - -
  • - Forums - - - - -
  • - - - - - - - - - -
  • - Blogs - - - - -
  • - - - - - - - - - -
  • - Articles - - - - -
  • - - - - - - - - - -
  • - Groups - - -
  • - - -
-
- - -
- - - -
- -
- - -
- - - - - - - - - - - - - - - - - - - -
    - - - - - -
  • If this is your first visit, be sure to - check out the FAQ by clicking the - link above. You may have to register - before you can post: click the register link above to proceed. To start viewing messages, - select the forum that you want to visit from the selection below.
  • - -
- - - - - - -
-
-
- - - -
- -
- - - - - - - - - - - - - -
- - -
- - - - - - -
- -

Announcement

- - - - -
- -
- - Collapse - -
- -
- - -
- - - No announcement yet. - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - -
- -

Default Keybinds

- - - - -
- -
- - Collapse - -
- -
- - - - - - -
- - -
-
- - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
This topic is closed.
X
- - -
This is a sticky topic.
X
- - -
X
-
- -
-
- -
-
- Collapse -
- - - -
- - -
- -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
    - - - - - - - -
  • - - - - - - - - - - - - - -
  • - - -
  • -
    -
    Filter
    -
    -
    -
  • - - - - -
-
- - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
    - - -
  • -
    Time
    -
    - - - - - - - - - - - - - - - - - - - - - -
    -
  • - - -
  • -
    Show
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
  • - - - - - - - - - - -
-
- - - - -
- -
- - - -
- Clear All -
-
new posts
- - - -
-
-
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - - - - - - - - - - - - - -
    -
    - - - - - -
    - -
    -
    -
    - - - - - - - - - - -
    -
    - -
    -
    - - - - - - - - - - - #1 - - - - - - - - -
    -
    - - -

    - - - Default Keybinds -

    - - - - - - - -
    -
    - -
    - -
    - - - -
    - - - - -
    - - - Here is a list of all the commands that Voice Attacks expects to be bound, and with what key as well. We do use modifier keys (ie Shift + L) so no need to put everything into upper case, this is just for display purposes, modifier keys will be listed when used
    - - - - - - - - - - - - - - -
    Category: Flight ThrustKeybinds
    Thrust LeftQ
    Thrust RightE
    Thrust UpR
    Thrust DownF
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Category: Flight ThrottleKeybinds
    Increase ThrottleW
    Decrease ThrottleS
    Set Speed to -100%Numpad -
    Set Speed to -75%Numpad 9
    Set Speed to -50%Numpad 8
    Set Speed to -25%Numpad 7
    Set Speed to 0%X
    Set Speed to 25%Numpad 1
    Set Speed to 50%Numpad 2
    Set Speed to 75%Numpad 3
    Set Speed to 100%Numpad +
    -
    -
    - - - - - - - - - - - - - - - - - -
    Category: Flight MiscellaneousKeybinds
    Toggle Flight AssistZ
    Engine BoostTab
    Toggle Frame Shift DriveJ
    SupercruiseNumpad /
    Toggle Orbit Lines=
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Category: TargetingKeybinds
    Select Target AheadT
    Cycle Next TargetG
    Cycle Previous ShipB
    Select Highest ThreatY
    Cycle Next Hostile TargetH
    Cycle Previous Hostile ShipN
    Select Wingman 18
    Select Wingman 29
    Select Wingman 30
    Select Wingman's TargetRight CTRL
    Winman Nav-LockRight Shift
    Cycle Next SubsystemI
    Cycle Previous SubsystemK
    Target Next System In RouteM
    -
    -
    - - - - - - - - - - - - - - - - - - - - -
    Category: WeaponsKeybinds
    Primary FireMouse 1
    Secondary FireMouse 2
    Cycle Next Fire Group. > key
    Cycle Previous Fire Group, < key
    Deploy HardpointsU
    Firing Deploys HardpointsOn
    -
    -
    - - - - - - - - -
    Category: CoolingKeybinds
    Silent RunningDelete
    Deploy Heat SinkV
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Category: MiscellaneousKeybinds
    Ship LightsInsert
    Increase Sensor ZoomPage Up
    Decrease Sensor ZoomPage Down
    Divert Power To EnginesUp Arrow
    Divert Power To WeaponsRight Arrow
    Divert Power To SystemsLeft Arrow
    Balance Power DistributionDown Arrow
    Reset HMD OrientationF12
    Cargo ScoopHome
    Jettison All CargoEnd
    Landing GearL
    Microphone Mute\ (Backslash)
    Use Shield Cell#
    Use Chaff LauncherC
    Classified Camera ToggleF1
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Category: Mode SwitchesKeybinds
    UI FocusLeft Shift
    UI Focus ModeDirection
    Target Panel1
    Comms Panel2
    Auto Focus On Text Input FieldOff
    Quick CommsEnter
    Role Panel3
    Systems Panel4
    Open Galaxy Map/ (forward slash)
    Open System Map;: key (semi colon)
    HeadlookMouse 3
    Game MenuP
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Category: Interface ModeKeybinds
    UI Panel UpW
    UI Panel DownS
    UI Panel LeftA
    UI Panel RightD
    UI Panel SelectSpace
    UI Panel BackBackspace
    Next Panel TabE
    Previous Panel TabQ
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Category: Galaxy MapKeybinds
    Galaxy Cam Pitch UpT
    Galaxy Cam Pitch DownG
    Galaxy Cam Yaw LeftQ
    Galaxy Cam Yaw RightE
    Galaxy Cam Translate ForwardW
    Galaxy Cam Translate BackwardS
    Galaxy Cam Translate LeftA
    Galaxy Cam Translate RightD
    Galaxy Cam Translate UpR
    Galaxy Cam Translate DownF
    Galaxy Cam Zoom InZ
    Galaxy Cam Zoom OutX
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Category: DrivingKeybinds
    Drive AssistZ
    Steering Left ButtonA
    Steering Right ButtonD
    Pitch Up ButtonW
    Pitch Down ButtonS
    Vertical ThrustersSpace
    SRV Primary FireMouse 1
    SRV Secondary FireMouse 2
    HandbrakeX
    HeadlightsInsert
    Toggle SRV TurretU
    -
    -
    - - - - - -
    Category: Driving TargettingKeybinds
    Select Target AheadT
    -
    -
    - - - - - - - - -
    Category: Drive ThrottleKeybinds
    Accelerate ButtonE
    Decelerate ButtonQ
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Category: Driving MiscellaneousKeybinds
    Divert Power To EnginesUp Arrow
    Divert Power To WeaponsRight Arrow
    Divert Power To SystemLeft Arrow
    Balance Power DistributionDown Arrow
    Cargo ScoopHome
    Jettison All CargoEnd
    Recall/Dismiss ShipLeft Alt + X
    Classified Camera ToggleF1
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Category: Driving Mode SwitchesKeybinds
    UI FocusLeft Shift
    Target Panel1
    Comms Panel2
    Quick CommsEnter
    Role Panel3
    Systems Panel4
    Open Galaxy Map/ (forward slash)
    Open System Map;: key (semi colon)
    HeadlookMouse 3
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -
    Fighter OrdersKeybinds
    Request Fighter DockLeft Alt + B
    Defensive BehaviourLeft Alt + D
    Aggressive BehaviourLeft Alt + A
    Focus TargetLeft Alt + T
    Hold FireLeft Alt + H
    Hold PositionLeft Alt + S
    FollowLeft Alt + F
    -
    -
    - -
    -
    - - - - - - - - - -
    - - - Last edited by Gangrel; 11-12-2016, 01:19 AM. - - - -
    - - - - -
    1) I reject your reality.... and substitute my own
    -2) Not to be used when upset... will void warranty
    -3) Stoke me a clipper i will be back for dinner
    -4) Never tell Gangrel to do anything... he will probably get it wrong
    -WARNING! Swedish wall-of-text hits you for bork-bork-bork damage!
    - - - -
    - - - - - - - - - - - - - - -
    - - - - -
    -
    -
    -
  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - - - - - - - - - - - - - -
    -
    - - - - - -
    - -
    -
    -
    - - - - - - - - - - -
    -
    - -
    -
    - - - - - - - - - - - - - #2 - - - - - -
    -
    - - - - - - - -
    -
    - -
    - -
    - - - -
    - - - - -
    - - - OP Updated with 2.2 binds - -
    -
    - - - - - - - - - - -
    1) I reject your reality.... and substitute my own
    -2) Not to be used when upset... will void warranty
    -3) Stoke me a clipper i will be back for dinner
    -4) Never tell Gangrel to do anything... he will probably get it wrong
    -WARNING! Swedish wall-of-text hits you for bork-bork-bork damage!
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    -

    Comment

    - - -
    - - -
    -
    - -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - -
    -
    - - -
    -
    -
      - - -
      - - - - -
      -
      -
      -
    • - - - - -
    -
    -
    - - - - - -
    - - - - -
    - - -
    - - - - - - - - -
    -
    - - -
    - -
    - -
    -
    - -
    - -
    -
    -
    - - -
    - -
    - - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - -
    -
    -
    -
    X
    -
    -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/conversation-rollup-522.js.t\303\251l\303\251chargement" "b/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/conversation-rollup-522.js.t\303\251l\303\251chargement" deleted file mode 100644 index d5fd010..0000000 --- "a/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/conversation-rollup-522.js.t\303\251l\303\251chargement" +++ /dev/null @@ -1,145 +0,0 @@ -// *************************** -// js.compressed/jquery/jquery.qtip.min.js -// *************************** -/* -* qTip2 - Pretty powerful tooltips -* http://craigsworks.com/projects/qtip2/ -* -* Version: nightly -* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com -* -* Dual licensed under MIT or GPLv2 licenses -* http://en.wikipedia.org/wiki/MIT_License -* http://en.wikipedia.org/wiki/GNU_General_Public_License -* -* Date: Mon Dec 19 15:43:28.0000000000 2011 -*//*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true *//*global window: false, jQuery: false, console: false */(function(a,b,c){function E(b){var c=this,d=b.elements,e=d.tooltip,f=".bgiframe-"+b.id;a.extend(c,{init:function(){d.bgiframe=a(''),d.bgiframe.appendTo(e),e.bind("tooltipmove"+f,c.adjust)},adjust:function(){var a=b.get("dimensions"),c=b.plugins.tip,f=d.tip,g,h;h=parseInt(e.css("border-left-width"),10)||0,h={left:-h,top:-h},c&&f&&(g=c.corner.precedance==="x"?["width","left"]:["height","top"],h[g[1]]-=f[g[0]]()),d.bgiframe.css(h).css(a)},destroy:function(){d.bgiframe.remove(),e.unbind(f)}}),c.init()}function D(c){var f=this,g=c.options.show.modal,i=c.elements,j=i.tooltip,k="#qtip-overlay",l=".qtipmodal",m=l+c.id,o="is-modal-qtip",q=a(document.body),r;c.checks.modal={"^show.modal.(on|blur)$":function(){f.init(),i.overlay.toggle(j.is(":visible"))}},a.extend(f,{init:function(){if(!g.on)return f;r=f.create(),j.attr(o,d).css("z-index",h.modal.zindex+a(n+"["+o+"]").length).unbind(l).unbind(m).bind("tooltipshow"+l+" tooltiphide"+l,function(b,c,d){var e=b.originalEvent;if(e&&b.type==="tooltiphide"&&/mouse(leave|enter)/.test(e.type)&&a(e.relatedTarget).closest(r[0]).length)try{b.preventDefault()}catch(g){}else(!e||e&&!e.solo)&&f[b.type.replace("tooltip","")](b,d)}).bind("tooltipfocus"+l,function(b){if(!b.isDefaultPrevented()){var c=a(n).filter("["+o+"]"),d=h.modal.zindex+c.length,e=parseInt(j[0].style.zIndex,10);r[0].style.zIndex=d-1,c.each(function(){this.style.zIndex>e&&(this.style.zIndex-=1)}),c.end().filter("."+p).qtip("blur",b.originalEvent),j.addClass(p)[0].style.zIndex=d;try{b.preventDefault()}catch(f){}}}).bind("tooltiphide"+l,function(b){a("["+o+"]").filter(":visible").not(j).last().qtip("focus",b)}),g.escape&&a(b).unbind(m).bind("keydown"+m,function(a){a.keyCode===27&&j.hasClass(p)&&c.hide(a)}),g.blur&&i.overlay.unbind(m).bind("click"+m,function(a){j.hasClass(p)&&c.hide(a)});return f},create:function(){var c=a(k);if(c.length)return i.overlay=c.insertAfter(a(n).last());r=i.overlay=a("
    ",{id:k.substr(1),html:"
    ",mousedown:function(){return e}}).insertAfter(a(n).last()),a(b).unbind(l).bind("resize"+l,function(){r.css({height:a(b).height(),width:a(b).width()})}).triggerHandler("resize");return r},toggle:function(b,c,h){if(b&&b.isDefaultPrevented())return f;var i=g.effect,k=c?"show":"hide",l=r.is(":visible"),p=a("["+o+"]").filter(":visible").not(j),s;r||(r=f.create());if(r.is(":animated")&&l===c||!c&&p.length)return f;c?(r.css({left:0,top:0}),r.toggleClass("blurs",g.blur),q.bind("focusin"+m,function(b){var c=a(b.target),d=c.closest(".qtip"),f=d.length<1?e:parseInt(d[0].style.zIndex,10)>parseInt(j[0].style.zIndex,10);!f&&a(b.target).closest(n)[0]!==j[0]&&j.find("input:visible").filter(":first").focus()})):q.undelegate("*","focusin"+m),r.stop(d,e),a.isFunction(i)?i.call(r,c):i===e?r[k]():r.fadeTo(parseInt(h,10)||90,c?1:0,function(){c||a(this).hide()}),c||r.queue(function(a){r.css({left:"",top:""}),a()});return f},show:function(a,b){return f.toggle(a,d,b)},hide:function(a,b){return f.toggle(a,e,b)},destroy:function(){var d=r;d&&(d=a("["+o+"]").not(j).length<1,d?(i.overlay.remove(),a(b).unbind(l)):i.overlay.unbind(l+c.id),q.undelegate("*","focusin"+m));return j.removeAttr(o).unbind(l)}}),f.init()}function C(b,g){function w(a){var b=a.precedance==="y",c=n[b?"width":"height"],d=n[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function v(b){var c=k.titlebar&&b.y==="top",d=c?k.titlebar:k.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(l.css(h),10)||0}function u(a,b,c){b=b?b:a[a.precedance];var d=l.hasClass(r),e=k.titlebar&&a.y==="top",f=e?k.titlebar:k.content,g="border-"+b+"-width",h;l.addClass(r),h=parseInt(f.css(g),10),h=(c?h||parseInt(l.css(g),10):h)||0,l.toggleClass(r,d);return h}function t(a,f,g,h){if(k.tip){var l=i.corner.clone(),n=g.adjusted,o=b.options.position.adjust.method.split(" "),p=o[0],q=o[1]||o[0],r={left:e,top:e,x:0,y:0},s,t={},u;i.corner.fixed!==d&&(p==="shift"&&l.precedance==="x"&&n.left&&l.y!=="center"?l.precedance=l.precedance==="x"?"y":"x":p==="flip"&&n.left&&(l.x=l.x==="center"?n.left>0?"left":"right":l.x==="left"?"right":"left"),q==="shift"&&l.precedance==="y"&&n.top&&l.x!=="center"?l.precedance=l.precedance==="y"?"x":"y":q==="flip"&&n.top&&(l.y=l.y==="center"?n.top>0?"top":"bottom":l.y==="top"?"bottom":"top"),l.string()!==m.corner.string()&&(m.top!==n.top||m.left!==n.left)&&i.update(l,e)),s=i.position(l,n),s.right!==c&&(s.left=-s.right),s.bottom!==c&&(s.top=-s.bottom),s.user=Math.max(0,j.offset);if(r.left=p==="shift"&&!!n.left)l.x==="center"?t["margin-left"]=r.x=s["margin-left"]-n.left:(u=s.right!==c?[n.left,-s.left]:[-n.left,s.left],(r.x=Math.max(u[0],u[1]))>u[0]&&(g.left-=n.left,r.left=e),t[s.right!==c?"right":"left"]=r.x);if(r.top=q==="shift"&&!!n.top)l.y==="center"?t["margin-top"]=r.y=s["margin-top"]-n.top:(u=s.bottom!==c?[n.top,-s.top]:[-n.top,s.top],(r.y=Math.max(u[0],u[1]))>u[0]&&(g.top-=n.top,r.top=e),t[s.bottom!==c?"bottom":"top"]=r.y);k.tip.css(t).toggle(!(r.x&&r.y||l.x==="center"&&r.y||l.y==="center"&&r.x)),g.left-=s.left.charAt?s.user:p!=="shift"||r.top||!r.left&&!r.top?s.left:0,g.top-=s.top.charAt?s.user:q!=="shift"||r.left||!r.left&&!r.top?s.top:0,m.left=n.left,m.top=n.top,m.corner=l.clone()}}var i=this,j=b.options.style.tip,k=b.elements,l=k.tooltip,m={top:0,left:0},n={width:j.width,height:j.height},o={},p=j.border||0,q=".qtip-tip",s=!!(a("")[0]||{}).getContext;i.mimic=i.corner=f,i.border=p,i.offset=j.offset,i.size=n,b.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){i.init()||i.destroy(),b.reposition()},"^style.tip.(height|width)$":function(){n={width:j.width,height:j.height},i.create(),i.update(),b.reposition()},"^content.title.text|style.(classes|widget)$":function(){k.tip&&i.update()}},a.extend(i,{init:function(){var b=i.detectCorner()&&(s||a.browser.msie);b&&(i.create(),i.update(),l.unbind(q).bind("tooltipmove"+q,t));return b},detectCorner:function(){var a=j.corner,c=b.options.position,f=c.at,g=c.my.string?c.my.string():c.my;if(a===e||g===e&&f===e)return e;a===d?i.corner=new h.Corner(g):a.string||(i.corner=new h.Corner(a),i.corner.fixed=d);return i.corner.string()!=="centercenter"},detectColours:function(c){var d,e,f,g=k.tip.css("cssText",""),h=c||i.corner,m=h[h.precedance],p="border-"+m+"-color",q="border"+m.charAt(0)+m.substr(1)+"Color",s=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,t="background-color",u="transparent",v=" !important",w=a(document.body).css("color"),x=b.elements.content.css("color"),y=k.titlebar&&(h.y==="top"||h.y==="center"&&g.position().top+n.height/2+j.offset",{"class":"ui-tooltip-tip"}).css({width:b,height:c}).prependTo(l),s?a("").appendTo(k.tip)[0].getContext("2d").save():(d='',k.tip.html(d+d),a("*",k.tip).bind("click mousedown",function(a){a.stopPropagation()}))},update:function(b,c){var g=k.tip,l=g.children(),q=n.width,r=n.height,t="px solid ",v="px dashed transparent",x=j.mimic,y=Math.round,z,A,C,D,E;b||(b=m.corner||i.corner),x===e?x=b:(x=new h.Corner(x),x.precedance=b.precedance,x.x==="inherit"?x.x=b.x:x.y==="inherit"?x.y=b.y:x.x===x.y&&(x[b.precedance]=b[b.precedance])),z=x.precedance,i.detectColours(b),o.border!=="transparent"&&o.border!=="#123456"?(p=u(b,f,d),j.border===0&&p>0&&(o.fill=o.border),i.border=p=j.border!==d?j.border:p):i.border=p=0,C=B(x,q,r),i.size=E=w(b),g.css(E),b.precedance==="y"?D=[y(x.x==="left"?p:x.x==="right"?E.width-q-p:(E.width-q)/2),y(x.y==="top"?E.height-r:0)]:D=[y(x.x==="left"?E.width-q:0),y(x.y==="top"?p:x.y==="bottom"?E.height-r-p:(E.height-r)/2)],s?(l.attr(E),A=l[0].getContext("2d"),A.restore(),A.save(),A.clearRect(0,0,3e3,3e3),A.translate(D[0],D[1]),A.beginPath(),A.moveTo(C[0][0],C[0][1]),A.lineTo(C[1][0],C[1][1]),A.lineTo(C[2][0],C[2][1]),A.closePath(),A.fillStyle=o.fill,A.strokeStyle=o.border,A.lineWidth=p*2,A.lineJoin="miter",A.miterLimit=100,p&&A.stroke(),A.fill()):(C="m"+C[0][0]+","+C[0][1]+" l"+C[1][0]+","+C[1][1]+" "+C[2][0]+","+C[2][1]+" xe",D[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,l.css({antialias:""+(x.string().indexOf("center")>-1),left:D[0]-D[2]*Number(z==="x"),top:D[1]-D[2]*Number(z==="y"),width:q+p,height:r+p}).each(function(b){var c=a(this);c[c.prop?"prop":"attr"]({coordsize:q+p+" "+(r+p),path:C,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&c.html()===""&&c.html('')})),c!==e&&i.position(b)},position:function(b){var c=k.tip,f={},g=Math.max(0,j.offset),h,l,m;if(j.corner===e||!c)return e;b=b||i.corner,h=b.precedance,l=w(b),m=[b.x,b.y],h==="x"&&m.reverse(),a.each(m,function(a,c){var e,i;c==="center"?(e=h==="y"?"left":"top",f[e]="50%",f["margin-"+e]=-Math.round(l[h==="y"?"width":"height"]/2)+g):(e=u(b,c,d),i=v(b),f[c]=a?p?u(b,c):0:g+(i>e?i:0))}),f[b[h]]-=l[h==="x"?"width":"height"],c.css({top:"",bottom:"",left:"",right:"",margin:""}).css(f);return f},destroy:function(){k.tip&&k.tip.remove(),l.unbind(q)}}),m.corner=new h.Corner(i.init())}function B(a,b,c){var d=Math.ceil(b/2),e=Math.ceil(c/2),f={bottomright:[[0,0],[b,c],[b,0]],bottomleft:[[0,0],[b,0],[0,c]],topright:[[0,c],[b,0],[b,c]],topleft:[[0,0],[0,c],[b,c]],topcenter:[[0,c],[d,0],[b,c]],bottomcenter:[[0,0],[b,0],[d,c]],rightcenter:[[0,0],[b,e],[0,c]],leftcenter:[[b,0],[b,c],[0,e]]};f.lefttop=f.bottomright,f.righttop=f.bottomleft,f.leftbottom=f.topright,f.rightbottom=f.topleft;return f[a.string()]}function A(b){var c=this,f=b.elements.tooltip,g=b.options.content.ajax,h=".qtip-ajax",i=/)<[^<]*)*<\/script>/gi,j=d;b.checks.ajax={"^content.ajax":function(a,b,d){b==="ajax"&&(g=d),b==="once"?c.init():g&&g.url?c.load():f.unbind(h)}},a.extend(c,{init:function(){g&&g.url&&f.unbind(h)[g.once?"one":"bind"]("tooltipshow"+h,c.load);return c},load:function(d,f){function p(a,c,d){a.status!==0&&b.set("content.text",c+": "+d)}function o(c){k&&(c=a("
    ").append(c.replace(i,"")).find(k)),b.set("content.text",c)}function n(){l&&(b.show(d.originalEvent),f=e),a.isFunction(g.complete)&&g.complete.apply(this,arguments)}var h=g.url.indexOf(" "),j=g.url,k,l=g.once&&!g.loading&&f;if(l)try{d.preventDefault()}catch(m){}else if(d&&d.isDefaultPrevented())return c;h>-1&&(k=j.substr(h),j=j.substr(0,h)),a.ajax(a.extend({success:o,error:p,context:b},g,{url:j,complete:n}))}}),c.init()}function z(b,c){var i,j,k,l,m,n=a(this),o=a(document.body),p=this===document?o:n,q=n.metadata?n.metadata(c.metadata):f,r=c.metadata.type==="html5"&&q?q[c.metadata.name]:f,s=n.data(c.metadata.name||"qtipopts");try{s=typeof s==="string"?(new Function("return "+s))():s}catch(t){w("Unable to parse HTML5 attribute data: "+s)}l=a.extend(d,{},g.defaults,c,typeof s==="object"?x(s):f,x(r||q)),j=l.position,l.id=b;if("boolean"===typeof l.content.text){k=n.attr(l.content.attr);if(l.content.attr!==e&&k)l.content.text=k;else{w("Unable to locate content for tooltip! Aborting render of tooltip on element: ",n);return e}}j.container.length||(j.container=o),j.target===e&&(j.target=p),l.show.target===e&&(l.show.target=p),l.show.solo===d&&(l.show.solo=o),l.hide.target===e&&(l.hide.target=p),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)n.qtip("destroy");else if(l.overwrite===e)return e;l.suppress&&(m=a.attr(this,"title"))&&a(this).removeAttr("title").attr(u,m),i=new y(n,l,b,!!k),a.data(this,"qtip",i),n.bind("remove.qtip-"+b,function(){i.destroy()});return i}function y(s,t,w,y){function R(){var c=[t.show.target[0],t.hide.target[0],z.rendered&&G.tooltip[0],t.position.container[0],t.position.viewport[0],b,document];z.rendered?a([]).pushStack(a.grep(c,function(a){return typeof a==="object"})).unbind(F):t.show.target.unbind(F+"-create")}function Q(){function p(a){E.is(":visible")&&z.reposition(a)}function o(a){if(E.hasClass(m))return e;clearTimeout(z.timers.inactive),z.timers.inactive=setTimeout(function(){z.hide(a)},t.hide.inactive)}function l(b){if(E.hasClass(m)||C||D)return e;var d=a(b.relatedTarget||b.target),g=d.closest(n)[0]===E[0],h=d[0]===f.show[0];clearTimeout(z.timers.show),clearTimeout(z.timers.hide);if(c.target==="mouse"&&g||t.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(g||h)))try{b.preventDefault(),b.stopImmediatePropagation()}catch(i){}else t.hide.delay>0?z.timers.hide=setTimeout(function(){z.hide(b)},t.hide.delay):z.hide(b)}function k(a){if(E.hasClass(m))return e;clearTimeout(z.timers.show),clearTimeout(z.timers.hide);var b=function(){z.toggle(d,a)};t.show.delay>0?z.timers.show=setTimeout(b,t.show.delay):b()}var c=t.position,f={show:t.show.target,hide:t.hide.target,viewport:a(c.viewport),document:a(document),body:a(document.body),window:a(b)},h={show:a.trim(""+t.show.event).split(" "),hide:a.trim(""+t.hide.event).split(" ")},j=a.browser.msie&&parseInt(a.browser.version,10)===6;E.bind("mouseenter"+F+" mouseleave"+F,function(a){var b=a.type==="mouseenter";b&&z.focus(a),E.toggleClass(q,b)}),t.hide.fixed&&(f.hide=f.hide.add(E),E.bind("mouseover"+F,function(){E.hasClass(m)||clearTimeout(z.timers.hide)})),/mouse(out|leave)/i.test(t.hide.event)?t.hide.leave==="window"&&f.window.bind("mouseout"+F+" blur"+F,function(a){/select|option/.test(a.target)&&!a.relatedTarget&&z.hide(a)}):/mouse(over|enter)/i.test(t.show.event)&&f.hide.bind("mouseleave"+F,function(a){clearTimeout(z.timers.show)}),(""+t.hide.event).indexOf("unfocus")>-1&&f.body.bind("mousedown"+F,function(b){var c=a(b.target),d=!E.hasClass(m)&&E.is(":visible");c[0]!==E[0]&&c.parents(n).length===0&&c.add(s).length>1&&!c.attr("disabled")&&z.hide(b)}),"number"===typeof t.hide.inactive&&(f.show.bind("qtip-"+w+"-inactive",o),a.each(g.inactiveEvents,function(a,b){f.hide.add(G.tooltip).bind(b+F+"-inactive",o)})),a.each(h.hide,function(b,c){var d=a.inArray(c,h.show),e=a(f.hide);d>-1&&e.add(f.show).length===e.length||c==="unfocus"?(f.show.bind(c+F,function(a){E.is(":visible")?l(a):k(a)}),delete h.show[d]):f.hide.bind(c+F,l)}),a.each(h.show,function(a,b){f.show.bind(b+F,k)}),"number"===typeof t.hide.distance&&f.show.add(E).bind("mousemove"+F,function(a){var b=H.origin||{},c=t.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&z.hide(a)}),c.target==="mouse"&&(f.show.bind("mousemove"+F,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),c.adjust.mouse&&(t.hide.event&&E.bind("mouseleave"+F,function(a){(a.relatedTarget||a.target)!==f.show[0]&&z.hide(a)}),f.document.bind("mousemove"+F,function(a){!E.hasClass(m)&&E.is(":visible")&&z.reposition(a||i)}))),(c.adjust.resize||f.viewport.length)&&(a.event.special.resize?f.viewport:f.window).bind("resize"+F,p),(f.viewport.length||j&&E.css("position")==="fixed")&&f.viewport.bind("scroll"+F,p)}function P(b,d){function g(b){function i(c){c&&(delete h[c.src],clearTimeout(z.timers.img[c.src]),a(c).unbind(F)),a.isEmptyObject(h)&&(z.redraw(),d!==e&&z.reposition(H.event),b())}var g,h={};if((g=f.find("img:not([height]):not([width])")).length===0)return i();g.each(function(b,d){if(h[d.src]===c){var e=0,f=3;(function g(){if(d.height||d.width||e>f)return i(d);e+=1,z.timers.img[d.src]=setTimeout(g,700)})(),a(d).bind("error"+F+" load"+F,function(){i(this)}),h[d.src]=d}})}var f=G.content;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),z.rendered<0?E.queue("fx",g):(D=0,g(a.noop));return z}function O(b,c){var d=G.title;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z));if(b===e)return K(e);b.jquery&&b.length>0?d.empty().append(b.css({display:"block"})):d.html(b),z.redraw(),c!==e&&z.rendered&&E.is(":visible")&&z.reposition(H.event)}function N(a){var b=G.button,c=G.title;if(!z.rendered)return e;a?(c||M(),L()):b.remove()}function M(){var b=B+"-title";G.titlebar&&K(),G.titlebar=a("
    ",{"class":k+"-titlebar "+(t.style.widget?"ui-widget-header":"")}).append(G.title=a("
    ",{id:b,"class":k+"-title","aria-atomic":d})).insertBefore(G.content).delegate(".ui-tooltip-close","mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}).delegate(".ui-tooltip-close","mouseover mouseout",function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseover")}),t.content.title.button?L():z.rendered&&z.redraw()}function L(){var b=t.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";G.button&&G.button.remove(),b.jquery?G.button=b:G.button=a("",{"class":"ui-state-default ui-tooltip-close "+(t.style.widget?"":k+"-icon"),title:d,"aria-label":d}).prepend(a("",{"class":"ui-icon ui-icon-close",html:"×"})),G.button.appendTo(G.titlebar).attr("role","button").click(function(a){E.hasClass(m)||z.hide(a);return e}),z.redraw()}function K(a){G.title&&(G.titlebar.remove(),G.titlebar=G.title=G.button=f,a!==e&&z.reposition())}function J(){var a=t.style.widget;E.toggleClass(l,a).toggleClass(o,t.style["default"]&&!a),G.content.toggleClass(l+"-content",a),G.titlebar&&G.titlebar.toggleClass(l+"-header",a),G.button&&G.button.toggleClass(k+"-icon",!a)}function I(a){var b=0,c,d=t,e=a.split(".");while(d=d[e[b++]])b0&&!a("#"+i).length&&(E[0].id=i,G.content[0].id=i+"-content",G.title[0].id=i+"-title")},"^content.text$":function(a,b,c){P(c)},"^content.title.text$":function(a,b,c){if(!c)return K();!G.title&&c&&M(),O(c)},"^content.title.button$":function(a,b,c){N(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){z.rendered&&E.appendTo(c)},"^show.ready$":function(){z.rendered?z.toggle(d):z.render(1)},"^style.classes$":function(a,b,c){E.attr("class",k+" qtip ui-helper-reset "+c)},"^style.widget|content.title":J,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){E[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=t.position;E.attr("tracking",a.target==="mouse"&&a.adjust.mouse),R(),Q()}},a.extend(z,{render:function(b){if(z.rendered)return z;var c=t.content.text,f=t.content.title.text,g=t.position,i=a.Event("tooltiprender");a.attr(s[0],"aria-describedby",B),E=G.tooltip=a("
    ",{id:B,"class":k+" qtip ui-helper-reset "+o+" "+t.style.classes+" "+k+"-pos-"+t.position.my.abbrev(),width:t.style.width||"",height:t.style.height||"",tracking:g.target==="mouse"&&g.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":B+"-content","aria-hidden":d}).toggleClass(m,H.disabled).data("qtip",z).appendTo(t.position.container).append(G.content=a("
    ",{"class":k+"-content",id:B+"-content","aria-atomic":d})),z.rendered=-1,C=D=1,f&&(M(),a.isFunction(f)||O(f,e)),a.isFunction(c)||P(c,e),z.rendered=d,J(),a.each(t.events,function(b,c){a.isFunction(c)&&E.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(z)}),Q(),E.queue("fx",function(a){i.originalEvent=H.event,E.trigger(i,[z]),C=D=0,z.redraw(),(t.show.ready||b)&&z.toggle(d,H.event,e),a()});return z},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:E.outerHeight(),width:E.outerWidth()};break;case"offset":b=h.offset(E,t.position.container);break;default:c=I(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(z,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=z.checks,l;"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=I(c.toLowerCase()),f;f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j}),x(t),C=D=1,a.each(b,m),C=D=0,E.is(":visible")&&z.rendered&&(i&&z.reposition(t.position.target==="mouse"?f:H.event),j&&z.redraw());return z},toggle:function(b,c){function q(){b?(a.browser.msie&&E[0].style.removeAttribute("filter"),E.css("overflow",""),"string"===typeof h.autofocus&&a(h.autofocus,E).focus(),p=a.Event("tooltipvisible"),p.originalEvent=c?H.event:f,E.trigger(p,[z]),h.target.trigger("qtip-"+w+"-inactive")):E.css({display:"",visibility:"",opacity:"",left:"",top:""})}if(!z.rendered)return b?z.render(1):z;var g=b?"show":"hide",h=t[g],j=E.is(":visible"),k=!c||t[g].target.length<2||H.target[0]===c.target,l=t.position,m=t.content,o,p;(typeof b).search("boolean|number")&&(b=!j);if(!E.is(":animated")&&j===b&&k)return z;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(H.event.type)&&c.target===t.show.target[0]&&E.has(c.relatedTarget).length)return z;H.event=a.extend({},c)}p=a.Event("tooltip"+g),p.originalEvent=c?H.event:f,E.trigger(p,[z,90]);if(p.isDefaultPrevented())return z;a.attr(E[0],"aria-hidden",!b),b?(H.origin=a.extend({},i),z.focus(c),a.isFunction(m.text)&&P(m.text,e),a.isFunction(m.title.text)&&O(m.title.text,e),!v&&l.target==="mouse"&&l.adjust.mouse&&(a(document).bind("mousemove.qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),v=d),z.reposition(c,arguments[2]),(p.solo=!!h.solo)&&a(n,h.solo).not(E).qtip("hide",p)):(clearTimeout(z.timers.show),delete H.origin,v&&!a(n+'[tracking="true"]:visible',h.solo).not(E).length&&(a(document).unbind("mousemove.qtip"),v=e),z.blur(c)),k&&E.stop(0,1),h.effect===e?(E[g](),q.call(E)):a.isFunction(h.effect)?(h.effect.call(E,z),E.queue("fx",function(a){q(),a()})):E.fadeTo(90,b?1:0,q),b&&h.target.trigger("qtip-"+w+"-inactive");return z},show:function(a){return z.toggle(d,a)},hide:function(a){return z.toggle(e,a)},focus:function(b){if(!z.rendered)return z;var c=a(n),d=parseInt(E[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;E.hasClass(p)||(i=a.Event("tooltipfocus"),i.originalEvent=f,E.trigger(i,[z,e]),i.isDefaultPrevented()||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+p).qtip("blur",f)),E.addClass(p)[0].style.zIndex=e));return z},blur:function(b){var c=a.extend({},b),d;E.removeClass(p),d=a.Event("tooltipblur"),d.originalEvent=c,E.trigger(d,[z]);return z},reposition:function(c,d){if(!z.rendered||C)return z;C=1;var f=t.position.target,g=t.position,j=g.my,l=g.at,m=g.adjust,n=m.method.split(" "),o=E.outerWidth(),p=E.outerHeight(),q=0,r=0,s=a.Event("tooltipmove"),u=E.css("position")==="fixed",v=g.viewport,w={left:0,top:0},x=g.container,y=e,B=z.plugins.tip,D={horizontal:n[0],vertical:n[1]=n[1]||n[0],enabled:v.jquery&&f[0]!==b&&f[0]!==A&&m.method!=="none",left:function(a){var b=D.horizontal==="shift",c=-x.offset.left+v.offset.left+v.scrollLeft,d=j.x==="left"?o:j.x==="right"?-o:-o/2,e=l.x==="left"?q:l.x==="right"?-q:-q/2,f=B&&B.size?B.size.width||0:0,g=B&&B.corner&&B.corner.precedance==="x"&&!b?f:0,h=c-a+g,i=a+o-v.width-c+g,k=d-(j.precedance==="x"||j.x===j.y?e:0),n=j.x==="center";b?(g=B&&B.corner&&B.corner.precedance==="y"?f:0,k=(j.x==="left"?1:-1)*d-g,w.left+=h>0?h:i>0?-i:0,w.left=Math.max(-x.offset.left+v.offset.left+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.left+v.offset.left+v.width,a+k),w.left))):(h>0&&(j.x!=="left"||i>0)?w.left-=k:i>0&&(j.x!=="right"||h>0)&&(w.left-=n?-k:k),w.left!==a&&n&&(w.left-=m.x),w.lefti&&(w.left=a));return w.left-a},top:function(a){var b=D.vertical==="shift",c=-x.offset.top+v.offset.top+v.scrollTop,d=j.y==="top"?p:j.y==="bottom"?-p:-p/2,e=l.y==="top"?r:l.y==="bottom"?-r:-r/2,f=B&&B.size?B.size.height||0:0,g=B&&B.corner&&B.corner.precedance==="y"&&!b?f:0,h=c-a+g,i=a+p-v.height-c+g,k=d-(j.precedance==="y"||j.x===j.y?e:0),n=j.y==="center";b?(g=B&&B.corner&&B.corner.precedance==="x"?f:0,k=(j.y==="top"?1:-1)*d-g,w.top+=h>0?h:i>0?-i:0,w.top=Math.max(-x.offset.top+v.offset.top+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.top+v.offset.top+v.height,a+k),w.top))):(h>0&&(j.y!=="top"||i>0)?w.top-=k:i>0&&(j.y!=="bottom"||h>0)&&(w.top-=n?-k:k),w.top!==a&&n&&(w.top-=m.y),w.top<0&&-w.top>i&&(w.top=a));return w.top-a}},F;if(a.isArray(f)&&f.length===2)l={x:"left",y:"top"},w={left:f[0],top:f[1]};else if(f==="mouse"&&(c&&c.pageX||H.event.pageX))l={x:"left",y:"top"},c=(c&&(c.type==="resize"||c.type==="scroll")?H.event:c&&c.pageX&&c.type==="mousemove"?c:i&&i.pageX&&(m.mouse||!c||!c.pageX)?{pageX:i.pageX,pageY:i.pageY}:!m.mouse&&H.origin&&H.origin.pageX?H.origin:c)||c||H.event||i||{},w={top:c.pageY,left:c.pageX};else{f==="event"?c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=H.target=a(c.target):f=H.target:H.target=a(f),f=a(f).eq(0);if(f.length===0)return z;f[0]===document||f[0]===b?(q=h.iOS?b.innerWidth:f.width(),r=h.iOS?b.innerHeight:f.height(),f[0]===b&&(w={top:u||h.iOS?(v||f).scrollTop():0,left:u||h.iOS?(v||f).scrollLeft():0})):f.is("area")&&h.imagemap?w=h.imagemap(f,l,D.enabled?n:e):f[0].namespaceURI==="http://www.w3.org/2000/svg"&&h.svg?w=h.svg(f,l):(q=f.outerWidth(),r=f.outerHeight(),w=h.offset(f,x)),w.offset&&(q=w.width,r=w.height,y=w.flipoffset,w=w.offset);if(h.iOS<4.1&&h.iOS>3.1||h.iOS==4.3||!h.iOS&&u)F=a(b),w.left-=F.scrollLeft(),w.top-=F.scrollTop();w.left+=l.x==="right"?q:l.x==="center"?q/2:0,w.top+=l.y==="bottom"?r:l.y==="center"?r/2:0}w.left+=m.x+(j.x==="right"?-o:j.x==="center"?-o/2:0),w.top+=m.y+(j.y==="bottom"?-p:j.y==="center"?-p/2:0),D.enabled?(v={elem:v,height:v[(v[0]===b?"h":"outerH")+"eight"](),width:v[(v[0]===b?"w":"outerW")+"idth"](),scrollLeft:u?0:v.scrollLeft(),scrollTop:u?0:v.scrollTop(),offset:v.offset()||{left:0,top:0}},x={elem:x,scrollLeft:x.scrollLeft(),scrollTop:x.scrollTop(),offset:x.offset()||{left:0,top:0}},w.adjusted={left:D.horizontal!=="none"?D.left(w.left):0,top:D.vertical!=="none"?D.top(w.top):0},w.adjusted.left+w.adjusted.top&&E.attr("class",E[0].className.replace(/ui-tooltip-pos-\w+/i,k+"-pos-"+j.abbrev())),y&&w.adjusted.left&&(w.left+=y.left),y&&w.adjusted.top&&(w.top+=y.top)):w.adjusted={left:0,top:0},s.originalEvent=a.extend({},c),E.trigger(s,[z,w,v.elem||v]);if(s.isDefaultPrevented())return z;delete w.adjusted,d===e||isNaN(w.left)||isNaN(w.top)||f==="mouse"||!a.isFunction(g.effect)?E.css(w):a.isFunction(g.effect)&&(g.effect.call(E,z,a.extend({},w)),E.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})),C=0;return z},redraw:function(){if(z.rendered<1||D)return z;var a=t.position.container,b,c,d,e;D=1,t.style.height&&E.css("height",t.style.height),t.style.width?E.css("width",t.style.width):(E.css("width","").addClass(r),c=E.width()+1,d=E.css("max-width")||"",e=E.css("min-width")||"",b=(d+e).indexOf("%")>-1?a.width()/100:0,d=(d.indexOf("%")>-1?b:1)*parseInt(d,10)||c,e=(e.indexOf("%")>-1?b:1)*parseInt(e,10)||0,c=d+e?Math.min(Math.max(c,e),d):c,E.css("width",Math.round(c)).removeClass(r)),D=0;return z},disable:function(b){"boolean"!==typeof b&&(b=!E.hasClass(m)&&!H.disabled),z.rendered?(E.toggleClass(m,b),a.attr(E[0],"aria-disabled",b)):H.disabled=!!b;return z},enable:function(){return z.disable(e)},destroy:function(){var b=s[0],c=a.attr(b,u),d=s.data("qtip");z.rendered&&(E.remove(),a.each(z.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(z.timers.show),clearTimeout(z.timers.hide),R();if(!d||z===d)a.removeData(b,"qtip"),t.suppress&&c&&(a.attr(b,"title",c),s.removeAttr(u)),s.removeAttr("aria-describedby");s.unbind(".qtip-"+w),delete j[z.id];return s}})}function x(b){var c;if(!b||"object"!==typeof b)return e;if(b.metadata===f||"object"!==typeof b.metadata)b.metadata={type:b.metadata};if("content"in b){if(b.content===f||"object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e);if("title"in b.content){if(b.content.title===f||"object"!==typeof b.content.title)b.content.title={text:b.content.title};c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e)}}if("position"in b)if(b.position===f||"object"!==typeof b.position)b.position={my:b.position,at:b.position};if("show"in b)if(b.show===f||"object"!==typeof b.show)b.show.jquery?b.show={target:b.show}:b.show={event:b.show};if("hide"in b)if(b.hide===f||"object"!==typeof b.hide)b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide};if("style"in b)if(b.style===f||"object"!==typeof b.style)b.style={classes:b.style};a.each(h,function(){this.sanitize&&this.sanitize(b)});return b}function w(){w.history=w.history||[],w.history.push(arguments);if("object"===typeof console){var a=console[console.warn?"warn":"log"],b=Array.prototype.slice.call(arguments),c;typeof arguments[0]==="string"&&(b[0]="qTip2: "+b[0]),c=a.apply?a.apply(console,b):a(b)}}"use strict";var d=!0,e=!1,f=null,g,h,i,j={},k="ui-tooltip",l="ui-widget",m="ui-state-disabled",n="div.qtip."+k,o=k+"-default",p=k+"-focus",q=k+"-hover",r=k+"-fluid",s="-31000px",t="_replacedByqTip",u="oldtitle",v;g=a.fn.qtip=function(b,h,i){var j=(""+b).toLowerCase(),k=f,l=a.makeArray(arguments).slice(1),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&n||j==="api")return n;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;m&&m.timeStamp&&(b.cache.event=m);if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);else if(a.isPlainObject(h)||i!==c)b.set(h,i);else{k=b.get(h);return e}});return k!==f?k:this}if("object"===typeof b||!arguments.length){n=x(a.extend(d,{},b));return g.bind.call(this,n,m)}},g.bind=function(b,f){return this.each(function(k){function r(b){function d(){p.render(typeof b==="object"||l.show.ready),m.show.add(m.hide).unbind(o)}if(p.cache.disabled)return e;p.cache.event=a.extend({},b),p.cache.target=b?a(b.target):[c],l.show.delay>0?(clearTimeout(p.timers.show),p.timers.show=setTimeout(d,l.show.delay),n.show!==n.hide&&m.hide.bind(n.hide,function(){clearTimeout(p.timers.show)})):d()}var l,m,n,o,p,q;q=a.isArray(b.id)?b.id[k]:b.id,q=!q||q===e||q.length<1||j[q]?g.nextid++:j[q]=q,o=".qtip-"+q+"-create",p=z.call(this,q,b);if(p===e)return d;l=p.options,a.each(h,function(){this.initialize==="initialize"&&this(p)}),m={show:l.show.target,hide:l.hide.target},n={show:a.trim(""+l.show.event).replace(/ /g,o+" ")+o,hide:a.trim(""+l.hide.event).replace(/ /g,o+" ")+o},/mouse(over|enter)/i.test(n.show)&&!/mouse(out|leave)/i.test(n.hide)&&(n.hide+=" mouseleave"+o),m.show.bind("mousemove"+o,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),m.show.bind(n.show,r),(l.show.ready||l.prerender)&&r(f)})},h=g.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();var b=a.charAt(0);this.precedance=b==="t"||b==="b"?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbrev=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b},this.clone=function(){return{x:this.x,y:this.y,precedance:this.precedance,string:this.string,abbrev:this.abbrev,clone:this.clone}}},offset:function(a,b){function i(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}var c=a.offset(),d=b,e=0,f=document.body,g,h;if(d){do{d.css("position")!=="static"&&(g=d[0]===f?{left:parseInt(d.css("left"),10)||0,top:parseInt(d.css("top"),10)||0}:d.position(),c.left-=g.left+(parseInt(d.css("borderLeftWidth"),10)||0)+(parseInt(d.css("marginLeft"),10)||0),c.top-=g.top+(parseInt(d.css("borderTopWidth"),10)||0),h=d.css("overflow"),(h==="scroll"||h==="auto")&&++e);if(d[0]===f)break}while(d=d.offsetParent());b[0]!==f&&e&&i(b,1)}return c},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e&&f&&"object"===typeof f&&f.options.suppress){if(arguments.length<2)return a.attr(d,u);f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c);return this.attr(u,c)}}return a.fn["attr"+t].apply(this,arguments)},clone:function(b){var c=a([]),d="title",e=a.fn["clone"+t].apply(this,arguments);b||e.filter("["+u+"]").attr("title",function(){return a.attr(this,u)}).removeAttr(u);return e},remove:a.ui?f:function(b,c){a.ui||a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}},a.each(h.fn,function(b,c){if(!c||a.fn[b+t])return d;var e=a.fn[b+t]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),g.version="nightly",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.defaults={prerender:e,id:e,overwrite:d,suppress:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d,method:"flip flip"},effect:function(b,c,d){a(this).animate(c,{duration:200,queue:e})}},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e,autofocus:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e,leave:"window",distance:e},style:{classes:"",widget:e,width:e,height:e,"default":d},events:{render:f,move:f,show:f,hide:f,toggle:f,visible:f,focus:f,blur:f}},h.ajax=function(a){var b=a.plugins.ajax;return"object"===typeof b?b:a.plugins.ajax=new A(a)},h.ajax.initialize="render",h.ajax.sanitize=function(a){var b=a.content,c;b&&"ajax"in b&&(c=b.ajax,typeof c!=="object"&&(c=a.content.ajax={url:c}),"boolean"!==typeof c.once&&c.once&&(c.once=!!c.once))},a.extend(d,g.defaults,{content:{ajax:{loading:d,once:d}}}),h.imagemap=function(b,c,d){function n(a,b,c){var d=0,e=1,f=1,g=0,h=0,i=a.width,j=a.height;while(i>0&&j>0&&e>0&&f>0){i=Math.floor(i/2),j=Math.floor(j/2),c.x==="left"?e=i:c.x==="right"?e=a.width-i:e+=Math.floor(i/2),c.y==="top"?f=j:c.y==="bottom"?f=a.height-j:f+=Math.floor(j/2),d=b.length;while(d--){if(b.length<2)break;g=b[d][0]-a.offset.left,h=b[d][1]-a.offset.top,(c.x==="left"&&g>=e||c.x==="right"&&g<=e||c.x==="center"&&(ga.width-e)||c.y==="top"&&h>=f||c.y==="bottom"&&h<=f||c.y==="center"&&(ha.height-f))&&b.splice(d,1)}}return{left:b[0][0],top:b[0][1]}}b.jquery||(b=a(b));var e=(b[0].shape||b.attr("shape")).toLowerCase(),f=(b[0].coords||b.attr("coords")).split(","),g=[],h=a('img[usemap="#'+b.parent("map").attr("name")+'"]'),i=h.offset(),j={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},k=0,l=0,m;i.left+=Math.ceil((h.outerWidth()-h.width())/2),i.top+=Math.ceil((h.outerHeight()-h.height())/2);if(e==="poly"){k=f.length;while(k--)l=[parseInt(f[--k],10),parseInt(f[k+1],10)],l[0]>j.offset.right&&(j.offset.right=l[0]),l[0]j.offset.bottom&&(j.offset.bottom=l[1]),l[1]H){var N=J-H,K=M-N;D.css("left",K-1)}}},0)}var C=$.fn.qtip;$.fn.qtip=function(){if(typeof arguments[0]=="object"){if(typeof arguments[0].events=="undefined"){arguments[0].events={}}if(typeof arguments[0].events.move=="function"){arguments[0].events.move=vBulletin.runBeforeCallback(arguments[0].events.move,B)}else{arguments[0].events.move=B}}return C.apply(this,arguments)}})();$(".js-tooltip[title]").qtip({style:{classes:"ui-tooltip-shadow"}});if(vBulletin.options.get("threadpreview")>0&&(($(".channel-content-widget").length>0&&$(".channel-content-widget").eq(0).attr("data-canviewtopiccontent"))||$(".search-results-widget").length>0)){var A=function(){var B=$(this);if(B.data("vb-qtip-preview-initialized")=="1"){return }B.data("vb-qtip-preview-initialized","1");var C=B.closest(".topic-item").attr("data-node-id")||B.closest(".js-post").attr("data-node-id");B.qtip({content:{text:function(E,D){console.log("Qtip fetching topic preview.");if(C){$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/fetch-node-preview?nodeid="+C,type:"POST",dataType:"json"}).done(function(F){if(typeof (F)!="string"&&typeof (F[0])=="string"){F=F[0]}if($.trim(F)!=""){var G='
    '+F+"
    ";D.set("content.text",G)}else{var G='
    '+vBulletin.phrase.get("no_preview_text_available")+"
    ";D.set("content.text",G)}}).fail(function(H,F,G){D.set("content.text",F+": "+G)});return vBulletin.phrase.get("loading")}else{return'
    '+vBulletin.phrase.get("no_preview_text_available")+"
    "}}},show:{delay:500},position:{my:"top left",at:"bottom right",viewport:$(window)},style:{classes:"ui-tooltip-shadow ui-tooltip-rounded b-topicpreview"}});console.log("Qtip topic preview initialized.");B.trigger("mouseover")};$(document).off("mouseover",".topic-list-container .topic-title, .conversation-list .post-title, .conversation-list .b-post__title").on("mouseover",".topic-list-container .topic-title, .conversation-list .post-title, .conversation-list .b-post__title",A)}})();; - -// *************************** -// js.compressed/jquery/jquery-ui-timepicker-addon.min.js -// *************************** -/* - * jQuery timepicker addon - * By: Trent Richardson [http://trentrichardson.com] - * Version 1.1.1 - * Last Modified: 11/07/2012 - * - * Copyright 2012 Trent Richardson - * You may use this project under MIT or GPL licenses. - * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt - * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt - */ - -/*jslint evil: true, white: false, undef: false, nomen: false */ -(function($){$.ui.timepicker=$.ui.timepicker||{};if($.ui.timepicker.version){return}$.extend($.ui,{timepicker:{version:"1.1.1"}});function Timepicker(){this.regional=[];this.regional['']={currentText:'Now',closeText:'Done',amNames:['AM','A'],pmNames:['PM','P'],timeFormat:'HH:mm',timeSuffix:'',timeOnlyTitle:'Choose Time',timeText:'Time',hourText:'Hour',minuteText:'Minute',secondText:'Second',millisecText:'Millisecond',timezoneText:'Time Zone',isRTL:false};this._defaults={showButtonPanel:true,timeOnly:false,showHour:true,showMinute:true,showSecond:false,showMillisec:false,showTimezone:false,showTime:true,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,hour:0,minute:0,second:0,millisec:0,timezone:null,useLocalTimezone:false,defaultTimezone:"+0000",hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,alwaysSetTime:true,separator:' ',altFieldTimeOnly:true,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:true,timezoneIso8601:false,timezoneList:null,addSliderAccess:false,sliderAccessArgs:null,controlType:'slider',defaultValue:null,parse:'strict'};$.extend(this._defaults,this.regional[''])}$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,timezone:null,defaultTimezone:"+0000",hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,ampm:'',formattedDate:'',formattedTime:'',formattedDateTime:'',timezoneList:null,units:['hour','minute','second','millisec'],control:null,setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_newInst:function($input,o){var tp_inst=new Timepicker(),inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults){if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr('time:'+attrName);if(attrValue){try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}}overrides={beforeShow:function(input,dp_inst){if($.isFunction(tp_inst._defaults.evnts.beforeShow)){return tp_inst._defaults.evnts.beforeShow.call($input[0],input,dp_inst,tp_inst)}},onChangeMonthYear:function(year,month,dp_inst){tp_inst._updateDateTime(dp_inst);if($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)){tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],year,month,dp_inst,tp_inst)}},onClose:function(dateText,dp_inst){if(tp_inst.timeDefined===true&&$input.val()!==''){tp_inst._updateDateTime(dp_inst)}if($.isFunction(tp_inst._defaults.evnts.onClose)){tp_inst._defaults.evnts.onClose.call($input[0],dateText,dp_inst,tp_inst)}}};for(i in overrides){if(overrides.hasOwnProperty(i)){fns[i]=o[i]||null}}tp_inst._defaults=$.extend({},this._defaults,inlineSettings,o,overrides,{evnts:fns,timepicker:tp_inst});tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(val){return val.toUpperCase()});tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(val){return val.toUpperCase()});if(typeof(tp_inst._defaults.controlType)==='string'){if($.fn[tp_inst._defaults.controlType]===undefined){tp_inst._defaults.controlType='select'}tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]}else{tp_inst.control=tp_inst._defaults.controlType}if(tp_inst._defaults.timezoneList===null){var timezoneList=['-1200','-1100','-1000','-0930','-0900','-0800','-0700','-0600','-0500','-0430','-0400','-0330','-0300','-0200','-0100','+0000','+0100','+0200','+0300','+0330','+0400','+0430','+0500','+0530','+0545','+0600','+0630','+0700','+0800','+0845','+0900','+0930','+1000','+1030','+1100','+1130','+1200','+1245','+1300','+1400'];if(tp_inst._defaults.timezoneIso8601){timezoneList=$.map(timezoneList,function(val){return val=='+0000'?'Z':(val.substring(0,3)+':'+val.substring(3))})}tp_inst._defaults.timezoneList=timezoneList}tp_inst.timezone=tp_inst._defaults.timezone;tp_inst.hour=tp_inst._defaults.hour;tp_inst.minute=tp_inst._defaults.minute;tp_inst.second=tp_inst._defaults.second;tp_inst.millisec=tp_inst._defaults.millisec;tp_inst.ampm='';tp_inst.$input=$input;if(o.altField){tp_inst.$altInput=$(o.altField).css({cursor:'pointer'}).focus(function(){$input.trigger("focus")})}if(tp_inst._defaults.minDate===0||tp_inst._defaults.minDateTime===0){tp_inst._defaults.minDate=new Date()}if(tp_inst._defaults.maxDate===0||tp_inst._defaults.maxDateTime===0){tp_inst._defaults.maxDate=new Date()}if(tp_inst._defaults.minDate!==undefined&&tp_inst._defaults.minDate instanceof Date){tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())}if(tp_inst._defaults.minDateTime!==undefined&&tp_inst._defaults.minDateTime instanceof Date){tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())}if(tp_inst._defaults.maxDate!==undefined&&tp_inst._defaults.maxDate instanceof Date){tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())}if(tp_inst._defaults.maxDateTime!==undefined&&tp_inst._defaults.maxDateTime instanceof Date){tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())}tp_inst.$input.bind('focus',function(){tp_inst._onFocus()});return tp_inst},_addTimePicker:function(dp_inst){var currDT=(this.$altInput&&this._defaults.altFieldTimeOnly)?this.$input.val()+' '+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(currDT);this._limitMinMaxDateTime(dp_inst,false);this._injectTimePicker()},_parseTime:function(timeString,withDate){if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}if(withDate||!this._defaults.timeOnly){var dp_dateFormat=$.datepicker._get(this.inst,'dateFormat');try{var parseRes=parseDateTimeInternal(dp_dateFormat,this._defaults.timeFormat,timeString,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!parseRes.timeObj){return false}$.extend(this,parseRes.timeObj)}catch(err){$.datepicker.log("Error parsing the date/time string: "+err+"\ndate/time string = "+timeString+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+dp_dateFormat);return false}return true}else{var timeObj=$.datepicker.parseTime(this._defaults.timeFormat,timeString,this._defaults);if(!timeObj){return false}$.extend(this,timeObj);return true}},_injectTimePicker:function(){var $dp=this.inst.dpDiv,o=this.inst.settings,tp_inst=this,litem='',uitem='',max={},gridSize={},size=null;if($dp.find("div.ui-timepicker-div").length===0&&o.showTimepicker){var noDisplay=' style="display:none;"',html='
    '+'
    '+o.timeText+'
    '+'
    ';for(var i=0,l=this.units.length;i'+o[litem+'Text']+''+'
    ';if(o['show'+uitem]&&o[litem+'Grid']>0){html+='
    ';if(litem=='hour'){for(var h=o[litem+'Min'];h<=max[litem];h+=parseInt(o[litem+'Grid'],10)){gridSize[litem]++;var tmph=$.datepicker.formatTime(useAmpm(o.pickerTimeFormat||o.timeFormat)?'hht':'HH',{hour:h},o);html+=''}}else{for(var m=o[litem+'Min'];m<=max[litem];m+=parseInt(o[litem+'Grid'],10)){gridSize[litem]++;html+=''}}html+='
    '+tmph+''+((m<10)?'0':'')+m+'
    '}html+='
    '}html+='
    '+o.timezoneText+'
    ';html+='
    ';html+='
    ';var $tp=$(html);if(o.timeOnly===true){$tp.prepend('
    '+'
    '+o.timeOnlyTitle+'
    '+'
    ');$dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide()}for(var i=0,l=tp_inst.units.length;i0){size=100*gridSize[litem]*o[litem+'Grid']/(max[litem]-o[litem+'Min']);$tp.find('.ui_tpicker_'+litem+' table').css({width:size+"%",marginLeft:o.isRTL?'0':((size/(-2*gridSize[litem]))+"%"),marginRight:o.isRTL?((size/(-2*gridSize[litem]))+"%"):'0',borderCollapse:'collapse'}).find("td").click(function(e){var $t=$(this),h=$t.html(),n=parseInt(h.replace(/[^0-9]/g),10),ap=h.replace(/[^apm]/ig),f=$t.data('for');if(f=='hour'){if(ap.indexOf('p')!==-1&&n<12){n+=12}else{if(ap.indexOf('a')!==-1&&n===12){n=0}}}tp_inst.control.value(tp_inst,tp_inst[f+'_slider'],litem,n);tp_inst._onTimeChange();tp_inst._onSelectHandler()}).css({cursor:'pointer',width:(100/gridSize[litem])+'%',textAlign:'center',overflow:'hidden'})}}this.timezone_select=$tp.find('.ui_tpicker_timezone').append('').find("select");$.fn.append.apply(this.timezone_select,$.map(o.timezoneList,function(val,idx){return $("
    ");this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++o.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(event,dx){return{width:this.originalSize.width+dx}},w:function(event,dx){var cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx}},n:function(event,dx,dy){var cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy}},s:function(event,dx,dy){return{height:this.originalSize.height+dy}},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]);(n!=="resize"&&this._trigger(n,event,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});$.ui.plugin.add("resizable","animate",{stop:function(event){var that=$(this).resizable("instance"),o=that.options,pr=that._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&that._hasScroll(pr[0],"left")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,style={width:(that.size.width-soffsetw),height:(that.size.height-soffseth)},left=(parseInt(that.element.css("left"),10)+(that.position.left-that.originalPosition.left))||null,top=(parseInt(that.element.css("top"),10)+(that.position.top-that.originalPosition.top))||null;that.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseInt(that.element.css("width"),10),height:parseInt(that.element.css("height"),10),top:parseInt(that.element.css("top"),10),left:parseInt(that.element.css("left"),10)};if(pr&&pr.length){$(pr[0]).css({width:data.width,height:data.height})}that._updateCache(data);that._propagate("resize",event)}})}});$.ui.plugin.add("resizable","containment",{start:function(){var element,p,co,ch,cw,width,height,that=$(this).resizable("instance"),o=that.options,el=that.element,oc=o.containment,ce=(oc instanceof $)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;if(!ce){return }that.containerElement=$(ce);if(/document/.test(oc)||oc===document){that.containerOffset={left:0,top:0};that.containerPosition={left:0,top:0};that.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight}}else{element=$(ce);p=[];$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=that._num(element.css("padding"+name))});that.containerOffset=element.offset();that.containerPosition=element.position();that.containerSize={height:(element.innerHeight()-p[3]),width:(element.innerWidth()-p[1])};co=that.containerOffset;ch=that.containerSize.height;cw=that.containerSize.width;width=(that._hasScroll(ce,"left")?ce.scrollWidth:cw);height=(that._hasScroll(ce)?ce.scrollHeight:ch);that.parentData={element:ce,left:co.left,top:co.top,width:width,height:height}}},resize:function(event){var woset,hoset,isParent,isOffsetRelative,that=$(this).resizable("instance"),o=that.options,co=that.containerOffset,cp=that.position,pRatio=that._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=that.containerElement,continueResize=true;if(ce[0]!==document&&(/static/).test(ce.css("position"))){cop=co}if(cp.left<(that._helper?co.left:0)){that.size.width=that.size.width+(that._helper?(that.position.left-co.left):(that.position.left-cop.left));if(pRatio){that.size.height=that.size.width/that.aspectRatio;continueResize=false}that.position.left=o.helper?co.left:0}if(cp.top<(that._helper?co.top:0)){that.size.height=that.size.height+(that._helper?(that.position.top-co.top):that.position.top);if(pRatio){that.size.width=that.size.height*that.aspectRatio;continueResize=false}that.position.top=that._helper?co.top:0}isParent=that.containerElement.get(0)===that.element.parent().get(0);isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position"));if(isParent&&isOffsetRelative){that.offset.left=that.parentData.left+that.position.left;that.offset.top=that.parentData.top+that.position.top}else{that.offset.left=that.element.offset().left;that.offset.top=that.element.offset().top}woset=Math.abs(that.sizeDiff.width+(that._helper?that.offset.left-cop.left:(that.offset.left-co.left)));hoset=Math.abs(that.sizeDiff.height+(that._helper?that.offset.top-cop.top:(that.offset.top-co.top)));if(woset+that.size.width>=that.parentData.width){that.size.width=that.parentData.width-woset;if(pRatio){that.size.height=that.size.width/that.aspectRatio;continueResize=false}}if(hoset+that.size.height>=that.parentData.height){that.size.height=that.parentData.height-hoset;if(pRatio){that.size.width=that.size.height*that.aspectRatio;continueResize=false}}if(!continueResize){that.position.left=that.prevPosition.left;that.position.top=that.prevPosition.top;that.size.width=that.prevSize.width;that.size.height=that.prevSize.height}},stop:function(){var that=$(this).resizable("instance"),o=that.options,co=that.containerOffset,cop=that.containerPosition,ce=that.containerElement,helper=$(that.helper),ho=helper.offset(),w=helper.outerWidth()-that.sizeDiff.width,h=helper.outerHeight()-that.sizeDiff.height;if(that._helper&&!o.animate&&(/relative/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}if(that._helper&&!o.animate&&(/static/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}}});$.ui.plugin.add("resizable","alsoResize",{start:function(){var that=$(this).resizable("instance"),o=that.options;$(o.alsoResize).each(function(){var el=$(this);el.data("ui-resizable-alsoresize",{width:parseInt(el.width(),10),height:parseInt(el.height(),10),left:parseInt(el.css("left"),10),top:parseInt(el.css("top"),10)})})},resize:function(event,ui){var that=$(this).resizable("instance"),o=that.options,os=that.originalSize,op=that.originalPosition,delta={height:(that.size.height-os.height)||0,width:(that.size.width-os.width)||0,top:(that.position.top-op.top)||0,left:(that.position.left-op.left)||0};$(o.alsoResize).each(function(){var el=$(this),start=$(this).data("ui-resizable-alsoresize"),style={},css=el.parents(ui.originalElement[0]).length?["width","height"]:["width","height","top","left"];$.each(css,function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0){style[prop]=sum||null}});el.css(style)})},stop:function(){$(this).removeData("resizable-alsoresize")}});$.ui.plugin.add("resizable","ghost",{start:function(){var that=$(this).resizable("instance"),o=that.options,cs=that.size;that.ghost=that.originalElement.clone();that.ghost.css({opacity:0.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof o.ghost==="string"?o.ghost:"");that.ghost.appendTo(that.helper)},resize:function(){var that=$(this).resizable("instance");if(that.ghost){that.ghost.css({position:"relative",height:that.size.height,width:that.size.width})}},stop:function(){var that=$(this).resizable("instance");if(that.ghost&&that.helper){that.helper.get(0).removeChild(that.ghost.get(0))}}});$.ui.plugin.add("resizable","grid",{resize:function(){var outerDimensions,that=$(this).resizable("instance"),o=that.options,cs=that.size,os=that.originalSize,op=that.originalPosition,a=that.axis,grid=typeof o.grid==="number"?[o.grid,o.grid]:o.grid,gridX=(grid[0]||1),gridY=(grid[1]||1),ox=Math.round((cs.width-os.width)/gridX)*gridX,oy=Math.round((cs.height-os.height)/gridY)*gridY,newWidth=os.width+ox,newHeight=os.height+oy,isMaxWidth=o.maxWidth&&(o.maxWidthnewWidth),isMinHeight=o.minHeight&&(o.minHeight>newHeight);o.grid=grid;if(isMinWidth){newWidth+=gridX}if(isMinHeight){newHeight+=gridY}if(isMaxWidth){newWidth-=gridX}if(isMaxHeight){newHeight-=gridY}if(/^(se|s|e)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight}else{if(/^(ne)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;that.position.top=op.top-oy}else{if(/^(sw)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;that.position.left=op.left-ox}else{if(newHeight-gridY<=0||newWidth-gridX<=0){outerDimensions=that._getPaddingPlusBorderDimensions(this)}if(newHeight-gridY>0){that.size.height=newHeight;that.position.top=op.top-oy}else{newHeight=gridY-outerDimensions.height;that.size.height=newHeight;that.position.top=op.top+os.height-newHeight}if(newWidth-gridX>0){that.size.width=newWidth;that.position.left=op.left-ox}else{newWidth=gridX-outerDimensions.width;that.size.width=newWidth;that.position.left=op.left+os.width-newWidth}}}}}});var resizable=$.ui.resizable; -/* - * jQuery UI Sortable 1.11.4 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/sortable/ - */ -var sortable=$.widget("ui.sortable",$.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:false,options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(x,reference,size){return(x>=reference)&&(x<(reference+size))},_isFloating:function(item){return(/left|right/).test(item.css("float"))||(/inline|table-cell/).test(item.css("display"))},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.offset=this.element.offset();this._mouseInit();this._setHandleClassName();this.ready=true},_setOption:function(key,value){this._super(key,value);if(key==="handle"){this._setHandleClassName()}},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle");$.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--){this.items[i].item.removeData(this.widgetName+"-item")}return this},_mouseCapture:function(event,overrideHandle){var currentItem=null,validHandle=false,that=this;if(this.reverting){return false}if(this.options.disabled||this.options.type==="static"){return false}this._refreshItems(event);$(event.target).parents().each(function(){if($.data(this,that.widgetName+"-item")===that){currentItem=$(this);return false}});if($.data(event.target,that.widgetName+"-item")===that){currentItem=$(event.target)}if(!currentItem){return false}if(this.options.handle&&!overrideHandle){$(this.options.handle,currentItem).find("*").addBack().each(function(){if(this===event.target){validHandle=true}});if(!validHandle){return false}}this.currentItem=currentItem;this._removeCurrentsFromItems();return true},_mouseStart:function(event,overrideHandle,noActivation){var i,body,o=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!==this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(o.containment){this._setContainment()}if(o.cursor&&o.cursor!=="auto"){body=this.document.find("body");this.storedCursor=body.css("cursor");body.css("cursor",o.cursor);this.storedStylesheet=$("").appendTo(body)}if(o.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",o.opacity)}if(o.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",o.zIndex)}if(this.scrollParent[0]!==this.document[0]&&this.scrollParent[0].tagName!=="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!noActivation){for(i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,this._uiHash(this))}}if($.ui.ddmanager){$.ui.ddmanager.current=this}if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true},_mouseDrag:function(event){var i,item,itemElement,intersection,o=this.options,scrolled=false;this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){if(this.scrollParent[0]!==this.document[0]&&this.scrollParent[0].tagName!=="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY=0;i--){item=this.items[i];itemElement=item.item[0];intersection=this._intersectsWithPointer(item);if(!intersection){continue}if(item.instance!==this.currentContainer){continue}if(itemElement!==this.currentItem[0]&&this.placeholder[intersection===1?"next":"prev"]()[0]!==itemElement&&!$.contains(this.placeholder[0],itemElement)&&(this.options.type==="semi-dynamic"?!$.contains(this.element[0],itemElement):true)){this.direction=intersection===1?"down":"up";if(this.options.tolerance==="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item)}else{break}this._trigger("change",event,this._uiHash());break}}this._contactContainers(event);if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(event,noPropagation){if(!event){return }if($.ui.ddmanager&&!this.options.dropBehaviour){$.ui.ddmanager.drop(this,event)}if(this.options.revert){var that=this,cur=this.placeholder.offset(),axis=this.options.axis,animation={};if(!axis||axis==="x"){animation.left=cur.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)}if(!axis||axis==="y"){animation.top=cur.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)}this.reverting=true;$(this.helper).animate(animation,parseInt(this.options.revert,10)||500,function(){that._clear(event)})}else{this._clear(event,noPropagation)}return false},cancel:function(){if(this.dragging){this._mouseUp({target:null});if(this.options.helper==="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,this._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,this._uiHash(this));this.containers[i].containerCache.over=0}}}if(this.placeholder){if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem)}else{$(this.domPosition.parent).prepend(this.currentItem)}}return this},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected),str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[\-=_](.+)/));if(res){str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]))}});if(!str.length&&o.key){str.push(o.key+"=")}return str.join("&")},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected),ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||"id")||"")});return ret},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height,l=item.left,r=l+item.width,t=item.top,b=t+item.height,dyClick=this.offset.click.top,dxClick=this.offset.click.left,isOverElementHeight=(this.options.axis==="x")||((y1+dyClick)>t&&(y1+dyClick)l&&(x1+dxClick)item[this.floating?"width":"height"])){return isOverElement}else{return(l0?"down":"up")},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!==0&&(delta>0?"right":"left")},refresh:function(event){this._refreshItems(event);this._setHandleClassName();this.refreshPositions();return this},_connectWith:function(){var options=this.options;return options.connectWith.constructor===String?[options.connectWith]:options.connectWith},_getItemsAsjQuery:function(connected){var i,j,cur,inst,items=[],queries=[],connectWith=this._connectWith();if(connectWith&&connected){for(i=connectWith.length-1;i>=0;i--){cur=$(connectWith[i],this.document[0]);for(j=cur.length-1;j>=0;j--){inst=$.data(cur[j],this.widgetFullName);if(inst&&inst!==this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),inst])}}}}queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);function addItems(){items.push(this)}for(i=queries.length-1;i>=0;i--){queries[i][0].each(addItems)}return $(items)},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=$.grep(this.items,function(item){for(var j=0;j=0;i--){cur=$(connectWith[i],this.document[0]);for(j=cur.length-1;j>=0;j--){inst=$.data(cur[j],this.widgetFullName);if(inst&&inst!==this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst)}}}}for(i=queries.length-1;i>=0;i--){targetData=queries[i][1];_queries=queries[i][0];for(j=0,queriesLength=_queries.length;j=0;i--){item=this.items[i];if(item.instance!==this.currentContainer&&this.currentContainer&&item.item[0]!==this.currentItem[0]){continue}t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight()}p=t.offset();item.left=p.left;item.top=p.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(i=this.containers.length-1;i>=0;i--){p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}}return this},_createPlaceholder:function(that){that=that||this;var className,o=that.options;if(!o.placeholder||o.placeholder.constructor===String){className=o.placeholder;o.placeholder={element:function(){var nodeName=that.currentItem[0].nodeName.toLowerCase(),element=$("<"+nodeName+">",that.document[0]).addClass(className||that.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");if(nodeName==="tbody"){that._createTrPlaceholder(that.currentItem.find("tr").eq(0),$("",that.document[0]).appendTo(element))}else{if(nodeName==="tr"){that._createTrPlaceholder(that.currentItem,element)}else{if(nodeName==="img"){element.attr("src",that.currentItem.attr("src"))}}}if(!className){element.css("visibility","hidden")}return element},update:function(container,p){if(className&&!o.forcePlaceholderSize){return }if(!p.height()){p.height(that.currentItem.innerHeight()-parseInt(that.currentItem.css("paddingTop")||0,10)-parseInt(that.currentItem.css("paddingBottom")||0,10))}if(!p.width()){p.width(that.currentItem.innerWidth()-parseInt(that.currentItem.css("paddingLeft")||0,10)-parseInt(that.currentItem.css("paddingRight")||0,10))}}}}that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem));that.currentItem.after(that.placeholder);o.placeholder.update(that,that.placeholder)},_createTrPlaceholder:function(sourceTr,targetTr){var that=this;sourceTr.children().each(function(){$(" ",that.document[0]).attr("colspan",$(this).attr("colspan")||1).appendTo(targetTr)})},_contactContainers:function(event){var i,j,dist,itemWithLeastDistance,posProperty,sizeProperty,cur,nearBottom,floating,axis,innermostContainer=null,innermostIndex=null;for(i=this.containers.length-1;i>=0;i--){if($.contains(this.currentItem[0],this.containers[i].element[0])){continue}if(this._intersectsWith(this.containers[i].containerCache)){if(innermostContainer&&$.contains(this.containers[i].element[0],innermostContainer.element[0])){continue}innermostContainer=this.containers[i];innermostIndex=i}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0}}}if(!innermostContainer){return }if(this.containers.length===1){if(!this.containers[innermostIndex].containerCache.over){this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1}}else{dist=10000;itemWithLeastDistance=null;floating=innermostContainer.floating||this._isFloating(this.currentItem);posProperty=floating?"left":"top";sizeProperty=floating?"width":"height";axis=floating?"clientX":"clientY";for(j=this.items.length-1;j>=0;j--){if(!$.contains(this.containers[innermostIndex].element[0],this.items[j].item[0])){continue}if(this.items[j].item[0]===this.currentItem[0]){continue}cur=this.items[j].item.offset()[posProperty];nearBottom=false;if(event[axis]-cur>this.items[j][sizeProperty]/2){nearBottom=true}if(Math.abs(event[axis]-cur)this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?((top-this.offset.click.top>=this.containment[1]&&top-this.offset.click.top<=this.containment[3])?top:((top-this.offset.click.top>=this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?((left-this.offset.click.left>=this.containment[0]&&left-this.offset.click.left<=this.containment[2])?left:((left-this.offset.click.left>=this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==="down"?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var counter=this.counter;this._delay(function(){if(counter===this.counter){this.refreshPositions(!hardRefresh)}})},_clear:function(event,noPropagation){this.reverting=false;var i,delayedTriggers=[];if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(i in this._storedCSS){if(this._storedCSS[i]==="auto"||this._storedCSS[i]==="static"){this._storedCSS[i]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!noPropagation){delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!noPropagation){delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash())})}if(this!==this.currentContainer){if(!noPropagation){delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash())});delayedTriggers.push((function(c){return function(event){c._trigger("receive",event,this._uiHash(this))}}).call(this,this.currentContainer));delayedTriggers.push((function(c){return function(event){c._trigger("update",event,this._uiHash(this))}}).call(this,this.currentContainer))}}function delayEvent(type,instance,container){return function(event){container._trigger(type,event,instance._uiHash(instance))}}for(i=this.containers.length-1;i>=0;i--){if(!noPropagation){delayedTriggers.push(delayEvent("deactivate",this,this.containers[i]))}if(this.containers[i].containerCache.over){delayedTriggers.push(delayEvent("out",this,this.containers[i]));this.containers[i].containerCache.over=0}}if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove()}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex)}this.dragging=false;if(!noPropagation){this._trigger("beforeStop",event,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(!this.cancelHelperRemoval){if(this.helper[0]!==this.currentItem[0]){this.helper.remove()}this.helper=null}if(!noPropagation){for(i=0;i li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var options=this.options;this.prevShow=this.prevHide=$();this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist");if(!options.collapsible&&(options.active===false||options.active==null)){options.active=0}this._processPanels();if(options.active<0){options.active+=this.headers.length}this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:!this.active.length?$():this.active.next()}},_createIcons:function(){var icons=this.options.icons;if(icons){$("").addClass("ui-accordion-header-icon ui-icon "+icons.header).prependTo(this.headers);this.active.children(".ui-accordion-header-icon").removeClass(icons.header).addClass(icons.activeHeader);this.headers.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var contents;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId();this._destroyIcons();contents=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId();if(this.options.heightStyle!=="content"){contents.css("height","")}},_setOption:function(key,value){if(key==="active"){this._activate(value);return }if(key==="event"){if(this.options.event){this._off(this.headers,this.options.event)}this._setupEvents(value)}this._super(key,value);if(key==="collapsible"&&!value&&this.options.active===false){this._activate(0)}if(key==="icons"){this._destroyIcons();if(value){this._createIcons()}}if(key==="disabled"){this.element.toggleClass("ui-state-disabled",!!value).attr("aria-disabled",value);this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!value)}},_keydown:function(event){if(event.altKey||event.ctrlKey){return }var keyCode=$.ui.keyCode,length=this.headers.length,currentIndex=this.headers.index(event.target),toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:this._eventHandler(event);break;case keyCode.HOME:toFocus=this.headers[0];break;case keyCode.END:toFocus=this.headers[length-1];break}if(toFocus){$(event.target).attr("tabIndex",-1);$(toFocus).attr("tabIndex",0);toFocus.focus();event.preventDefault()}},_panelKeyDown:function(event){if(event.keyCode===$.ui.keyCode.UP&&event.ctrlKey){$(event.currentTarget).prev().focus()}},refresh:function(){var options=this.options;this._processPanels();if((options.active===false&&options.collapsible===true)||!this.headers.length){options.active=false;this.active=$()}else{if(options.active===false){this._activate(0)}else{if(this.active.length&&!$.contains(this.element[0],this.active[0])){if(this.headers.length===this.headers.find(".ui-state-disabled").length){options.active=false;this.active=$()}else{this._activate(Math.max(0,options.active-1))}}else{options.active=this.headers.index(this.active)}}}this._destroyIcons();this._refresh()},_processPanels:function(){var prevHeaders=this.headers,prevPanels=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all");this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide();if(prevPanels){this._off(prevHeaders.not(this.headers));this._off(prevPanels.not(this.panels))}},_refresh:function(){var maxHeight,options=this.options,heightStyle=options.heightStyle,parent=this.element.parent();this.active=this._findActive(options.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all");this.active.next().addClass("ui-accordion-content-active").show();this.headers.attr("role","tab").each(function(){var header=$(this),headerId=header.uniqueId().attr("id"),panel=header.next(),panelId=panel.uniqueId().attr("id");header.attr("aria-controls",panelId);panel.attr("aria-labelledby",headerId)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex",0)}else{this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"})}this._createIcons();this._setupEvents(options.event);if(heightStyle==="fill"){maxHeight=parent.height();this.element.siblings(":visible").each(function(){var elem=$(this),position=elem.css("position");if(position==="absolute"||position==="fixed"){return }maxHeight-=elem.outerHeight(true)});this.headers.each(function(){maxHeight-=$(this).outerHeight(true)});this.headers.next().each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()))}).css("overflow","auto")}else{if(heightStyle==="auto"){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).css("height","").height())}).height(maxHeight)}}},_activate:function(index){var active=this._findActive(index)[0];if(active===this.active[0]){return }active=active||this.active[0];this._eventHandler({target:active,currentTarget:active,preventDefault:$.noop})},_findActive:function(selector){return typeof selector==="number"?this.headers.eq(selector):$()},_setupEvents:function(event){var events={keydown:"_keydown"};if(event){$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler"})}this._off(this.headers.add(this.headers.next()));this._on(this.headers,events);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers)},_eventHandler:function(event){var options=this.options,active=this.active,clicked=$(event.currentTarget),clickedIsActive=clicked[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():clicked.next(),toHide=active.next(),eventData={oldHeader:active,oldPanel:toHide,newHeader:collapsing?$():clicked,newPanel:toShow};event.preventDefault();if((clickedIsActive&&!options.collapsible)||(this._trigger("beforeActivate",event,eventData)===false)){return }options.active=collapsing?false:this.headers.index(clicked);this.active=clickedIsActive?$():clicked;this._toggle(eventData);active.removeClass("ui-accordion-header-active ui-state-active");if(options.icons){active.children(".ui-accordion-header-icon").removeClass(options.icons.activeHeader).addClass(options.icons.header)}if(!clickedIsActive){clicked.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top");if(options.icons){clicked.children(".ui-accordion-header-icon").removeClass(options.icons.header).addClass(options.icons.activeHeader)}clicked.next().addClass("ui-accordion-content-active")}},_toggle:function(data){var toShow=data.newPanel,toHide=this.prevShow.length?this.prevShow:data.oldPanel;this.prevShow.add(this.prevHide).stop(true,true);this.prevShow=toShow;this.prevHide=toHide;if(this.options.animate){this._animate(toShow,toHide,data)}else{toHide.hide();toShow.show();this._toggleComplete(data)}toHide.attr({"aria-hidden":"true"});toHide.prev().attr({"aria-selected":"false","aria-expanded":"false"});if(toShow.length&&toHide.length){toHide.prev().attr({tabIndex:-1,"aria-expanded":"false"})}else{if(toShow.length){this.headers.filter(function(){return parseInt($(this).attr("tabIndex"),10)===0}).attr("tabIndex",-1)}}toShow.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(toShow,toHide,data){var total,easing,duration,that=this,adjust=0,boxSizing=toShow.css("box-sizing"),down=toShow.length&&(!toHide.length||(toShow.index()",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=false;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0});if(this.options.disabled){this.element.addClass("ui-state-disabled").attr("aria-disabled","true")}this._on({"mousedown .ui-menu-item":function(event){event.preventDefault()},"click .ui-menu-item":function(event){var target=$(event.target);if(!this.mouseHandled&&target.not(".ui-state-disabled").length){this.select(event);if(!event.isPropagationStopped()){this.mouseHandled=true}if(target.has(".ui-menu").length){this.expand(event)}else{if(!this.element.is(":focus")&&$(this.document[0].activeElement).closest(".ui-menu").length){this.element.trigger("focus",[true]);if(this.active&&this.active.parents(".ui-menu").length===1){clearTimeout(this.timer)}}}}},"mouseenter .ui-menu-item":function(event){if(this.previousFilter){return }var target=$(event.currentTarget);target.siblings(".ui-state-active").removeClass("ui-state-active");this.focus(event,target)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(event,keepActiveItem){var item=this.active||this.element.find(this.options.items).eq(0);if(!keepActiveItem){this.focus(event,item)}},blur:function(event){this._delay(function(){if(!$.contains(this.element[0],this.document[0].activeElement)){this.collapseAll(event)}})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(event){if(this._closeOnDocumentClick(event)){this.collapseAll(event)}this.mouseHandled=false}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var elem=$(this);if(elem.data("ui-menu-submenu-carat")){elem.remove()}});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(event){var match,prev,character,skip,preventDefault=true;switch(event.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $.ui.keyCode.HOME:this._move("first","first",event);break;case $.ui.keyCode.END:this._move("last","last",event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.DOWN:this.next(event);break;case $.ui.keyCode.LEFT:this.collapse(event);break;case $.ui.keyCode.RIGHT:if(this.active&&!this.active.is(".ui-state-disabled")){this.expand(event)}break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=false;prev=this.previousFilter||"";character=String.fromCharCode(event.keyCode);skip=false;clearTimeout(this.filterTimer);if(character===prev){skip=true}else{character=prev+character}match=this._filterMenuItems(character);match=skip&&match.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):match;if(!match.length){character=String.fromCharCode(event.keyCode);match=this._filterMenuItems(character)}if(match.length){this.focus(event,match);this.previousFilter=character;this.filterTimer=this._delay(function(){delete this.previousFilter},1000)}else{delete this.previousFilter}}if(preventDefault){event.preventDefault()}},_activate:function(event){if(!this.active.is(".ui-state-disabled")){if(this.active.is("[aria-haspopup='true']")){this.expand(event)}else{this.select(event)}}},refresh:function(){var menus,items,that=this,icon=this.options.icons.submenu,submenus=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length);submenus.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var menu=$(this),item=menu.parent(),submenuCarat=$("").addClass("ui-menu-icon ui-icon "+icon).data("ui-menu-submenu-carat",true);item.attr("aria-haspopup","true").prepend(submenuCarat);menu.attr("aria-labelledby",item.attr("id"))});menus=submenus.add(this.element);items=menus.find(this.options.items);items.not(".ui-menu-item").each(function(){var item=$(this);if(that._isDivider(item)){item.addClass("ui-widget-content ui-menu-divider")}});items.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()});items.filter(".ui-state-disabled").attr("aria-disabled","true");if(this.active&&!$.contains(this.element[0],this.active[0])){this.blur()}},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(key,value){if(key==="icons"){this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(value.submenu)}if(key==="disabled"){this.element.toggleClass("ui-state-disabled",!!value).attr("aria-disabled",value)}this._super(key,value)},focus:function(event,item){var nested,focused;this.blur(event,event&&event.type==="focus");this._scrollIntoView(item);this.active=item.first();focused=this.active.addClass("ui-state-focus").removeClass("ui-state-active");if(this.options.role){this.element.attr("aria-activedescendant",focused.attr("id"))}this.active.parent().closest(".ui-menu-item").addClass("ui-state-active");if(event&&event.type==="keydown"){this._close()}else{this.timer=this._delay(function(){this._close()},this.delay)}nested=item.children(".ui-menu");if(nested.length&&event&&(/^mouse/.test(event.type))){this._startOpening(nested)}this.activeMenu=item.parent();this._trigger("focus",event,{item:item})},_scrollIntoView:function(item){var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;if(this._hasScroll()){borderTop=parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0;paddingTop=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0;offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop;scroll=this.activeMenu.scrollTop();elementHeight=this.activeMenu.height();itemHeight=item.outerHeight();if(offset<0){this.activeMenu.scrollTop(scroll+offset)}else{if(offset+itemHeight>elementHeight){this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight)}}}},blur:function(event,fromFocus){if(!fromFocus){clearTimeout(this.timer)}if(!this.active){return }this.active.removeClass("ui-state-focus");this.active=null;this._trigger("blur",event,{item:this.active})},_startOpening:function(submenu){clearTimeout(this.timer);if(submenu.attr("aria-hidden")!=="true"){return }this.timer=this._delay(function(){this._close();this._open(submenu)},this.delay)},_open:function(submenu){var position=$.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(submenu.parents(".ui-menu")).hide().attr("aria-hidden","true");submenu.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(position)},collapseAll:function(event,all){clearTimeout(this.timer);this.timer=this._delay(function(){var currentMenu=all?this.element:$(event&&event.target).closest(this.element.find(".ui-menu"));if(!currentMenu.length){currentMenu=this.element}this._close(currentMenu);this.blur(event);this.activeMenu=currentMenu},this.delay)},_close:function(startMenu){if(!startMenu){startMenu=this.active?this.active.parent():this.element}startMenu.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(event){return !$(event.target).closest(".ui-menu").length},_isDivider:function(item){return !/[^\-\u2014\u2013\s]/.test(item.text())},collapse:function(event){var newItem=this.active&&this.active.parent().closest(".ui-menu-item",this.element);if(newItem&&newItem.length){this._close();this.focus(event,newItem)}},expand:function(event){var newItem=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();if(newItem&&newItem.length){this._open(newItem.parent());this._delay(function(){this.focus(event,newItem)})}},next:function(event){this._move("next","first",event)},previous:function(event){this._move("prev","last",event)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(direction,filter,event){var next;if(this.active){if(direction==="first"||direction==="last"){next=this.active[direction==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1)}else{next=this.active[direction+"All"](".ui-menu-item").eq(0)}}if(!next||!next.length||!this.active){next=this.activeMenu.find(this.options.items)[filter]()}this.focus(event,next)},nextPage:function(event){var item,base,height;if(!this.active){this.next(event);return }if(this.isLastItem()){return }if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.nextAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base-height<0});this.focus(event,item)}else{this.focus(event,this.activeMenu.find(this.options.items)[!this.active?"first":"last"]())}},previousPage:function(event){var item,base,height;if(!this.active){this.next(event);return }if(this.isFirstItem()){return }if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.prevAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base+height>0});this.focus(event,item)}else{this.focus(event,this.activeMenu.find(this.options.items).first())}},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var suppressKeyPress,suppressKeyPressRepeat,suppressInput,nodeName=this.element[0].nodeName.toLowerCase(),isTextarea=nodeName==="textarea",isInput=nodeName==="input";this.isMultiLine=isTextarea?true:isInput?false:this.element.prop("isContentEditable");this.valueMethod=this.element[isTextarea||isInput?"val":"text"];this.isNewMenu=true;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off");this._on(this.element,{keydown:function(event){if(this.element.prop("readOnly")){suppressKeyPress=true;suppressInput=true;suppressKeyPressRepeat=true;return }suppressKeyPress=false;suppressInput=false;suppressKeyPressRepeat=false;var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:suppressKeyPress=true;this._move("previousPage",event);break;case keyCode.PAGE_DOWN:suppressKeyPress=true;this._move("nextPage",event);break;case keyCode.UP:suppressKeyPress=true;this._keyEvent("previous",event);break;case keyCode.DOWN:suppressKeyPress=true;this._keyEvent("next",event);break;case keyCode.ENTER:if(this.menu.active){suppressKeyPress=true;event.preventDefault();this.menu.select(event)}break;case keyCode.TAB:if(this.menu.active){this.menu.select(event)}break;case keyCode.ESCAPE:if(this.menu.element.is(":visible")){if(!this.isMultiLine){this._value(this.term)}this.close(event);event.preventDefault()}break;default:suppressKeyPressRepeat=true;this._searchTimeout(event);break}},keypress:function(event){if(suppressKeyPress){suppressKeyPress=false;if(!this.isMultiLine||this.menu.element.is(":visible")){event.preventDefault()}return }if(suppressKeyPressRepeat){return }var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:this._move("previousPage",event);break;case keyCode.PAGE_DOWN:this._move("nextPage",event);break;case keyCode.UP:this._keyEvent("previous",event);break;case keyCode.DOWN:this._keyEvent("next",event);break}},input:function(event){if(suppressInput){suppressInput=false;event.preventDefault();return }this._searchTimeout(event)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(event){if(this.cancelBlur){delete this.cancelBlur;return }clearTimeout(this.searching);this.close(event);this._change(event)}});this._initSource();this.menu=$("
      ").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance");this._on(this.menu.element,{mousedown:function(event){event.preventDefault();this.cancelBlur=true;this._delay(function(){delete this.cancelBlur});var menuElement=this.menu.element[0];if(!$(event.target).closest(".ui-menu-item").length){this._delay(function(){var that=this;this.document.one("mousedown",function(event){if(event.target!==that.element[0]&&event.target!==menuElement&&!$.contains(menuElement,event.target)){that.close()}})})}},menufocus:function(event,ui){var label,item;if(this.isNewMenu){this.isNewMenu=false;if(event.originalEvent&&/^mouse/.test(event.originalEvent.type)){this.menu.blur();this.document.one("mousemove",function(){$(event.target).trigger(event.originalEvent)});return }}item=ui.item.data("ui-autocomplete-item");if(false!==this._trigger("focus",event,{item:item})){if(event.originalEvent&&/^key/.test(event.originalEvent.type)){this._value(item.value)}}label=ui.item.attr("aria-label")||item.value;if(label&&$.trim(label).length){this.liveRegion.children().hide();$("
      ").text(label).appendTo(this.liveRegion)}},menuselect:function(event,ui){var item=ui.item.data("ui-autocomplete-item"),previous=this.previous;if(this.element[0]!==this.document[0].activeElement){this.element.focus();this.previous=previous;this._delay(function(){this.previous=previous;this.selectedItem=item})}if(false!==this._trigger("select",event,{item:item})){this._value(item.value)}this.term=this._value();this.close(event);this.selectedItem=item}});this.liveRegion=$("",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body);this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(key,value){this._super(key,value);if(key==="source"){this._initSource()}if(key==="appendTo"){this.menu.element.appendTo(this._appendTo())}if(key==="disabled"&&value&&this.xhr){this.xhr.abort()}},_appendTo:function(){var element=this.options.appendTo;if(element){element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0)}if(!element||!element[0]){element=this.element.closest(".ui-front")}if(!element.length){element=this.document[0].body}return element},_initSource:function(){var array,url,that=this;if($.isArray(this.options.source)){array=this.options.source;this.source=function(request,response){response($.ui.autocomplete.filter(array,request.term))}}else{if(typeof this.options.source==="string"){url=this.options.source;this.source=function(request,response){if(that.xhr){that.xhr.abort()}that.xhr=$.ajax({url:url,data:request,dataType:"json",success:function(data){response(data)},error:function(){response([])}})}}else{this.source=this.options.source}}},_searchTimeout:function(event){clearTimeout(this.searching);this.searching=this._delay(function(){var equalValues=this.term===this._value(),menuVisible=this.menu.element.is(":visible"),modifierKey=event.altKey||event.ctrlKey||event.metaKey||event.shiftKey;if(!equalValues||(equalValues&&!menuVisible&&!modifierKey)){this.selectedItem=null;this.search(null,event)}},this.options.delay)},search:function(value,event){value=value!=null?value:this._value();this.term=this._value();if(value.length").text(item.label).appendTo(ul)},_move:function(direction,event){if(!this.menu.element.is(":visible")){this.search(null,event);return }if(this.menu.isFirstItem()&&/^previous/.test(direction)||this.menu.isLastItem()&&/^next/.test(direction)){if(!this.isMultiLine){this._value(this.term)}this.menu.blur();return }this.menu[direction](event)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(keyEvent,event){if(!this.isMultiLine||this.menu.element.is(":visible")){this._move(keyEvent,event);event.preventDefault()}}});$.extend($.ui.autocomplete,{escapeRegex:function(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(array,term){var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");return $.grep(array,function(value){return matcher.test(value.label||value.value||value)})}});$.widget("ui.autocomplete",$.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(amount){return amount+(amount>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(content){var message;this._superApply(arguments);if(this.options.disabled||this.cancelSearch){return }if(content&&content.length){message=this.options.messages.results(content.length)}else{message=this.options.messages.noResults}this.liveRegion.children().hide();$("
      ").text(message).appendTo(this.liveRegion)}});var autocomplete=$.ui.autocomplete; -/* - * jQuery UI Button 1.11.4 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/button/ - */ -var lastActive,baseClasses="ui-button ui-widget ui-state-default ui-corner-all",typeClasses="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",formResetHandler=function(){var form=$(this);setTimeout(function(){form.find(":ui-button").button("refresh")},1)},radioGroup=function(radio){var name=radio.name,form=radio.form,radios=$([]);if(name){name=name.replace(/'/g,"\\'");if(form){radios=$(form).find("[name='"+name+"'][type=radio]")}else{radios=$("[name='"+name+"'][type=radio]",radio.ownerDocument).filter(function(){return !this.form})}}return radios};$.widget("ui.button",{version:"1.11.4",defaultElement:"").addClass(this._triggerClass).html(!buttonImage?buttonText:$("").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput===input[0]){$.datepicker._hideDatepicker()}else{if($.datepicker._datepickerShowing&&$.datepicker._lastInput!==input[0]){$.datepicker._hideDatepicker();$.datepicker._showDatepicker(input[0])}else{$.datepicker._showDatepicker(input[0])}}return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var findMax,max,maxI,i,date=new Date(2009,12-1,20),dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){findMax=function(names){max=0;maxI=0;for(i=0;imax){max=names[i].length;maxI=i}}return maxI};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return }divSpan.addClass(this.markerClassName).append(inst.dpDiv);$.data(target,"datepicker",inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst);if(inst.settings.disabled){this._disableDatepicker(target)}inst.dpDiv.css("display","block")},_dialogDatepicker:function(input,date,onSelect,settings,pos){var id,browserWidth,browserHeight,scrollX,scrollY,inst=this._dialogInst;if(!inst){this.uuid+=1;id="dp"+this.uuid;this._dialogInput=$("");this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],"datepicker",inst)}datepicker_extendRemove(inst.settings,settings||{});date=(date&&date.constructor===Date?this._formatDate(inst,date):date);this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){browserWidth=document.documentElement.clientWidth;browserHeight=document.documentElement.clientHeight;scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],"datepicker",inst);return this},_destroyDatepicker:function(target){var nodeName,$target=$(target),inst=$.data(target,"datepicker");if(!$target.hasClass(this.markerClassName)){return }nodeName=target.nodeName.toLowerCase();$.removeData(target,"datepicker");if(nodeName==="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(nodeName==="div"||nodeName==="span"){$target.removeClass(this.markerClassName).empty()}}if(datepicker_instActive===inst){datepicker_instActive=null}},_enableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,"datepicker");if(!$target.hasClass(this.markerClassName)){return }nodeName=target.nodeName.toLowerCase();if(nodeName==="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName==="div"||nodeName==="span"){inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false)}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value===target?null:value)})},_disableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,"datepicker");if(!$target.hasClass(this.markerClassName)){return }nodeName=target.nodeName.toLowerCase();if(nodeName==="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName==="div"||nodeName==="span"){inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true)}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value===target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i-1)}},_doKeyUp:function(event){var date,inst=$.datepicker._getInst(event.target);if(inst.input.val()!==inst.lastVal){try{date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst)}}catch(err){}}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!=="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput===input){return }var inst,beforeShow,beforeShowSettings,isFixed,offset,showAnim,duration;inst=$.datepicker._getInst(input);if($.datepicker._curInst&&$.datepicker._curInst!==inst){$.datepicker._curInst.dpDiv.stop(true,true);if(inst&&$.datepicker._datepickerShowing){$.datepicker._hideDatepicker($.datepicker._curInst.input[0])}}beforeShow=$.datepicker._get(inst,"beforeShow");beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{};if(beforeShowSettings===false){return }datepicker_extendRemove(inst.settings,beforeShowSettings);inst.lastVal=null;$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")==="fixed";return !isFixed});offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.empty();inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){showAnim=$.datepicker._get(inst,"showAnim");duration=$.datepicker._get(inst,"duration");inst.dpDiv.css("z-index",datepicker_getZindex($(input))+1);$.datepicker._datepickerShowing=true;if($.effects&&$.effects.effect[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration)}else{inst.dpDiv[showAnim||"show"](showAnim?duration:null)}if($.datepicker._shouldFocusInput(inst)){inst.input.focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){this.maxRows=4;datepicker_instActive=inst;inst.dpDiv.empty().append(this._generateHTML(inst));this._attachHandlers(inst);var origyearshtml,numMonths=this._getNumberOfMonths(inst),cols=numMonths[1],width=17,activeCell=inst.dpDiv.find("."+this._dayOverClass+" a");if(activeCell.length>0){datepicker_handleMouseover.apply(activeCell.get(0))}inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}inst.dpDiv[(numMonths[0]!==1||numMonths[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst===$.datepicker._curInst&&$.datepicker._datepickerShowing&&$.datepicker._shouldFocusInput(inst)){inst.input.focus()}if(inst.yearshtml){origyearshtml=inst.yearshtml;setTimeout(function(){if(origyearshtml===inst.yearshtml&&inst.yearshtml){inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml)}origyearshtml=inst.yearshtml=null},0)}},_shouldFocusInput:function(inst){return inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")&&!inst.input.is(":focus")},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth(),dpHeight=inst.dpDiv.outerHeight(),inputWidth=inst.input?inst.input.outerWidth():0,inputHeight=inst.input?inst.input.outerHeight():0,viewWidth=document.documentElement.clientWidth+(isFixed?0:$(document).scrollLeft()),viewHeight=document.documentElement.clientHeight+(isFixed?0:$(document).scrollTop());offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left===inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top===(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(dpHeight+inputHeight):0);return offset},_findPos:function(obj){var position,inst=this._getInst(obj),isRTL=this._get(inst,"isRTL");while(obj&&(obj.type==="hidden"||obj.nodeType!==1||$.expr.filters.hidden(obj))){obj=obj[isRTL?"previousSibling":"nextSibling"]}position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input){var showAnim,duration,postProcess,onClose,inst=this._curInst;if(!inst||(input&&inst!==$.data(input,"datepicker"))){return }if(this._datepickerShowing){showAnim=this._get(inst,"showAnim");duration=this._get(inst,"duration");postProcess=function(){$.datepicker._tidyDialog(inst)};if($.effects&&($.effects.effect[showAnim]||$.effects[showAnim])){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(showAnim==="slideDown"?"slideUp":(showAnim==="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess)}if(!showAnim){postProcess()}this._datepickerShowing=false;onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return }var $target=$(event.target),inst=$.datepicker._getInst($target[0]);if((($target[0].id!==$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length===0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)))||($target.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!==inst)){$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id),inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return }this._adjustInstDate(inst,offset+(period==="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var date,target=$(id),inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id),inst=this._getInst(target[0]);inst["selected"+(period==="M"?"Month":"Year")]=inst["draw"+(period==="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_selectDay:function(id,month,year,td){var inst,target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return }inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))},_clearDate:function(id){var target=$(id);this._selectDate(target,"")},_selectDate:function(id,dateStr){var onSelect,target=$(id),inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof (inst.input[0])!=="object"){inst.input.focus()}this._lastInput=null}},_updateAlternate:function(inst){var altFormat,date,dateStr,altField=this._get(inst,"altField");if(altField){altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var time,checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value==="object"?value.toString():value+"");if(value===""){return null}var iFormat,dim,extra,iValue=0,shortYearCutoffTemp=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff,shortYearCutoff=(typeof shortYearCutoffTemp!=="string"?shortYearCutoffTemp:new Date().getFullYear()%100+parseInt(shortYearCutoffTemp,10)),dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,year=-1,month=-1,day=-1,doy=-1,literal=false,date,lookAhead=function(match){var matches=(iFormat+1-1){month=1;day=doy;do{dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return""}var iFormat,dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,lookAhead=function(match){var matches=(iFormat+112?date.getHours()+2:0);return date},_setDate:function(inst,date,noChange){var clear=!date,origMonth=inst.selectedMonth,origYear=inst.selectedYear,newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));inst.selectedDay=inst.currentDay=newDate.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();if((origMonth!==inst.selectedMonth||origYear!==inst.selectedYear)&&!noChange){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()==="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_attachHandlers:function(inst){var stepMonths=this._get(inst,"stepMonths"),id="#"+inst.id.replace(/\\\\/g,"\\");inst.dpDiv.find("[data-handler]").map(function(){var handler={prev:function(){$.datepicker._adjustDate(id,-stepMonths,"M")},next:function(){$.datepicker._adjustDate(id,+stepMonths,"M")},hide:function(){$.datepicker._hideDatepicker()},today:function(){$.datepicker._gotoToday(id)},selectDay:function(){$.datepicker._selectDay(id,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return false},selectMonth:function(){$.datepicker._selectMonthYear(id,this,"M");return false},selectYear:function(){$.datepicker._selectMonthYear(id,this,"Y");return false}};$(this).bind(this.getAttribute("data-event"),handler[this.getAttribute("data-handler")])})},_generateHTML:function(inst){var maxDraw,prevText,prev,nextText,next,currentText,gotoDate,controls,buttonPanel,firstDay,showWeek,dayNames,dayNamesMin,monthNames,monthNamesShort,beforeShowDay,showOtherMonths,selectOtherMonths,defaultDate,html,dow,row,group,col,selectedDate,cornerClass,calender,thead,day,daysInMonth,leadDays,curRows,numRows,printDate,dRow,tbody,daySettings,otherMonth,unselectable,tempDate=new Date(),today=this._daylightSavingAdjust(new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate())),isRTL=this._get(inst,"isRTL"),showButtonPanel=this._get(inst,"showButtonPanel"),hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext"),navigationAsDateFormat=this._get(inst,"navigationAsDateFormat"),numMonths=this._getNumberOfMonths(inst),showCurrentAtPos=this._get(inst,"showCurrentAtPos"),stepMonths=this._get(inst,"stepMonths"),isMultiMonth=(numMonths[0]!==1||numMonths[1]!==1),currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay))),minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),drawMonth=inst.drawMonth-showCurrentAtPos,drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));maxDraw=(minDate&&maxDrawmaxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?""+prevText+"":(hideIfNoPrevNext?"":""+prevText+""));nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?""+nextText+"":(hideIfNoPrevNext?"":""+nextText+""));currentText=this._get(inst,"currentText");gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));controls=(!inst.inline?"":"");buttonPanel=(showButtonPanel)?"
      "+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?"":"")+(isRTL?"":controls)+"
      ":"";firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);showWeek=this._get(inst,"showWeek");dayNames=this._get(inst,"dayNames");dayNamesMin=this._get(inst,"dayNamesMin");monthNames=this._get(inst,"monthNames");monthNamesShort=this._get(inst,"monthNamesShort");beforeShowDay=this._get(inst,"beforeShowDay");showOtherMonths=this._get(inst,"showOtherMonths");selectOtherMonths=this._get(inst,"selectOtherMonths");defaultDate=this._getDefaultDate(inst);html="";dow;for(row=0;row1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}}calender+="'>"}calender+="
      "+(/all|left/.test(cornerClass)&&row===0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row===0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+"
      ";thead=(showWeek?"":"");for(dow=0;dow<7;dow++){day=(dow+firstDay)%7;thead+=""}calender+=thead+"";daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;curRows=Math.ceil((leadDays+daysInMonth)/7);numRows=(isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows);this.maxRows=numRows;printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(dRow=0;dRow";tbody=(!showWeek?"":"");for(dow=0;dow<7;dow++){daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);otherMonth=(printDate.getMonth()!==drawMonth);unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDatemaxDate);tbody+="";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+""}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="
      "+this._get(inst,"weekHeader")+"=5?" class='ui-datepicker-week-end'":"")+">"+dayNamesMin[day]+"
      "+this._get(inst,"calculateWeek")(printDate)+""+(otherMonth&&!showOtherMonths?" ":(unselectable?""+printDate.getDate()+"":""+printDate.getDate()+""))+"
      "+(isMultiMonth?"
      "+((numMonths[0]>0&&col===numMonths[1]-1)?"
      ":""):"");group+=calender}html+=group}html+=buttonPanel;inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var inMinYear,inMaxYear,month,years,thisYear,determineYear,year,endYear,changeMonth=this._get(inst,"changeMonth"),changeYear=this._get(inst,"changeYear"),showMonthAfterYear=this._get(inst,"showMonthAfterYear"),html="
      ",monthHtml="";if(secondary||!changeMonth){monthHtml+=""+monthNames[drawMonth]+""}else{inMinYear=(minDate&&minDate.getFullYear()===drawYear);inMaxYear=(maxDate&&maxDate.getFullYear()===drawYear);monthHtml+=""}if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?" ":"")}if(!inst.yearshtml){inst.yearshtml="";if(secondary||!changeYear){html+=""+drawYear+""}else{years=this._get(inst,"yearRange").split(":");thisYear=new Date().getFullYear();determineYear=function(value){var year=(value.match(/c[+\-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+\-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));return(isNaN(year)?thisYear:year)};year=determineYear(years[0]);endYear=Math.max(year,determineYear(years[1]||""));year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);inst.yearshtml+="";html+=inst.yearshtml;inst.yearshtml=null}}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?" ":"")+monthHtml}html+="
      ";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period==="Y"?offset:0),month=inst.drawMonth+(period==="M"?offset:0),day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period==="D"?offset:0),date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period==="M"||period==="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),newDate=(minDate&&datemaxDate?maxDate:newDate)},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths==="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst),date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var yearSplit,currentYear,minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),minYear=null,maxYear=null,years=this._get(inst,"yearRange");if(years){yearSplit=years.split(":");currentYear=new Date().getFullYear();minYear=parseInt(yearSplit[0],10);maxYear=parseInt(yearSplit[1],10);if(yearSplit[0].match(/[+\-].*/)){minYear+=currentYear}if(yearSplit[1].match(/[+\-].*/)){maxYear+=currentYear}}return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime())&&(!minYear||date.getFullYear()>=minYear)&&(!maxYear||date.getFullYear()<=maxYear))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!=="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day==="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function datepicker_bindHover(dpDiv){var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return dpDiv.delegate(selector,"mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){$(this).removeClass("ui-datepicker-next-hover")}}).delegate(selector,"mouseover",datepicker_handleMouseover)}function datepicker_handleMouseover(){if(!$.datepicker._isDisabledDatepicker(datepicker_instActive.inline?datepicker_instActive.dpDiv.parent()[0]:datepicker_instActive.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){$(this).addClass("ui-datepicker-next-hover")}}}function datepicker_extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=props[name]}}return target}$.fn.datepicker=function(options){if(!this.length){return this}if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick);$.datepicker.initialized=true}if($("#"+$.datepicker._mainDivId).length===0){$("body").append($.datepicker.dpDiv)}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options==="string"&&(options==="isDisabled"||options==="getDate"||options==="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options==="option"&&arguments.length===2&&typeof arguments[1]==="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options==="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.11.4";var datepicker=$.datepicker; -/* - * jQuery UI Dialog 1.11.4 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/dialog/ - */ -var dialog=$.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:true,buttons:[],closeOnEscape:true,closeText:"Close",showCloseButton:true,showTitleBar:true,dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(pos){var topOffset=$(this).css(pos).offset().top;if(topOffset<0){$(this).css("top",pos.top-topOffset)}}},resizable:true,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},resizableRelatedOptions:{maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane();if(this.options.draggable&&$.fn.draggable){this._makeDraggable()}if(this.options.resizable&&$.fn.resizable){this._makeResizable()}this._isOpen=false;this._trackFocus()},_init:function(){if(this.options.autoOpen){this.open()}},_appendTo:function(){var element=this.options.appendTo;if(element&&(element.jquery||element.nodeType)){return $(element)}return this.document.find(element||"body").eq(0)},_destroy:function(){var next,originalPosition=this.originalPosition;this._untrackInstance();this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach();this.uiDialog.stop(true,true).remove();if(this.originalTitle){this.element.attr("title",this.originalTitle)}next=originalPosition.parent.children().eq(originalPosition.index);if(next.length&&next[0]!==this.element[0]){next.before(this.element)}else{originalPosition.parent.append(this.element)}},widget:function(){return this.uiDialog},disable:$.noop,enable:$.noop,close:function(event){var activeElement,that=this;if(!this._isOpen||this._trigger("beforeClose",event)===false){return }this._isOpen=false;this._focusedElement=null;this._destroyOverlay();this._untrackInstance();if(!this.opener.filter(":focusable").focus().length){try{activeElement=this.document[0].activeElement;if(activeElement&&activeElement.nodeName.toLowerCase()!=="body"){$(activeElement).blur()}}catch(error){}}this._hide(this.uiDialog,this.options.hide,function(){that._trigger("close",event)})},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(event,silent){var moved=false,zIndices=this.uiDialog.siblings(".ui-front:visible").map(function(){return +$(this).css("z-index")}).get(),zIndexMax=Math.max.apply(null,zIndices);if(zIndexMax>=+this.uiDialog.css("z-index")){this.uiDialog.css("z-index",zIndexMax+1);moved=true}if(moved&&!silent){this._trigger("focus",event)}return moved},open:function(){var that=this;if(this._isOpen){if(this._moveToTop()){this._focusTabbable()}return }this._isOpen=true;this.opener=$(this.document[0].activeElement);this._size();this._position();this._createOverlay();this._moveToTop(null,true);if(this.overlay){this.overlay.css("z-index",this.uiDialog.css("z-index")-1)}this._show(this.uiDialog,this.options.show,function(){that._focusTabbable();that._trigger("focus")});this._makeFocusTarget();this._trigger("open")},_focusTabbable:function(){var hasFocus=this._focusedElement;if(!hasFocus){hasFocus=this.element.find("[autofocus]")}if(!hasFocus.length){hasFocus=this.element.find(":tabbable")}if(!hasFocus.length){hasFocus=this.uiDialogButtonPane.find(":tabbable")}if(!hasFocus.length){hasFocus=this.uiDialogTitlebarClose.filter(":tabbable")}if(!hasFocus.length){hasFocus=this.uiDialog}hasFocus.eq(0).focus()},_keepFocus:function(event){function checkFocus(){var activeElement=this.document[0].activeElement,isActive=this.uiDialog[0]===activeElement||$.contains(this.uiDialog[0],activeElement);if(!isActive){this._focusTabbable()}}event.preventDefault();checkFocus.call(this);this._delay(checkFocus)},_createWrapper:function(){this.uiDialog=$("
      ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(event){if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&event.keyCode===$.ui.keyCode.ESCAPE){event.preventDefault();this.close(event);return }if(event.keyCode!==$.ui.keyCode.TAB||event.isDefaultPrevented()){return }var tabbables=this.uiDialog.find(":tabbable"),first=tabbables.filter(":first"),last=tabbables.filter(":last");if((event.target===last[0]||event.target===this.uiDialog[0])&&!event.shiftKey){this._delay(function(){first.focus()});event.preventDefault()}else{if((event.target===first[0]||event.target===this.uiDialog[0])&&event.shiftKey){this._delay(function(){last.focus()});event.preventDefault()}}},mousedown:function(event){if(this._moveToTop(event)){this._focusTabbable()}}});if(!this.element.find("[aria-describedby]").length){this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})}},_createTitlebar:function(){var uiDialogTitle;this.uiDialogTitlebar=$("
      ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"+(!this.options.showTitleBar?" ui-helper-hidden":" ui-helper-clearfix")).prependTo(this.uiDialog);this._on(this.uiDialogTitlebar,{mousedown:function(event){if(!$(event.target).closest(".ui-dialog-titlebar-close")){this.uiDialog.focus()}}});this.uiDialogTitlebarClose=$("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:false}).addClass("ui-dialog-titlebar-close"+(!this.options.showCloseButton?" ui-helper-hidden":"")).appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(event){event.preventDefault();this.close(event)}});uiDialogTitle=$("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(uiDialogTitle);this.uiDialog.attr({"aria-labelledby":uiDialogTitle.attr("id")})},_title:function(title){if(!this.options.title){title.html(" ")}title.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=$("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=$("
      ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var that=this,buttons=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();if($.isEmptyObject(buttons)||($.isArray(buttons)&&!buttons.length)){this.uiDialog.removeClass("ui-dialog-buttons");return }$.each(buttons,function(name,props){var click,buttonOptions;props=$.isFunction(props)?{click:props,text:name}:props;props=$.extend({type:"button"},props);click=props.click;props.click=function(){click.apply(that.element[0],arguments)};buttonOptions={icons:props.icons,text:props.showText};delete props.icons;delete props.showText;$("",props).button(buttonOptions).appendTo(that.uiButtonSet)});this.uiDialog.addClass("ui-dialog-buttons");this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){var that=this,options=this.options;function filteredUi(ui){return{position:ui.position,offset:ui.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(event,ui){$(this).addClass("ui-dialog-dragging");that._blockFrames();that._trigger("dragStart",event,filteredUi(ui))},drag:function(event,ui){that._trigger("drag",event,filteredUi(ui))},stop:function(event,ui){var left=ui.offset.left-that.document.scrollLeft(),top=ui.offset.top-that.document.scrollTop();options.position={my:"left top",at:"left"+(left>=0?"+":"")+left+" top"+(top>=0?"+":"")+top,of:that.window};$(this).removeClass("ui-dialog-dragging");that._unblockFrames();that._trigger("dragStop",event,filteredUi(ui))}})},_makeResizable:function(){var that=this,options=this.options,handles=options.resizable,position=this.uiDialog.css("position"),resizeHandles=typeof handles==="string"?handles:"n,e,s,w,se,sw,ne,nw";function filteredUi(ui){return{originalPosition:ui.originalPosition,originalSize:ui.originalSize,position:ui.position,size:ui.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:this._minHeight(),handles:resizeHandles,start:function(event,ui){$(this).addClass("ui-dialog-resizing");that._blockFrames();that._trigger("resizeStart",event,filteredUi(ui))},resize:function(event,ui){that._trigger("resize",event,filteredUi(ui))},stop:function(event,ui){var offset=that.uiDialog.offset(),left=offset.left-that.document.scrollLeft(),top=offset.top-that.document.scrollTop();options.height=that.uiDialog.height();options.width=that.uiDialog.width();options.position={my:"left top",at:"left"+(left>=0?"+":"")+left+" top"+(top>=0?"+":"")+top,of:that.window};$(this).removeClass("ui-dialog-resizing");that._unblockFrames();that._trigger("resizeStop",event,filteredUi(ui))}}).css("position",position)},_trackFocus:function(){this._on(this.widget(),{focusin:function(event){this._makeFocusTarget();this._focusedElement=$(event.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var instances=this._trackingInstances(),exists=$.inArray(this,instances);if(exists!==-1){instances.splice(exists,1)}},_trackingInstances:function(){var instances=this.document.data("ui-dialog-instances");if(!instances){instances=[];this.document.data("ui-dialog-instances",instances)}return instances},_minHeight:function(){var options=this.options;return options.height==="auto"?options.minHeight:Math.min(options.minHeight,options.height)},_position:function(){var isVisible=this.uiDialog.is(":visible");if(!isVisible){this.uiDialog.show()}this.uiDialog.position(this.options.position);if(!isVisible){this.uiDialog.hide()}},_setOptions:function(options){var that=this,resize=false,resizableOptions={};$.each(options,function(key,value){that._setOption(key,value);if(key in that.sizeRelatedOptions){resize=true}if(key in that.resizableRelatedOptions){resizableOptions[key]=value}});if(resize){this._size();this._position()}if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option",resizableOptions)}},_setOption:function(key,value){var isDraggable,isResizable,uiDialog=this.uiDialog;if(key==="dialogClass"){uiDialog.removeClass(this.options.dialogClass).addClass(value)}if(key==="disabled"){return }this._super(key,value);if(key==="appendTo"){this.uiDialog.appendTo(this._appendTo())}if(key==="buttons"){this._createButtons()}if(key==="closeText"){this.uiDialogTitlebarClose.button({label:""+value})}if(key==="showCloseButton"){this.uiDialogTitlebar.find(".ui-dialog-titlebar-close")[(value?"removeClass":"addClass")]("ui-helper-hidden")}if(key==="showTitleBar"){if(value){this.uiDialogTitlebar.removeClass("ui-helper-hidden").addClass("ui-helper-clearfix")}else{this.uiDialogTitlebar.addClass("ui-helper-hidden").removeClass("ui-helper-clearfix")}}if(key==="draggable"){isDraggable=uiDialog.is(":data(ui-draggable)");if(isDraggable&&!value){uiDialog.draggable("destroy")}if(!isDraggable&&value){this._makeDraggable()}}if(key==="position"){this._position()}if(key==="resizable"){isResizable=uiDialog.is(":data(ui-resizable)");if(isResizable&&!value){uiDialog.resizable("destroy")}if(isResizable&&typeof value==="string"){uiDialog.resizable("option","handles",value)}if(!isResizable&&value!==false){this._makeResizable()}}if(key==="title"){this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))}},_size:function(){var nonContentHeight,minContentHeight,maxContentHeight,options=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});if(options.minWidth>options.width){options.width=options.minWidth}nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).outerHeight();minContentHeight=Math.max(0,options.minHeight-nonContentHeight);maxContentHeight=typeof options.maxHeight==="number"?Math.max(0,options.maxHeight-nonContentHeight):"none";if(options.height==="auto"){this.element.css({minHeight:minContentHeight,maxHeight:maxContentHeight,height:"auto"})}else{this.element.height(Math.max(0,options.height-nonContentHeight))}if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var iframe=$(this);return $("
      ").css({position:"absolute",width:iframe.outerWidth(),height:iframe.outerHeight()}).appendTo(iframe.parent()).offset(iframe.offset())[0]})},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks}},_allowInteraction:function(event){if($(event.target).closest(".ui-dialog").length){return true}return !!$(event.target).closest(".ui-datepicker").length},_createOverlay:function(){if(!this.options.modal){return }var isOpening=true;this._delay(function(){isOpening=false});if(!this.document.data("ui-dialog-overlays")){this._on(this.document,{focusin:function(event){if(isOpening){return }if(!this._allowInteraction(event)){event.preventDefault();this._trackingInstances()[0]._focusTabbable()}}})}this.overlay=$("
      ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo());this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)},_destroyOverlay:function(){if(!this.options.modal){return }if(this.overlay){var overlays=this.document.data("ui-dialog-overlays")-1;if(!overlays){this.document.unbind("focusin").removeData("ui-dialog-overlays")}else{this.document.data("ui-dialog-overlays",overlays)}this.overlay.remove();this.overlay=null}}}); -/* - * jQuery UI Slider 1.11.4 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/slider/ - */ -var slider=$.widget("ui.slider",$.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this._calculateNewMax();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this._refresh();this._setOption("disabled",this.options.disabled);this._animateOff=false},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var i,handleCount,options=this.options,existingHandles=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),handle="",handles=[];handleCount=(options.values&&options.values.length)||1;if(existingHandles.length>handleCount){existingHandles.slice(handleCount).remove();existingHandles=existingHandles.slice(0,handleCount)}for(i=existingHandles.length;i
      ").appendTo(this.element);classes="ui-slider-range ui-widget-header ui-corner-all"}else{this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""})}this.range.addClass(classes+((options.range==="min"||options.range==="max")?" ui-slider-range-"+options.range:""))}else{if(this.range){this.range.remove()}this.range=null}},_setupEvents:function(){this._off(this.handles);this._on(this.handles,this._handleEvents);this._hoverable(this.handles);this._focusable(this.handles)},_destroy:function(){this.handles.remove();if(this.range){this.range.remove()}this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all");this._mouseDestroy()},_mouseCapture:function(event){var position,normValue,distance,closestHandle,index,allowed,offset,mouseOverHandle,that=this,o=this.options;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();position={x:event.pageX,y:event.pageY};normValue=this._normValueFromMouse(position);distance=this._valueMax()-this._valueMin()+1;this.handles.each(function(i){var thisDistance=Math.abs(normValue-that.values(i));if((distance>thisDistance)||(distance===thisDistance&&(i===that._lastChangedValue||that.values(i)===o.min))){distance=thisDistance;closestHandle=$(this);index=i}});allowed=this._start(event,index);if(allowed===false){return false}this._mouseSliding=true;this._handleIndex=index;closestHandle.addClass("ui-state-active").focus();offset=closestHandle.offset();mouseOverHandle=!$(event.target).parents().addBack().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(event,index,normValue)}this._animateOff=true;return true},_mouseStart:function(){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse,percentMouse,valueTotal,valueMouse;if(this.orientation==="horizontal"){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if(this.orientation==="vertical"){percentMouse=1-percentMouse}valueTotal=this._valueMax()-this._valueMin();valueMouse=this._valueMin()+percentMouse*valueTotal;return this._trimAlignValue(valueMouse)},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}return this._trigger("start",event,uiHash)},_slide:function(event,index,newVal){var otherVal,newValues,allowed;if(this.options.values&&this.options.values.length){otherVal=this.values(index?0:1);if((this.options.values.length===2&&this.options.range===true)&&((index===0&&newVal>otherVal)||(index===1&&newVal1){this.options.values[index]=this._trimAlignValue(newValue);this._refreshValue();this._change(null,index);return }if(arguments.length){if($.isArray(arguments[0])){vals=this.options.values;newValues=arguments[0];for(i=0;i=this._valueMax()){return this._valueMax()}var step=(this.options.step>0)?this.options.step:1,valModStep=(val-this._valueMin())%step,alignValue=val-valModStep;if(Math.abs(valModStep)*2>=step){alignValue+=(valModStep>0)?step:(-step)}return parseFloat(alignValue.toFixed(5))},_calculateNewMax:function(){var max=this.options.max,min=this._valueMin(),step=this.options.step,aboveMin=Math.floor((+(max-min).toFixed(this._precision()))/step)*step;max=aboveMin+min;this.max=parseFloat(max.toFixed(this._precision()))},_precision:function(){var precision=this._precisionOf(this.options.step);if(this.options.min!==null){precision=Math.max(precision,this._precisionOf(this.options.min))}return precision},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(".");return decimal===-1?0:str.length-decimal-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var lastValPercent,valPercent,value,valueMin,valueMax,oRange=this.options.range,o=this.options,that=this,animate=(!this._animateOff)?o.animate:false,_set={};if(this.options.values&&this.options.values.length){this.handles.each(function(i){valPercent=(that.values(i)-that._valueMin())/(that._valueMax()-that._valueMin())*100;_set[that.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(that.options.range===true){if(that.orientation==="horizontal"){if(i===0){that.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate)}if(i===1){that.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}else{if(i===0){that.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate)}if(i===1){that.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}}lastValPercent=valPercent})}else{value=this.value();valueMin=this._valueMin();valueMax=this._valueMax();valPercent=(valueMax!==valueMin)?(value-valueMin)/(valueMax-valueMin)*100:0;_set[this.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);if(oRange==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate)}if(oRange==="max"&&this.orientation==="horizontal"){this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate})}if(oRange==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate)}if(oRange==="max"&&this.orientation==="vertical"){this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate})}}},_handleEvents:{keydown:function(event){var allowed,curVal,newVal,step,index=$(event.target).data("ui-slider-handle-index");switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:event.preventDefault();if(!this._keySliding){this._keySliding=true;$(event.target).addClass("ui-state-active");allowed=this._start(event,index);if(allowed===false){return }}break}step=this.options.step;if(this.options.values&&this.options.values.length){curVal=newVal=this.values(index)}else{curVal=newVal=this.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=this._valueMin();break;case $.ui.keyCode.END:newVal=this._valueMax();break;case $.ui.keyCode.PAGE_UP:newVal=this._trimAlignValue(curVal+((this._valueMax()-this._valueMin())/this.numPages));break;case $.ui.keyCode.PAGE_DOWN:newVal=this._trimAlignValue(curVal-((this._valueMax()-this._valueMin())/this.numPages));break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal===this._valueMax()){return }newVal=this._trimAlignValue(curVal+step);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal===this._valueMin()){return }newVal=this._trimAlignValue(curVal-step);break}this._slide(event,index,newVal)},keyup:function(event){var index=$(event.target).data("ui-slider-handle-index");if(this._keySliding){this._keySliding=false;this._stop(event,index);this._change(event,index);$(event.target).removeClass("ui-state-active")}}}}); -/* - * jQuery UI Tabs 1.11.4 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/tabs/ - */ -var tabs=$.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:false,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(function(){var rhash=/#.*$/;return function(anchor){var anchorUrl,locationUrl;anchor=anchor.cloneNode(false);anchorUrl=anchor.href.replace(rhash,"");locationUrl=location.href.replace(rhash,"");try{anchorUrl=decodeURIComponent(anchorUrl)}catch(error){}try{locationUrl=decodeURIComponent(locationUrl)}catch(error){}return anchor.hash.length>1&&anchorUrl===locationUrl}})(),_create:function(){var that=this,options=this.options;this.running=false;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",options.collapsible);this._processTabs();options.active=this._initialActive();if($.isArray(options.disabled)){options.disabled=$.unique(options.disabled.concat($.map(this.tabs.filter(".ui-state-disabled"),function(li){return that.tabs.index(li)}))).sort()}if(this.options.active!==false&&this.anchors.length){this.active=this._findActive(options.active)}else{this.active=$()}this._refresh();if(this.active.length){this.load(options.active)}},_initialActive:function(){var active=this.options.active,collapsible=this.options.collapsible,locationHash=location.hash.substring(1);if(active===null){if(locationHash){this.tabs.each(function(i,tab){if($(tab).attr("aria-controls")===locationHash){active=i;return false}})}if(active===null){active=this.tabs.index(this.tabs.filter(".ui-tabs-active"))}if(active===null||active===-1){active=this.tabs.length?0:false}}if(active!==false){active=this.tabs.index(this.tabs.eq(active));if(active===-1){active=collapsible?false:0}}if(!collapsible&&active===false&&this.anchors.length){active=0}return active},_getCreateEventData:function(){return{tab:this.active,panel:!this.active.length?$():this._getPanelForTab(this.active)}},_tabKeydown:function(event){var focusedTab=$(this.document[0].activeElement).closest("li"),selectedIndex=this.tabs.index(focusedTab),goingForward=true;if(this._handlePageNav(event)){return }switch(event.keyCode){case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:selectedIndex++;break;case $.ui.keyCode.UP:case $.ui.keyCode.LEFT:goingForward=false;selectedIndex--;break;case $.ui.keyCode.END:selectedIndex=this.anchors.length-1;break;case $.ui.keyCode.HOME:selectedIndex=0;break;case $.ui.keyCode.SPACE:event.preventDefault();clearTimeout(this.activating);this._activate(selectedIndex);return ;case $.ui.keyCode.ENTER:event.preventDefault();clearTimeout(this.activating);this._activate(selectedIndex===this.options.active?false:selectedIndex);return ;default:return }event.preventDefault();clearTimeout(this.activating);selectedIndex=this._focusNextTab(selectedIndex,goingForward);if(!event.ctrlKey&&!event.metaKey){focusedTab.attr("aria-selected","false");this.tabs.eq(selectedIndex).attr("aria-selected","true");this.activating=this._delay(function(){this.option("active",selectedIndex)},this.delay)}},_panelKeydown:function(event){if(this._handlePageNav(event)){return }if(event.ctrlKey&&event.keyCode===$.ui.keyCode.UP){event.preventDefault();this.active.focus()}},_handlePageNav:function(event){if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_UP){this._activate(this._focusNextTab(this.options.active-1,false));return true}if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_DOWN){this._activate(this._focusNextTab(this.options.active+1,true));return true}},_findNextTab:function(index,goingForward){var lastTabIndex=this.tabs.length-1;function constrain(){if(index>lastTabIndex){index=0}if(index<0){index=lastTabIndex}return index}while($.inArray(constrain(),this.options.disabled)!==-1){index=goingForward?index+1:index-1}return index},_focusNextTab:function(index,goingForward){index=this._findNextTab(index,goingForward);this.tabs.eq(index).focus();return index},_setOption:function(key,value){if(key==="active"){this._activate(value);return }if(key==="disabled"){this._setupDisabled(value);return }this._super(key,value);if(key==="collapsible"){this.element.toggleClass("ui-tabs-collapsible",value);if(!value&&this.options.active===false){this._activate(0)}}if(key==="event"){this._setupEvents(value)}if(key==="heightStyle"){this._setupHeightStyle(value)}},_sanitizeSelector:function(hash){return hash?hash.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var options=this.options,lis=this.tablist.children(":has(a[href])");options.disabled=$.map(lis.filter(".ui-state-disabled"),function(tab){return lis.index(tab)});this._processTabs();if(options.active===false||!this.anchors.length){options.active=false;this.active=$()}else{if(this.active.length&&!$.contains(this.tablist[0],this.active[0])){if(this.tabs.length===options.disabled.length){options.active=false;this.active=$()}else{this._activate(this._findNextTab(Math.max(0,options.active-1),false))}}else{options.active=this.tabs.index(this.active)}}this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"});if(!this.active.length){this.tabs.eq(0).attr("tabIndex",0)}else{this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0});this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})}},_processTabs:function(){var that=this,prevTabs=this.tabs,prevAnchors=this.anchors,prevPanels=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(event){if($(this).is(".ui-state-disabled")){event.preventDefault()}}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){if($(this).closest("li").is(".ui-state-disabled")){this.blur()}});this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return $("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=$();this.anchors.each(function(i,anchor){var selector,panel,panelId,anchorId=$(anchor).uniqueId().attr("id"),tab=$(anchor).closest("li"),originalAriaControls=tab.attr("aria-controls");if(that._isLocal(anchor)){selector=anchor.hash;panelId=selector.substring(1);panel=that.element.find(that._sanitizeSelector(selector))}else{panelId=tab.attr("aria-controls")||$({}).uniqueId()[0].id;selector="#"+panelId;panel=that.element.find(selector);if(!panel.length){panel=that._createPanel(panelId);panel.insertAfter(that.panels[i-1]||that.tablist)}panel.attr("aria-live","polite")}if(panel.length){that.panels=that.panels.add(panel)}if(originalAriaControls){tab.data("ui-tabs-aria-controls",originalAriaControls)}tab.attr({"aria-controls":panelId,"aria-labelledby":anchorId});panel.attr("aria-labelledby",anchorId)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel");if(prevTabs){this._off(prevTabs.not(this.tabs));this._off(prevAnchors.not(this.anchors));this._off(prevPanels.not(this.panels))}},_getList:function(){return this.tablist||this.element.find("ol:not(.ui-tabs-skip),ul:not(.ui-tabs-skip)").eq(0)},_createPanel:function(id){return $("
      ").attr("id",id).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",true)},_setupDisabled:function(disabled){if($.isArray(disabled)){if(!disabled.length){disabled=false}else{if(disabled.length===this.anchors.length){disabled=true}}}for(var i=0,li;(li=this.tabs[i]);i++){if(disabled===true||$.inArray(i,disabled)!==-1){$(li).addClass("ui-state-disabled").attr("aria-disabled","true")}else{$(li).removeClass("ui-state-disabled").removeAttr("aria-disabled")}}this.options.disabled=disabled},_setupEvents:function(event){var events={};if(event){$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler"})}this._off(this.anchors.add(this.tabs).add(this.panels));this._on(true,this.anchors,{click:function(event){event.preventDefault()}});this._on(this.anchors,events);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(heightStyle){var maxHeight,parent=this.element.parent();if(heightStyle==="fill"){maxHeight=parent.height();maxHeight-=this.element.outerHeight()-this.element.height();this.element.siblings(":visible").each(function(){var elem=$(this),position=elem.css("position");if(position==="absolute"||position==="fixed"){return }maxHeight-=elem.outerHeight(true)});this.element.children().not(this.panels).each(function(){maxHeight-=$(this).outerHeight(true)});this.panels.each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()))}).css("overflow","auto")}else{if(heightStyle==="auto"){maxHeight=0;this.panels.each(function(){maxHeight=Math.max(maxHeight,$(this).height("").height())}).height(maxHeight)}}},_eventHandler:function(event){var options=this.options,active=this.active,anchor=$(event.currentTarget),tab=anchor.closest("li"),clickedIsActive=tab[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():this._getPanelForTab(tab),toHide=!active.length?$():this._getPanelForTab(active),eventData={oldTab:active,oldPanel:toHide,newTab:collapsing?$():tab,newPanel:toShow};event.preventDefault();if(tab.hasClass("ui-state-disabled")||tab.hasClass("ui-tabs-loading")||this.running||(clickedIsActive&&!options.collapsible)||(this._trigger("beforeActivate",event,eventData)===false)){return }options.active=collapsing?false:this.tabs.index(tab);this.active=clickedIsActive?$():tab;if(this.xhr){this.xhr.abort()}if(!toHide.length&&!toShow.length){$.error("jQuery UI Tabs: Mismatching fragment identifier.")}if(toShow.length){this.load(this.tabs.index(tab),event)}this._toggle(event,eventData)},_toggle:function(event,eventData){var that=this,toShow=eventData.newPanel,toHide=eventData.oldPanel;this.running=true;function complete(){that.running=false;that._trigger("activate",event,eventData)}function show(){eventData.newTab.closest("li").addClass("ui-tabs-active ui-state-active");if(toShow.length&&that.options.show){that._show(toShow,that.options.show,complete)}else{toShow.show();complete()}}if(toHide.length&&this.options.hide){this._hide(toHide,this.options.hide,function(){eventData.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");show()})}else{eventData.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");toHide.hide();show()}toHide.attr("aria-hidden","true");eventData.oldTab.attr({"aria-selected":"false","aria-expanded":"false"});if(toShow.length&&toHide.length){eventData.oldTab.attr("tabIndex",-1)}else{if(toShow.length){this.tabs.filter(function(){return $(this).attr("tabIndex")===0}).attr("tabIndex",-1)}}toShow.attr("aria-hidden","false");eventData.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(index){var anchor,active=this._findActive(index);if(active[0]===this.active[0]){return }if(!active.length){active=this.active}anchor=active.find(".ui-tabs-anchor")[0];this._eventHandler({target:anchor,currentTarget:anchor,preventDefault:$.noop})},_findActive:function(index){return index===false?$():this.tabs.eq(index)},_getIndex:function(index){if(typeof index==="string"){index=this.anchors.index(this.anchors.filter("[href$='"+index+"']"))}return index},_destroy:function(){if(this.xhr){this.xhr.abort()}this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId();this.tablist.unbind(this.eventNamespace);this.tabs.add(this.panels).each(function(){if($.data(this,"ui-tabs-destroy")){$(this).remove()}else{$(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}});this.tabs.each(function(){var li=$(this),prev=li.data("ui-tabs-aria-controls");if(prev){li.attr("aria-controls",prev).removeData("ui-tabs-aria-controls")}else{li.removeAttr("aria-controls")}});this.panels.show();if(this.options.heightStyle!=="content"){this.panels.css("height","")}},enable:function(index){var disabled=this.options.disabled;if(disabled===false){return }if(index===undefined){disabled=false}else{index=this._getIndex(index);if($.isArray(disabled)){disabled=$.map(disabled,function(num){return num!==index?num:null})}else{disabled=$.map(this.tabs,function(li,num){return num!==index?num:null})}}this._setupDisabled(disabled)},disable:function(index){var disabled=this.options.disabled;if(disabled===true){return }if(index===undefined){disabled=true}else{index=this._getIndex(index);if($.inArray(index,disabled)!==-1){return }if($.isArray(disabled)){disabled=$.merge([index],disabled).sort()}else{disabled=[index]}}this._setupDisabled(disabled)},load:function(index,event){index=this._getIndex(index);var that=this,tab=this.tabs.eq(index),anchor=tab.find(".ui-tabs-anchor"),panel=this._getPanelForTab(tab),eventData={tab:tab,panel:panel},complete=function(jqXHR,status){if(status==="abort"){that.panels.stop(false,true)}tab.removeClass("ui-tabs-loading");panel.removeAttr("aria-busy");if(jqXHR===that.xhr){delete that.xhr}};if(this._isLocal(anchor[0])){return }this.xhr=$.ajax(this._ajaxSettings(anchor,event,eventData));if(this.xhr&&this.xhr.statusText!=="canceled"){tab.addClass("ui-tabs-loading");panel.attr("aria-busy","true");this.xhr.done(function(response,status,jqXHR){setTimeout(function(){panel.html(response);that._trigger("load",event,eventData);complete(jqXHR,status)},1)}).fail(function(jqXHR,status){setTimeout(function(){complete(jqXHR,status)},1)})}},_ajaxSettings:function(anchor,event,eventData){var that=this;return{url:anchor.attr("href"),beforeSend:function(jqXHR,settings){return that._trigger("beforeLoad",event,$.extend({jqXHR:jqXHR,ajaxSettings:settings},eventData))}}},_getPanelForTab:function(tab){var id=$(tab).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+id))}}); -/* - * jQuery UI Effects 1.11.4 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/category/effects-core/ - */ -var dataSpace="ui-effects-",jQuery=$;$.effects={effect:{}}; -/* - * jQuery Color Animations v2.1.2 - * https://github.com/jquery/jquery-color - * - * Copyright 2014 jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * Date: Wed Jan 16 08:47:09 2013 -0600 - */ -(function(jQuery,undefined){var stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",rplusequals=/^([\-+])=\s*(\d+\.?\d*)/,stringParsers=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1]*2.55,execResult[2]*2.55,execResult[3]*2.55,execResult[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+execResult[2],16),parseInt(execResult[3]+execResult[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(execResult){return[execResult[1],execResult[2]/100,execResult[3]/100,execResult[4]]}}],color=jQuery.Color=function(color,green,blue,alpha){return new jQuery.Color.fn.parse(color,green,blue,alpha)},spaces={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},propTypes={"byte":{floor:true,max:255},percent:{max:1},degrees:{mod:360,floor:true}},support=color.support={},supportElem=jQuery("

      ")[0],colors,each=jQuery.each;supportElem.style.cssText="background-color:rgba(1,1,1,.5)";support.rgba=supportElem.style.backgroundColor.indexOf("rgba")>-1;each(spaces,function(spaceName,space){space.cache="_"+spaceName;space.props.alpha={idx:3,type:"percent",def:1}});function clamp(value,prop,allowEmpty){var type=propTypes[prop.type]||{};if(value==null){return(allowEmpty||!prop.def)?null:prop.def}value=type.floor?~~value:parseFloat(value);if(isNaN(value)){return prop.def}if(type.mod){return(value+type.mod)%type.mod}return 0>value?0:type.maxtype.mod/2){startValue+=type.mod}else{if(startValue-endValue>type.mod/2){startValue-=type.mod}}}result[index]=clamp((endValue-startValue)*distance+startValue,prop)}});return this[spaceName](result)},blend:function(opaque){if(this._rgba[3]===1){return this}var rgb=this._rgba.slice(),a=rgb.pop(),blend=color(opaque)._rgba;return color(jQuery.map(rgb,function(v,i){return(1-a)*blend[i]+a*v}))},toRgbaString:function(){var prefix="rgba(",rgba=jQuery.map(this._rgba,function(v,i){return v==null?(i>2?1:0):v});if(rgba[3]===1){rgba.pop();prefix="rgb("}return prefix+rgba.join()+")"},toHslaString:function(){var prefix="hsla(",hsla=jQuery.map(this.hsla(),function(v,i){if(v==null){v=i>2?1:0}if(i&&i<3){v=Math.round(v*100)+"%"}return v});if(hsla[3]===1){hsla.pop();prefix="hsl("}return prefix+hsla.join()+")"},toHexString:function(includeAlpha){var rgba=this._rgba.slice(),alpha=rgba.pop();if(includeAlpha){rgba.push(~~(alpha*255))}return"#"+jQuery.map(rgba,function(v){v=(v||0).toString(16);return v.length===1?"0"+v:v}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});color.fn.parse.prototype=color.fn;function hue2rgb(p,q,h){h=(h+1)%1;if(h*6<1){return p+(q-p)*h*6}if(h*2<1){return q}if(h*3<2){return p+(q-p)*((2/3)-h)*6}return p}spaces.hsla.to=function(rgba){if(rgba[0]==null||rgba[1]==null||rgba[2]==null){return[null,null,null,rgba[3]]}var r=rgba[0]/255,g=rgba[1]/255,b=rgba[2]/255,a=rgba[3],max=Math.max(r,g,b),min=Math.min(r,g,b),diff=max-min,add=max+min,l=add*0.5,h,s;if(min===max){h=0}else{if(r===max){h=(60*(g-b)/diff)+360}else{if(g===max){h=(60*(b-r)/diff)+120}else{h=(60*(r-g)/diff)+240}}}if(diff===0){s=0}else{if(l<=0.5){s=diff/add}else{s=diff/(2-add)}}return[Math.round(h)%360,s,l,a==null?1:a]};spaces.hsla.from=function(hsla){if(hsla[0]==null||hsla[1]==null||hsla[2]==null){return[null,null,null,hsla[3]]}var h=hsla[0]/360,s=hsla[1],l=hsla[2],a=hsla[3],q=l<=0.5?l*(1+s):l+s-l*s,p=2*l-q;return[Math.round(hue2rgb(p,q,h+(1/3))*255),Math.round(hue2rgb(p,q,h)*255),Math.round(hue2rgb(p,q,h-(1/3))*255),a]};each(spaces,function(spaceName,space){var props=space.props,cache=space.cache,to=space.to,from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache]){this[cache]=to(this._rgba)}if(value===undefined){return this[cache].slice()}var ret,type=jQuery.type(value),arr=(type==="array"||type==="object")?value:arguments,local=this[cache].slice();each(props,function(key,prop){var val=arr[type==="object"?key:prop.idx];if(val==null){val=local[prop.idx]}local[prop.idx]=clamp(val,prop)});if(from){ret=color(from(local));ret[cache]=local;return ret}else{return color(local)}};each(props,function(key,prop){if(color.fn[key]){return }color.fn[key]=function(value){var vtype=jQuery.type(value),fn=(key==="alpha"?(this._hsla?"hsla":"rgba"):spaceName),local=this[fn](),cur=local[prop.idx],match;if(vtype==="undefined"){return cur}if(vtype==="function"){value=value.call(this,cur);vtype=jQuery.type(value)}if(value==null&&prop.empty){return this}if(vtype==="string"){match=rplusequals.exec(value);if(match){value=cur+parseFloat(match[2])*(match[1]==="+"?1:-1)}}local[prop.idx]=value;return this[fn](local)}})});color.hook=function(hook){var hooks=hook.split(" ");each(hooks,function(i,hook){jQuery.cssHooks[hook]={set:function(elem,value){var parsed,curElem,backgroundColor="";if(value!=="transparent"&&(jQuery.type(value)!=="string"||(parsed=stringParse(value)))){value=color(parsed||value);if(!support.rgba&&value._rgba[3]!==1){curElem=hook==="backgroundColor"?elem.parentNode:elem;while((backgroundColor===""||backgroundColor==="transparent")&&curElem&&curElem.style){try{backgroundColor=jQuery.css(curElem,"backgroundColor");curElem=curElem.parentNode}catch(e){}}value=value.blend(backgroundColor&&backgroundColor!=="transparent"?backgroundColor:"_default")}value=value.toRgbaString()}try{elem.style[hook]=value}catch(e){}}};jQuery.fx.step[hook]=function(fx){if(!fx.colorInit){fx.start=color(fx.elem,hook);fx.end=color(fx.end);fx.colorInit=true}jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos))}})};color.hook(stepHooks);jQuery.cssHooks.borderColor={expand:function(value){var expanded={};each(["Top","Right","Bottom","Left"],function(i,part){expanded["border"+part+"Color"]=value});return expanded}};colors=jQuery.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);(function(){var classAnimationActions=["add","remove","toggle"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(_,prop){$.fx.step[prop]=function(fx){if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){jQuery.style(fx.elem,prop,fx.end);fx.setAttr=true}}});function getElementStyles(elem){var key,len,style=elem.ownerDocument.defaultView?elem.ownerDocument.defaultView.getComputedStyle(elem,null):elem.currentStyle,styles={};if(style&&style.length&&style[0]&&style[style[0]]){len=style.length;while(len--){key=style[len];if(typeof style[key]==="string"){styles[$.camelCase(key)]=style[key]}}}else{for(key in style){if(typeof style[key]==="string"){styles[key]=style[key]}}}return styles}function styleDifference(oldStyle,newStyle){var diff={},name,value;for(name in newStyle){value=newStyle[name];if(oldStyle[name]!==value){if(!shorthandStyles[name]){if($.fx.step[name]||!isNaN(parseFloat(value))){diff[name]=value}}}}return diff}if(!$.fn.addBack){$.fn.addBack=function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}}$.effects.animateClass=function(value,duration,easing,callback){var o=$.speed(duration,easing,callback);return this.queue(function(){var animated=$(this),baseClass=animated.attr("class")||"",applyClassChange,allAnimations=o.children?animated.find("*").addBack():animated;allAnimations=allAnimations.map(function(){var el=$(this);return{el:el,start:getElementStyles(this)}});applyClassChange=function(){$.each(classAnimationActions,function(i,action){if(value[action]){animated[action+"Class"](value[action])}})};applyClassChange();allAnimations=allAnimations.map(function(){this.end=getElementStyles(this.el[0]);this.diff=styleDifference(this.start,this.end);return this});animated.attr("class",baseClass);allAnimations=allAnimations.map(function(){var styleInfo=this,dfd=$.Deferred(),opts=$.extend({},o,{queue:false,complete:function(){dfd.resolve(styleInfo)}});this.el.animate(this.diff,opts);return dfd.promise()});$.when.apply($,allAnimations.get()).done(function(){applyClassChange();$.each(arguments,function(){var el=this.el;$.each(this.diff,function(key){el.css(key,"")})});o.complete.call(animated[0])})})};$.fn.extend({addClass:(function(orig){return function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{add:classNames},speed,easing,callback):orig.apply(this,arguments)}})($.fn.addClass),removeClass:(function(orig){return function(classNames,speed,easing,callback){return arguments.length>1?$.effects.animateClass.call(this,{remove:classNames},speed,easing,callback):orig.apply(this,arguments)}})($.fn.removeClass),toggleClass:(function(orig){return function(classNames,force,speed,easing,callback){if(typeof force==="boolean"||force===undefined){if(!speed){return orig.apply(this,arguments)}else{return $.effects.animateClass.call(this,(force?{add:classNames}:{remove:classNames}),speed,easing,callback)}}else{return $.effects.animateClass.call(this,{toggle:classNames},force,speed,easing)}}})($.fn.toggleClass),switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.call(this,{add:add,remove:remove},speed,easing,callback)}})})();(function(){$.extend($.effects,{version:"1.11.4",save:function(element,set){for(var i=0;i

      ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;try{active.id}catch(e){active=document.body}element.wrap(wrapper);if(element[0]===active||$.contains(element[0],active)){$(active).focus()}wrapper=element.parent();if(element.css("position")==="static"){wrapper.css({position:"relative"});element.css({position:"relative"})}else{$.extend(props,{position:element.css("position"),zIndex:element.css("z-index")});$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos);if(isNaN(parseInt(props[pos],10))){props[pos]="auto"}});element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}element.css(size);return wrapper.css(props).show()},removeWrapper:function(element){var active=document.activeElement;if(element.parent().is(".ui-effects-wrapper")){element.parent().replaceWith(element);if(element[0]===active||$.contains(element[0],active)){$(active).focus()}}return element},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){var unit=element.cssUnit(x);if(unit[0]>0){value[x]=unit[0]*factor+unit[1]}});return value}});function _normalizeArguments(effect,options,speed,callback){if($.isPlainObject(effect)){options=effect;effect=effect.effect}effect={effect:effect};if(options==null){options={}}if($.isFunction(options)){callback=options;speed=null;options={}}if(typeof options==="number"||$.fx.speeds[options]){callback=speed;speed=options;options={}}if($.isFunction(speed)){callback=speed;speed=null}if(options){$.extend(effect,options)}speed=speed||options.duration;effect.duration=$.fx.off?0:typeof speed==="number"?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default;effect.complete=callback||options.complete;return effect}function standardAnimationOption(option){if(!option||typeof option==="number"||$.fx.speeds[option]){return true}if(typeof option==="string"&&!$.effects.effect[option]){return true}if($.isFunction(option)){return true}if(typeof option==="object"&&!option.effect){return true}return false}$.fn.extend({effect:function(){var args=_normalizeArguments.apply(this,arguments),mode=args.mode,queue=args.queue,effectMethod=$.effects.effect[args.effect];if($.fx.off||!effectMethod){if(mode){return this[mode](args.duration,args.complete)}else{return this.each(function(){if(args.complete){args.complete.call(this)}})}}function run(next){var elem=$(this),complete=args.complete,mode=args.mode;function done(){if($.isFunction(complete)){complete.call(elem[0])}if($.isFunction(next)){next()}}if(elem.is(":hidden")?mode==="hide":mode==="show"){elem[mode]();done()}else{effectMethod.call(elem[0],args,done)}}return queue===false?this.each(run):this.queue(queue||"fx",run)},show:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args.mode="show";return this.effect.call(this,args)}}})($.fn.show),hide:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args.mode="hide";return this.effect.call(this,args)}}})($.fn.hide),toggle:(function(orig){return function(option){if(standardAnimationOption(option)||typeof option==="boolean"){return orig.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args.mode="toggle";return this.effect.call(this,args)}}})($.fn.toggle),cssUnit:function(key){var style=this.css(key),val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0){val=[parseFloat(style),unit]}});return val}})})();(function(){var baseEasings={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){baseEasings[name]=function(p){return Math.pow(p,i+2)}});$.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2)},Circ:function(p){return 1-Math.sqrt(1-p*p)},Elastic:function(p){return p===0||p===1?p:-Math.pow(2,8*(p-1))*Math.sin(((p-1)*80-7.5)*Math.PI/15)},Back:function(p){return p*p*(3*p-2)},Bounce:function(p){var pow2,bounce=4;while(p<((pow2=Math.pow(2,--bounce))-1)/11){}return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((pow2*3-2)/22-p,2)}});$.each(baseEasings,function(name,easeIn){$.easing["easeIn"+name]=easeIn;$.easing["easeOut"+name]=function(p){return 1-easeIn(1-p)};$.easing["easeInOut"+name]=function(p){return p<0.5?easeIn(p*2)/2:1-easeIn(p*-2+2)/2}})})();var effect=$.effects; -/* - * jQuery UI Effects Highlight 1.11.4 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/highlight-effect/ - */ -var effectHighlight=$.effects.effect.highlight=function(o,done){var elem=$(this),props=["backgroundImage","backgroundColor","opacity"],mode=$.effects.setMode(elem,o.mode||"show"),animation={backgroundColor:elem.css("backgroundColor")};if(mode==="hide"){animation.opacity=0}$.effects.save(elem,props);elem.show().css({backgroundImage:"none",backgroundColor:o.color||"#ffff99"}).animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(mode==="hide"){elem.hide()}$.effects.restore(elem,props);done()}})}}));; - -// *************************** -// js.compressed/jquery/jquery.cookie.min.js -// *************************** -/*jshint eqnull:true */ -/*! - * jQuery Cookie Plugin v1.2 - * https://github.com/carhartl/jquery-cookie - * - * Copyright 2011, Klaus Hartl - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://www.opensource.org/licenses/mit-license.php - * http://www.opensource.org/licenses/GPL-2.0 - */ -(function(a,b,c){function e(a){return a}function f(a){return decodeURIComponent(a.replace(d," "))}var d=/\+/g;var g=a.cookie=function(d,h,i){if(h!==c){i=a.extend({},g.defaults,i);if(h===null){i.expires=-1}if(typeof i.expires==="number"){var j=i.expires,k=i.expires=new Date;k.setDate(k.getDate()+j)}h=g.json?JSON.stringify(h):String(h);return b.cookie=[encodeURIComponent(d),"=",g.raw?h:encodeURIComponent(h),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}var l=g.raw?e:f;var m=b.cookie.split("; ");for(var n=0,o;o=m[n]&&m[n].split("=");n++){if(l(o.shift())===d){var p=l(o.join("="));return g.json?JSON.parse(p):p}}return null};g.defaults={};a.removeCookie=function(b,c){if(a.cookie(b)!==null){a.cookie(b,null,c);return true}return false}})(jQuery,document); - -// *************************** -// js.compressed/responsive.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["go_to_ellipsis"]);window.vBulletin=window.vBulletin||{};window.vBulletin.Responsive=window.vBulletin.Responsive||{};window.vBulletin.Responsive.bodyWidth=0;window.vBulletin.Responsive.scrollToFixedBreakPoint=480;vBulletin.Responsive.DocReady={load:function(){$(".blogAdminActive").click(function(A){$(this).parent().toggleClass("expanded")});Modernizr.addTest("firefox",function(){return !!navigator.userAgent.match(/firefox/i)});Modernizr.addTest("opera",function(){return !!navigator.userAgent.match(/opera/i)});$("#searchForm").addClass("desktopSearch");vBulletin.Responsive.ChannelTabBar.initMainMenu();vBulletin.Responsive.MediaQueries.setResizeEvent();vBulletin.Responsive.MediaQueries.handleResizeEvent();vBulletin.Responsive.ListToSelect.registerChangeEvents();vBulletin.Responsive.Footer.init();vBulletin.Responsive.Profile.clonePrivateMessageButton();vBulletin.Responsive.ChannelContent.cloneNewTopicButton();vBulletin.Responsive.SocialGroups.cloneButtons();vBulletin.Responsive.Profile.cloneButtons();vBulletin.Responsive.SearchResultsToolbar.createMobileView();vBulletin.Responsive.Debug.wrap();vBulletin.Responsive.ConversationContent.checkForSignature();vBulletin.Responsive.Touch.override();setTimeout(vBulletin.Responsive.ListToSelect.registerSyncMenuEvents,100)}};vBulletin.Responsive.Touch={override:function(){var B="touch";if($("html").hasClass(B)){var F="no-touch";var E=navigator.userAgent.toLowerCase();var A="Firefox".toLowerCase();var D=E.indexOf(A);var G="Windows NT 6.1".toLowerCase();var C=E.indexOf(G);if(D!==-1&&C!==-1){$("html").removeClass(B).addClass(F)}}}};vBulletin.Responsive.Modal={init:function(){if($(".sgIconUploader").length){var B=["ui-dialog","ui-widget","ui-widget-content","ui-corner-all","ui-draggable","ui-resizable"];var A="body div."+B.join(".");if(!$(A).hasClass("rx-modal")){$(A).addClass("rx-modal")}}setTimeout(this.setRadioState,100)},setRadioState:function(){$("input:radio[name=sgIconToggle]:visible:first").click()}};vBulletin.Responsive.Debug={wrap:function(){var B="debug-information";var A="debug-information-wrapper";if($("#"+B).length&&!$("#"+A).length){$("#"+B).wrap('
      ')}}};vBulletin.Responsive.ListToSelect={handleSelectChangeHome:function(){var C=$("div.activity-stream-widget > .widget-header > .module-title.h-left > select").get(0);var B=C.selectedIndex;var A="div.activity-stream-widget > .widget-header > .module-title.h-left > ul [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeProfileSubscriptions:function(){var C=$(".subscriptionsContainer > .subscribeTabs > div.widget-tabs-nav > select").get(0);var B=C.selectedIndex;var A=".subscriptionsContainer > .subscribeTabs > ul.widget-tabs-nav [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeForum:function(){var C=$("div.channel-content-widget > .widget-content > .channel-conversation-list-wrapper > .widget-tabs-nav > select").get(0);var B=C.selectedIndex;var A="div.channel-content-widget > .widget-content > .channel-conversation-list-wrapper > .widget-tabs-nav > ul.ui-tabs-nav [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeForumElse:function(){var C=$("div.channel-content-widget > .widget-header > .module-title.h-left > select").get(0);var B=C.selectedIndex;var A="div.channel-content-widget > .widget-header > .module-title.h-left > ul [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeBlog:function(){var C=$("div.blog-channel-content-widget > .widget-content > .channel-conversation-list-wrapper > select").get(0);var B=C.selectedIndex;var A="div.blog-channel-content-widget > .widget-content > .channel-conversation-list-wrapper > .widget-tabs-nav > ul.ui-tabs-nav [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeBlogElse:function(){var C=$("div.blog-channel-content-widget > .widget-header > .module-title.h-left > select").get(0);var B=C.selectedIndex;var A="div.blog-channel-content-widget > .widget-header > .module-title.h-left > ul [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeBlogNewEntry:function(){var C=$("div.blog-channel-content-widget > .channel-conversation-list-wrapper > .widget-tabs-nav > select").get(0);var B=C.selectedIndex;var A="div.blog-channel-content-widget > .channel-conversation-list-wrapper > .widget-tabs-nav > ul [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeProfile:function(){var C=$("div.profile-widget > .widget-content > .profile-container > .widget-tabs > .widget-tabs-nav > select").get(0);var B=C.selectedIndex;var A="div.profile-widget > .widget-content > .profile-container > .widget-tabs > ul [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},selectTab:function(A){$(A).click()},registerChangeEvents:function(){this.registerSelectChangeHome();this.registerSelectChangeForum();this.registerSelectChangeForumElse();this.registerSelectChangeBlog();this.registerSelectChangeBlogElse();this.registerSelectChangeBlogNewEntry();this.registerSelectChangeProfile();this.registerSelectChangeProfileSubscriptions()},registerSelectChangeHome:function(){$("div.activity-stream-widget > .widget-header > .module-title.h-left > select").on("change",this.handleSelectChangeHome)},registerSelectChangeForum:function(){$("div.channel-content-widget > .widget-content > .channel-conversation-list-wrapper > .widget-tabs-nav > select").on("change",this.handleSelectChangeForum)},registerSelectChangeForumElse:function(){$("div.channel-content-widget > .widget-header > .module-title.h-left > select").on("change",this.handleSelectChangeForumElse)},registerSelectChangeBlog:function(){$("div.blog-channel-content-widget > .widget-content > .channel-conversation-list-wrapper > select").on("change",this.handleSelectChangeBlog)},registerSelectChangeBlogElse:function(){$("div.blog-channel-content-widget > .widget-header > .module-title.h-left > select").on("change",this.handleSelectChangeBlogElse)},registerSelectChangeBlogNewEntry:function(){$("div.blog-channel-content-widget > .channel-conversation-list-wrapper > .widget-tabs-nav > select").on("change",this.handleSelectChangeBlogNewEntry)},registerSelectChangeProfile:function(){$("div.profile-widget> .widget-content > .profile-container > .widget-tabs > .widget-tabs-nav > select").on("change",this.handleSelectChangeProfile)},registerSelectChangeProfileSubscriptions:function(){$(".subscriptionsContainer > .subscribeTabs > div.widget-tabs-nav > select").on("change",this.handleSelectChangeProfileSubscriptions)},tabSelected:function(B){if(B.length){var A=B.closest(".ui-tabs-nav").parent().find("select");A.find('option[value="'+B[0].hash+'"]').prop("selected",true)}},registerSyncMenuEvents:function(){$(".ui-tabs").on("tabsshow",function(A,B){vBulletin.Responsive.ListToSelect.tabSelected($(B.tab))});$(".ui-tabs .ui-tabs-nav li.ui-tabs-active a").each(function(){vBulletin.Responsive.ListToSelect.tabSelected($(this))})}};vBulletin.Responsive.Facade={addFacadeControlToToolbar:function(I,F,D,J){var C=$(I);var A=$(F);var B=$(D);if(C.length&&!A.length&&B.length){var G=B[0];var H=$(G).clone();if(J){for(var E=0;E
      ';$(A+" .conversation-toolbar-wrapper").prepend(B)}}};vBulletin.Responsive.Profile={styleSidebarContent:function(){$(".profile-info-item").removeClass()},clonePrivateMessageButton:function(){var C=".conversation-toolbar > ul > li > a.pm_button";var B=".profile_sidebar_content > .profileContainer";var A=".profile_sidebar_content > .profileContainer > div.pm-button-container > a.pm_button";if($(C).length){if($(B).length){if(!$(A).length){var E=$(C).clone();var D=$('
      ').append(E);$(B).append(D);$(C).addClass("h-hide-on-small")}}}},cloneButtons:function(){this.cloneTabButtons("subscription");this.cloneTabButtons("subscriber")},cloneTabButtons:function(D){var F="#"+D+"sTab";var E=D+"s-totalcount";var A=$(F+" .conversation-toolbar .toolset-left .back-button");var C=$(F+" .conversation-toolbar");var B=$(F+" .conversation-toolbar.rx-facade-back-to-profile");if(A.length&&!B.length){C.addClass("rx-desktop");vBulletin.Responsive.Facade.addNewConversationToolbarToDOM(F,"rx-facade-"+D+"-count");vBulletin.Responsive.Facade.addFacadeControlToToolbar(F+" .conversation-toolbar.rx-facade-"+D+"-count ul.toolset-left li",F+" .conversation-toolbar.rx-facade-"+D+"-count ul.toolset-left li ."+E,F+" .conversation-toolbar .toolset-left ."+E);vBulletin.Responsive.Facade.addNewConversationToolbarToDOM(F,"rx-facade-back-to-profile");vBulletin.Responsive.Facade.addFacadeControlToToolbar(F+" .conversation-toolbar.rx-facade-back-to-profile ul.toolset-left li",F+" .conversation-toolbar.rx-facade-back-to-profile ul.toolset-left li .back-button",F+" .conversation-toolbar .toolset-left .back-button");vBulletin.Responsive.Facade.addFacadeControlToToolbar(F+" .conversation-toolbar.rx-facade-"+D+"-count ul.toolset-left li",F+" .conversation-toolbar.rx-facade-back-to-profile ul.toolset-left li .rx-ignore",F+" .conversation-toolbar .toolset-left .rx-ignore")}}};vBulletin.Responsive.ChannelContent={cloneNewTopicButton:function(){var A=$(".conversation-toolbar .toolset-left .new-conversation-btn"),D=A.first(),E=$(".channel-content-widget .channel-controls"),C=$(".channel-content-widget .channel-controls > .new-conversation-btn");if(D.length&&E.length&&!C.length){A.addClass("h-hide-on-small");var B=D.clone();B.addClass("h-hide-on-large");B.attr("id","rx-facade-new-conversation-btn");B.off("click").on("click",function(){D.click()});E.append(B)}}};vBulletin.Responsive.SocialGroups={cloneButtons:function(){if($(".groups-tab .conversation-toolbar .toolset-left div.button-set").length){vBulletin.Responsive.Facade.addNewConversationToolbarToDOM(".groups-tab","rx-facade-show-groups");vBulletin.Responsive.Facade.addFacadeControlToToolbar(".groups-tab .conversation-toolbar.rx-facade-show-groups ul.toolset-left li",".groups-tab .conversation-toolbar.rx-facade-show-groups ul.toolset-left li div.button-set",".groups-tab .conversation-toolbar .toolset-left div.button-set",["button.showAll","button.showMy"]);vBulletin.Responsive.Facade.addNewConversationToolbarToDOM(".groups-tab","rx-facade-create-groups");vBulletin.Responsive.Facade.addFacadeControlToToolbar(".groups-tab .conversation-toolbar.rx-facade-create-groups ul.toolset-left li",".groups-tab .conversation-toolbar.rx-facade-create-groups ul.toolset-left li button.add-sg",".groups-tab .conversation-toolbar .toolset-left button.add-sg")}}};vBulletin.Responsive.SearchResultsToolbar={selector:".search-results-widget .conversation-toolbar",createMobileView:function(){var A=vBulletin.Responsive.SearchResultsToolbar.selector;var C=A+".desktop";var B=$(A);B.addClass("desktop");if($(C).find(".toolbar-pagenav").length){$("
      ").addClass("conversation-toolbar mobile-search-results").insertAfter(B);this.copyElementsToMobileSearchResultsToolbar()}},copyElementsToMobileSearchResultsToolbar:function(){var B=vBulletin.Responsive.SearchResultsToolbar.selector;var E=B+".desktop";var F=B+".mobile-search-results";var D=$(E);var C=$(F);var A=D.find(".toolset-right").clone(true,true);C.append(A)}};vBulletin.Responsive.Search={cloneTagsLink:function(){if(!$("#rx-tags-column").length){var C=$(".form-row-tags");if(C.length){var A=$(".form-row-tags > .field_column");var D=$(".tag-editor-wrapper > span.add-tag-link");var B=D.clone();B.on("click",function(){$(".tag-editor-wrapper > span.add-tag-link").click()});A.css("display","block");D.addClass("h-hide-on-small");C.append("
      ");B.appendTo($("#rx-tags-column"))}}}};vBulletin.Responsive.Footer=(function(){var C=0;var F=5;function A(){var I=this;var H=I.selectedIndex;var G=I.options[H].value;if(G!==""){var J=$(I.options[H]);if(J.data("is-go-to-top-link")){$(".js-footer-go-to-top").click()}else{window.location.href=G}}}function B(){if(C>F){$("#footer-tabbar > ul.h-right").addClass("rx-menu-limit-exceeded");$("#footer-tabbar > ul.h-left > li.rx-list-to-select").addClass("rx-menu-limit-exceeded")}else{$("#footer-tabbar > ul.h-right").addClass("rx-menu-limit-ok");$("#footer-tabbar > ul.h-left > li.rx-list-to-select").addClass("rx-menu-limit-ok")}}function D(){var G=$("
      ';return A},showMobileSearchForm:function(){var C=$("form.mobileSearch");var B=$("form.desktopSearch");var A=$("form.mobileSearch input.search-term");var D=$("form.desktopSearch input.search-term");if(C.length){C.attr("id","searchForm");A.attr("id","q")}if(B.length){B.attr("id","searchFormDesktop");D.attr("id","qDesktop")}this.showCollapsed();vBulletin.Responsive.ChannelTabBar.isMobileMenu=true},showDesktopSearchForm:function(){var C=$("form.mobileSearch");var B=$("form.desktopSearch");var A=$("form.mobileSearch input.search-term");var D=$("form.desktopSearch input.search-term");if(C.length){C.attr("id","searchFormMobile");A.attr("id","qMobile")}if(B.length){B.attr("id","searchForm");D.attr("id","q")}this.showExpanded();vBulletin.Responsive.ChannelTabBar.isMobileMenu=false},create:function(){if(!$("form.mobileSearch").length){var A=this.getMobileSearchForm();$("#mobile-main-menu-search").append(A);this.showMobileSearchForm();$(vBulletin.Responsive.ChannelTabBar.sectionItemsSelector).each(function(){var B=$(this).find("a").attr("href");$(this).click(function(){window.location=B})})}},toggle:function(F){if(F==="search"){var D=$("#mobile-main-menu-search");var E=$("#mobile-main-menu-sections");if(D.css("display")==="none"){E.css("display","none");D.css("display","inline-block")}else{var G=$("#mobile-main-menu-search input");var C=$(G[0]).val();if(C!==""){var A=$("#mobile-main-menu-search form");A[0].submit()}else{D.css("display","none");E.css("display","inline-block")}}}else{if(F==="sections"){var B=$(vBulletin.Responsive.ChannelTabBar.sectionItemsSelector);if(B.length){if(B.eq(0).css("display")==="none"){this.showExpanded()}else{this.showCollapsed()}}}}},showExpanded:function(){$(vBulletin.Responsive.ChannelTabBar.sectionItemsSelector).css("display","block");this.removeCollapsedClass()},showCollapsed:function(){$(vBulletin.Responsive.ChannelTabBar.sectionItemsSelector).css("display","none");this.addCollapsedClass()},removeCollapsedClass:function(){$("#mobile-main-menu-sections div.main-menu-control-sections").removeClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-menu-icon span.icon").removeClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-icon .icon").removeClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-title").removeClass("collapsed")},addCollapsedClass:function(){$("#mobile-main-menu-sections div.main-menu-control-sections").addClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-menu-icon .icon").addClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-icon .icon").addClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-title").addClass("collapsed")}};vBulletin.Responsive.ConversationContent={checkForSignature:function(){$(".conversation-content .videoscontainer").each(function(){if(!$(this).siblings("div.post-signature").length){$(this).addClass("no-signature")}})}};vBulletin.Responsive.ConversationToolbar={selector:".conversation-view > .conversation-toolbar-wrapper > .conversation-toolbar",createMobileView:function(){var A=vBulletin.Responsive.ConversationToolbar.selector;var B=A+".desktop";var C=$(A);C.addClass("desktop");if($(B).find("button.post-reply-btn").length){$("
      ").addClass("conversation-toolbar mobile-search").insertAfter(C);this.copyElementsToMobileSearchToolbar()}},toggleInlineModControls:function(A){if(A){if($(".mobile-inline-mod-controls").length==0){var C=$(vBulletin.Responsive.ConversationToolbar.selector).first();$("
      ").addClass("conversation-toolbar mobile-inline-mod-controls").insertAfter(C);$("
        ").addClass("toolset-right").appendTo(".mobile-inline-mod-controls");var D=$(".mobile-inline-mod-controls"),B=$(".mobile-inline-mod-controls .toolset-right");C.find(".toolbar-inline-mod").appendTo(B)}}else{if($(".mobile-inline-mod-controls").length>0){var C=$(vBulletin.Responsive.ConversationToolbar.selector).first();$(".mobile-inline-mod-controls .toolbar-inline-mod").appendTo(C.find(".toolset-right"));$(".mobile-inline-mod-controls").remove()}}},copyElementsToMobileSearchToolbar:function(){var D=vBulletin.Responsive.ConversationToolbar.selector;var B=D+".desktop";var J=D+".mobile-search";var F=$(B);var A=$(J);A.css("display","none");var E=F.find("button.post-reply-btn").clone(true,true).removeAttr("id");var I=$("
          ").addClass("toolset-left");var H=$("
        • ");H.append(E);I.append(H);A.append(I);var C=$("
            ").addClass("toolset-right");var G=F.find("li.toolbar-search").clone(true,true);G.find("button").removeAttr("id");C.append(G);A.append(C)}}; -/* - * jQuery throttle / debounce - v1.1 - 3/7/2010 - * http://benalman.com/projects/jquery-throttle-debounce-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function(B,C){var $=B.jQuery||B.Cowboy||(B.Cowboy={}),A;$.throttle=A=function(E,F,J,I){var H,D=0;if(typeof F!=="boolean"){I=J;J=F;F=C}function G(){var O=this,M=+new Date()-D,N=arguments;function L(){D=+new Date();J.apply(O,N)}function K(){H=C}if(I&&!H){L()}H&&clearTimeout(H);if(I===C&&M>E){L()}else{if(F!==true){H=setTimeout(I?K:L,I===C?E-M:E)}}}if($.guid){G.guid=J.guid=J.guid||$.guid++}return G};$.debounce=function(D,E,F){return F===C?A(D,E,false):A(D,F,E!==false)}})(this);$.extend(vBulletin.Responsive.Debounce,{init:function(){var C=0;var A=function(){var F=new Date();var G=F.getTime();if(C>0){console.log(G-C)}C=G};var B=function(){var F=$(window).width();if(F<480){$("body").addClass("l-xsmall")}else{$("body").removeClass("l-xsmall")}if(F<768){$("body").addClass("l-small")}else{$("body").removeClass("l-small")}if(F>=768){$("body").addClass("l-desktop")}else{$("body").removeClass("l-desktop")}};var E=function(){var F=$(".l-row");if(F.length<1){return }F.reverse().each(function(){var I=$(this);if(I.width()>=768){I.removeClass("l-small");return true}var G=I.find("> .l-col__flex-1, > .l-col__flex-2, > .l-col__flex-3, > .l-col__flex-4, > .l-col__flex-5, > .l-col__flex-6"),H=false;I.removeClass("l-small");G.reverse().each(function(){if(this.offsetWidthH){if(!L.data("original-dialog-width")){L.data("original-dialog-width",M)}L.dialog("option","width",H)}else{if(M0){var B,A=vBulletin.Responsive.Debounce.callbacks.length;for(B=0;B=0;--P){for(var R=0;R0){P=V.pop();K(P.key);K(J(P.key));Q-=P.size}try{F(U,T)}catch(S){return }}else{return }}F(J(U),window.pageData.current_server_datetime)},get:function(P){if(!G()){return null}C();var Q=N[D];var O=J(P);var T=L(O);var R=L(P);if(R==null){R=Q.bucketProvider(P,N[D].preCache)}if(!R||!A()){return R}try{return JSON.parse(R)}catch(S){return R}},remove:function(O){if(!G()){return null}K(O);K(J(O))},supported:function(){return G()},flush:function(){if(!G()){return }for(var P=localStorage.length-1;P>=0;--P){var O=localStorage.key(P);if(O.indexOf(H+D)===0){localStorage.removeItem(O)}}},initBucket:function(S,O,Q,R){N[S]={latestChange:O,bucketProvider:R,preCache:Q};D=S;var P=localStorage.getItem(H);if(P!==null){E=JSON.parse(P)}else{E={}}C()},setBucket:function(O){D=O}}}();; - -// *************************** -// js.compressed/jquery/jquery.elastic-1.6.11.custom.min.js -// *************************** -/** -* @name Elastic -* @descripton Elastic is jQuery plugin that grow and shrink your textareas automatically -* @version 1.6.11 -* @requires jQuery 1.2.6+ -* -* @author Jan Jarfalk -* @author-email jan.jarfalk@unwrongest.com -* @author-website http://www.unwrongest.com -* -* @licence MIT License - http://www.opensource.org/licenses/mit-license.php -*/ -/* -* Modified for vBulletin: -* - Replace twin DOM node instead of adding a new one for every elastic textarea -* - Added namespace to events bound by the plugin to the textarea to allow us to programmatically trigger events specific to this plugin -* - Added checking for CSS box-sizing in determining the actual height and width of the textarea -*/ -(function(e){jQuery.fn.extend({elastic:function(){var t=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","borderTopStyle","borderTopColor","borderRightStyle","borderRightColor","borderBottomStyle","borderBottomColor","borderLeftStyle","borderLeftColor"];return this.each(function(){function a(){var e=n().width;if(i.width()!==e){i.css({width:e+"px"});l(true)}}function f(e,t){var i=parseInt(e,10);if(n().height!==i){r.css({height:i+"px",overflow:t})}}function l(e){var t=r.val().replace(/&/g,"&").replace(/ {2}/g," ").replace(/<|>/g,">").replace(/\n/g,"
            ");var s=i.html().replace(/
            /ig,"
            ");if(e||t+" "!==s){i.html(t+" ");if(Math.abs(i.height()+lineHeight-n().height)>3){var o=i.height()+lineHeight;if(o>=maxheight){f(maxheight,"auto")}else if(o<=minheight){f(minheight,"hidden")}else{f(o,"hidden")}}}}if(this.type!=="textarea"){return false}var n=function(){return s=="border-box"?{height:r.outerHeight(),width:r.outerWidth()}:s=="padding-box"?{height:r.innerHeight(),width:r.innerWidth()}:{height:r.height(),width:r.width()}};var r=jQuery(this),i=jQuery("
            ").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap"}).addClass("elastic-twin-div"),s=r.css("box-sizing")||r.css("-moz-box-sizing")||r.css("-webkit-box-sizing")||"content-box";lineHeight=parseInt(r.css("line-height"),10)||parseInt(r.css("font-size"),"10"),minheight=n().height||lineHeight*3,maxheight=parseInt(r.css("max-height"),10)||Number.MAX_VALUE,goalheight=0;if(maxheight<0){maxheight=Number.MAX_VALUE}var o=e("> .elastic-twin-div",r.parent());if(o.length==1){o.replaceWith(i)}else{i.appendTo(r.parent())}var u=t.length;while(u--){i.css(t[u].toString(),r.css(t[u].toString()))}r.css({overflow:"hidden"});r.bind("keyup.elastic change.elastic cut.elastic paste.elastic",function(){l()});e(window).bind("resize.elastic",a);r.bind("resize.elastic focus.elastic",a);r.bind("update.elastic",l);r.bind("blur.elastic",function(){if(i.height()minheight){r.height(i.height())}else{r.height(minheight)}}});r.bind("input.elastic paste.elastic",function(e){setTimeout(l,250)});l()})}})})(jQuery); - -// *************************** -// js.compressed/jquery/jquery.form.min.js -// *************************** -/*! - * jQuery Form Plugin - * version: 2.85 (23-SEP-2011) - * @requires jQuery v1.3.2 or later - * - * Examples and documentation at: http://malsup.com/jquery/form/ - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ -(function(a){function b(){if(!a.fn.ajaxSubmit.debug)return;var b="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(b)}else if(window.opera&&window.opera.postError){window.opera.postError(b)}}a.fn.ajaxSubmit=function(c){function t(e){function w(a){var b=a.contentWindow?a.contentWindow.document:a.contentDocument?a.contentDocument:a.document;return b}function x(){function h(){try{var a=w(n).readyState;b("state = "+a);if(a.toLowerCase()=="uninitialized")setTimeout(h,50)}catch(c){b("Server abort: ",c," (",c.name,")");C(v);s&&clearTimeout(s);s=undefined}}var c=g.attr("target"),e=g.attr("action");f.setAttribute("target",l);if(!d){f.setAttribute("method","POST")}if(e!=j.url){f.setAttribute("action",j.url)}if(!j.skipEncodingOverride&&(!d||/post/i.test(d))){g.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(j.timeout){s=setTimeout(function(){r=true;C(u)},j.timeout)}var i=[];try{if(j.extraData){for(var k in j.extraData){i.push(a('').attr("value",j.extraData[k]).appendTo(f)[0])}}if(!j.iframeTarget){m.appendTo("body");n.attachEvent?n.attachEvent("onload",C):n.addEventListener("load",C,false)}setTimeout(h,15);f.submit()}finally{f.setAttribute("action",e);if(c){f.setAttribute("target",c)}else{g.removeAttr("target")}a(i).remove()}}function C(c){if(o.aborted||B){return}try{z=w(n)}catch(d){b("cannot access response document: ",d);c=v}if(c===u&&o){o.abort("timeout");return}else if(c==v&&o){o.abort("server abort");return}if(!z||z.location.href==j.iframeSrc){if(!r)return}n.detachEvent?n.detachEvent("onload",C):n.removeEventListener("load",C,false);var e="success",f;try{if(r){throw"timeout"}var g=j.dataType=="xml"||z.XMLDocument||a.isXMLDoc(z);b("isXml="+g);if(!g&&window.opera&&(z.body==null||z.body.innerHTML=="")){if(--A){b("requeing onLoad callback, DOM not available");setTimeout(C,250);return}}var h=z.body?z.body:z.documentElement;o.responseText=h?h.innerHTML:null;o.responseXML=z.XMLDocument?z.XMLDocument:z;if(g)j.dataType="xml";o.getResponseHeader=function(a){var b={"content-type":j.dataType};return b[a]};if(h){o.status=Number(h.getAttribute("status"))||o.status;o.statusText=h.getAttribute("statusText")||o.statusText}var i=(j.dataType||"").toLowerCase();var l=/(json|script|text)/.test(i);if(l||j.textarea){var p=z.getElementsByTagName("textarea")[0];if(p){o.responseText=p.value;o.status=Number(p.getAttribute("status"))||o.status;o.statusText=p.getAttribute("statusText")||o.statusText}else if(l){var q=z.getElementsByTagName("pre")[0];var t=z.getElementsByTagName("body")[0];if(q){o.responseText=q.textContent?q.textContent:q.innerText}else if(t){o.responseText=t.textContent?t.textContent:t.innerText}}}else if(i=="xml"&&!o.responseXML&&o.responseText!=null){o.responseXML=D(o.responseText)}try{y=F(o,i,j)}catch(c){e="parsererror";o.error=f=c||e}}catch(c){b("error caught: ",c);e="error";o.error=f=c||e}if(o.aborted){b("upload aborted");e=null}if(o.status){e=o.status>=200&&o.status<300||o.status===304?"success":"error"}if(e==="success"){j.success&&j.success.call(j.context,y,"success",o);k&&a.event.trigger("ajaxSuccess",[o,j])}else if(e){if(f==undefined)f=o.statusText;j.error&&j.error.call(j.context,o,e,f);k&&a.event.trigger("ajaxError",[o,j,f])}k&&a.event.trigger("ajaxComplete",[o,j]);if(k&&!--a.active){a.event.trigger("ajaxStop")}j.complete&&j.complete.call(j.context,o,e);B=true;if(j.timeout)clearTimeout(s);setTimeout(function(){if(!j.iframeTarget)m.remove();o.responseXML=null},100)}var f=g[0],h,i,j,k,l,m,n,o,p,q,r,s;var t=!!a.fn.prop;if(e){if(t){for(i=0;i');m.css({position:"absolute",top:"-1000px",left:"-1000px"})}n=m[0];o={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(c){var d=c==="timeout"?"timeout":"aborted";b("aborting upload... "+d);this.aborted=1;m.attr("src",j.iframeSrc);o.error=d;j.error&&j.error.call(j.context,o,d,c);k&&a.event.trigger("ajaxError",[o,j,d]);j.complete&&j.complete.call(j.context,o,d)}};k=j.global;if(k&&!(a.active++)){a.event.trigger("ajaxStart")}if(k){a.event.trigger("ajaxSend",[o,j])}if(j.beforeSend&&j.beforeSend.call(j.context,o,j)===false){if(j.global){a.active--}return}if(o.aborted){return}p=f.clk;if(p){q=p.name;if(q&&!p.disabled){j.extraData=j.extraData||{};j.extraData[q]=p.value;if(p.type=="image"){j.extraData[q+".x"]=f.clk_x;j.extraData[q+".y"]=f.clk_y}}}var u=1;var v=2;if(j.forceSync){x()}else{setTimeout(x,10)}var y,z,A=50,B;var D=a.parseXML||function(a,b){if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLDOM");b.async="false";b.loadXML(a)}else{b=(new DOMParser).parseFromString(a,"text/xml")}return b&&b.documentElement&&b.documentElement.nodeName!="parsererror"?b:null};var E=a.parseJSON||function(a){return window["eval"]("("+a+")")};var F=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f=c==="xml"||!c&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;if(f&&g.documentElement.nodeName==="parsererror"){a.error&&a.error("parsererror")}if(d&&d.dataFilter){g=d.dataFilter(g,c)}if(typeof g==="string"){if(c==="json"||!c&&e.indexOf("json")>=0){g=E(g)}else if(c==="script"||!c&&e.indexOf("javascript")>=0){a.globalEval(g)}}return g}}if(!this.length){b("ajaxSubmit: skipping submit process - no element selected");return this}var d,e,f,g=this;if(typeof c=="function"){c={success:c}}d=this.attr("method");e=this.attr("action");f=typeof e==="string"?a.trim(e):"";f=f||window.location.href||"";if(f){f=(f.match(/^([^#]+)/)||[])[1]}c=a.extend(true,{url:f,success:a.ajaxSettings.success,type:d||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},c);var h={};this.trigger("form-pre-serialize",[this,c,h]);if(h.veto){b("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(c.beforeSerialize&&c.beforeSerialize(this,c)===false){b("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var i,j,k=this.formToArray(c.semantic);if(c.data){c.extraData=c.data;for(i in c.data){if(a.isArray(c.data[i])){for(var l in c.data[i]){k.push({name:i,value:c.data[i][l]})}}else{j=c.data[i];j=a.isFunction(j)?j():j;k.push({name:i,value:j})}}}if(c.beforeSubmit&&c.beforeSubmit(k,this,c)===false){b("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[k,this,c,h]);if(h.veto){b("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var m=a.param(k);if(c.type.toUpperCase()=="GET"){c.url+=(c.url.indexOf("?")>=0?"&":"?")+m;c.data=null}else{c.data=m}var n=[];if(c.resetForm){n.push(function(){g.resetForm()})}if(c.clearForm){n.push(function(){g.clearForm()})}if(!c.dataType&&c.target){var o=c.success||function(){};n.push(function(b){var d=c.replaceTarget?"replaceWith":"html";a(c.target)[d](b).each(o,arguments)})}else if(c.success){n.push(c.success)}c.success=function(a,b,d){var e=c.context||c;for(var f=0,h=n.length;f0;var q="multipart/form-data";var r=g.attr("enctype")==q||g.attr("encoding")==q;if(c.iframe!==false&&(p||c.iframe||r)){if(c.closeKeepAlive){a.get(c.closeKeepAlive,function(){t(k)})}else{t(k)}}else{if(a.browser.msie&&d=="get"&&typeof c.type==="undefined"){var s=g[0].getAttribute("method");if(typeof s==="string")c.type=s}a.ajax(c)}this.trigger("form-submit-notify",[this,c]);return this};a.fn.ajaxForm=function(c){if(this.length===0){var d={s:this.selector,c:this.context};if(!a.isReady&&d.s){b("DOM not ready, queuing ajaxForm");a(function(){a(d.s,d.c).ajaxForm(c)});return this}b("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(b){if(!b.isDefaultPrevented()){b.preventDefault();a(this).ajaxSubmit(c)}}).bind("click.form-plugin",function(b){var c=b.target;var d=a(c);if(!d.is(":submit,input:image")){var e=d.closest(":submit");if(e.length==0){return}c=e[0]}var f=this;f.clk=c;if(c.type=="image"){if(b.offsetX!=undefined){f.clk_x=b.offsetX;f.clk_y=b.offsetY}else if(typeof a.fn.offset=="function"){var g=d.offset();f.clk_x=b.pageX-g.left;f.clk_y=b.pageY-g.top}else{f.clk_x=b.pageX-c.offsetLeft;f.clk_y=b.pageY-c.offsetTop}}setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)})};a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};a.fn.formToArray=function(b){var c=[];if(this.length===0){return c}var d=this[0];var e=b?d.getElementsByTagName("*"):d.elements;if(!e){return c}var f,g,h,i,j,k,l;for(f=0,k=e.length;f'),i=k.attr("multiple")||parseInt(k.attr("size"))>1;var c=e||{};d.addClass(k.attr("class")).attr("title",k.attr("title")||"").attr("tabindex",parseInt(k.attr("tabindex"))).css("display","inline-block").bind("focus.selectBox",function(){if(this!==document.activeElement&&document.body!==document.activeElement){A(document.activeElement).blur()}if(d.hasClass("selectBox-active")){return }d.addClass("selectBox-active");k.trigger("focus")}).bind("blur.selectBox",function(){if(!d.hasClass("selectBox-active")){return }d.removeClass("selectBox-active");k.trigger("blur")});if(!A(window).data("selectBox-bindings")){A(window).data("selectBox-bindings",true).bind("scroll.selectBox",H).bind("resize.selectBox",H)}if(k.attr("disabled")){d.addClass("selectBox-disabled")}k.bind("click.selectBox",function(r){d.focus();r.preventDefault()});if(i){q=M(k,"inline");d.append(q).data("selectBox-options",q).addClass("selectBox-inline selectBox-menuShowing").bind("keydown.selectBox",function(r){O(k,r)}).bind("keypress.selectBox",function(r){D(k,r)}).bind("mousedown.selectBox",function(r){if(A(r.target).is("A.selectBox-inline")){r.preventDefault()}if(!d.hasClass("selectBox-focus")){d.focus()}}).insertAfter(k);d.width(k.css("fontSize",d.css("fontSize")).outerWidth());if(!k[0].style.height){var p=k.attr("size")?parseInt(k.attr("size")):5;var f=d.clone().removeAttr("id").css({position:"absolute",top:"-9999em"}).show().appendTo("body");f.find(".selectBox-options").html("
          • \u00A0
          • ");var n=parseInt(f.find(".selectBox-options A:first").html(" ").outerHeight());f.remove();d.height(n*p)}I(d)}else{var j=A(''),m=A('');j.attr("class",B(k)).text(Q(k));q=M(k,"dropdown");q.appendTo("BODY");d.data("selectBox-options",q).addClass("selectBox-dropdown").append(j).append(m).bind("mousedown.selectBox",function(r){if(d.hasClass("selectBox-menuShowing")){H()}else{r.stopPropagation();q.data("selectBox-down-at-x",r.screenX).data("selectBox-down-at-y",r.screenY);R(k)}}).bind("keydown.selectBox",function(r){O(k,r)}).bind("keypress.selectBox",function(r){D(k,r)}).bind("open.selectBox",function(s,r){if(r&&r._selectBox===true){return }R(k)}).bind("close.selectBox",function(s,r){if(r&&r._selectBox===true){return }H()}).insertAfter(k);d.width(k.css("fontSize",d.css("fontSize")).width())-parseInt(d.css("border-left-width"),10)-parseInt(d.css("border-right-width"),10);var h=d.width()-m.outerWidth()-parseInt(j.css("paddingLeft"))-parseInt(j.css("paddingRight"));j.width(h);I(d)}var g=A(".selectBox-label",d);var o=parseInt(g.css("paddingLeft"))-4+parseInt(g.css("paddingRight"));var l=d.width()+o;if(l<=d.parent().innerWidth()){d.width(l);g.width(g.width()+o)}k.addClass("selectBox").data("selectBox-control",d).data("selectBox-settings",c).hide()};var M=function(c,h){var e;var d=function(i,j){i.children("OPTION, OPTGROUP").each(function(){if(A(this).is("OPTION")){if(A(this).length>0){G(A(this),j)}else{j.append("
          • \u00A0
          • ")}}else{var k=A('
          • ');k.text(A(this).attr("label"));j.append(k);j=d(A(this),j)}});return j};switch(h){case"inline":e=A('
              ');e=d(c,e);e.find("A").bind("mouseover.selectBox",function(i){X(c,A(this).parent())}).bind("mouseout.selectBox",function(i){a(c,A(this).parent())}).bind("mousedown.selectBox",function(i){i.preventDefault();if(!c.selectBox("control").hasClass("selectBox-active")){c.selectBox("control").focus()}}).bind("mouseup.selectBox",function(i){H();W(c,A(this).parent(),i)});I(e);return e;case"dropdown":e=A('
                ');e=d(c,e);e.data("selectBox-select",c).css("display","none").appendTo("BODY").find("A").bind("mousedown.selectBox",function(i){i.preventDefault();if(i.screenX===e.data("selectBox-down-at-x")&&i.screenY===e.data("selectBox-down-at-y")){e.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y");H()}}).bind("mouseup.selectBox",function(i){if(i.screenX===e.data("selectBox-down-at-x")&&i.screenY===e.data("selectBox-down-at-y")){return }else{e.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y")}W(c,A(this).parent());H()}).bind("mouseover.selectBox",function(i){X(c,A(this).parent())}).bind("mouseout.selectBox",function(i){a(c,A(this).parent())});var g=c.attr("class")||"";if(g!==""){g=g.split(" ");for(var f in g){e.addClass(g[f]+"-selectBox-dropdown-menu")}}I(e);return e}};var B=function(c){var d=A(c).find("OPTION:selected");return("selectBox-label "+(d.attr("class")||"")).replace(/\s+$/,"")};var Q=function(c){var d=A(c).find("OPTION:selected");return d.text()||"\u00A0"};var U=function(c){c=A(c);var d=c.data("selectBox-control");if(!d){return }d.find(".selectBox-label").attr("class",B(c)).text(Q(c))};var Y=function(c){c=A(c);var e=c.data("selectBox-control");if(!e){return }var d=e.data("selectBox-options")||A();d.remove();e.remove();c.removeClass("selectBox").removeData("selectBox-control").data("selectBox-control",null).removeData("selectBox-settings").data("selectBox-settings",null).show()};var L=function(c){c=A(c);c.selectBox("options",c.html())};var R=function(d){d=A(d);var i=d.data("selectBox-control")||A(),g=d.data("selectBox-settings")||{},e=i.data("selectBox-options")||A();if(i.hasClass("selectBox-disabled")){return false}H();var f=parseInt(i.css("borderBottomWidth"))||0;e.width(i.innerWidth()).css({top:i.offset().top+i.outerHeight()-f,left:i.offset().left});if(d.triggerHandler("beforeopen")){return false}var h=function(){d.triggerHandler("open",{_selectBox:true});if(!T(e)){e.css("top",parseFloat(e.css("top"))-(i.outerHeight()+e.outerHeight()))}};switch(g.menuTransition){case"fade":e.fadeIn(g.menuSpeed,h);break;case"slide":e.slideDown(g.menuSpeed,h);break;default:e.show(g.menuSpeed,h);break}if(!g.menuSpeed){h()}var c=e.find(".selectBox-selected:first");E(d,c,true);X(d,c);i.addClass("selectBox-menuShowing");A(document).bind("mousedown.selectBox",function(j){if(A(j.target).parents().andSelf().hasClass("selectBox-options")){return }H()})};var H=function(){if(A(".selectBox-dropdown-menu:visible").length===0){return }A(document).unbind("mousedown.selectBox");A(".selectBox-dropdown-menu").each(function(){var d=A(this),c=d.data("selectBox-select")||A(),g=c.data("selectBox-control")||A(),e=c.data("selectBox-settings")||{};if(c.triggerHandler("beforeclose")){return false}var f=function(){c.triggerHandler("close",{_selectBox:true})};switch(e.menuTransition){case"fade":d.fadeOut(e.menuSpeed,f);break;case"slide":d.slideUp(e.menuSpeed,f);break;default:d.hide(e.menuSpeed,f);break}if(!e.menuSpeed){f()}g.removeClass("selectBox-menuShowing")})};var W=function(d,c,j){d=A(d);c=A(c);var k=d.data("selectBox-control")||A(),h=d.data("selectBox-settings")||{};if(k.hasClass("selectBox-disabled")){return false}if(c.length===0||c.hasClass("selectBox-disabled")){return false}if(d.attr("multiple")){if(j.shiftKey&&k.data("selectBox-last-selected")){c.toggleClass("selectBox-selected");var e;if(c.index()>k.data("selectBox-last-selected").index()){e=c.siblings().slice(k.data("selectBox-last-selected").index(),c.index())}else{e=c.siblings().slice(c.index(),k.data("selectBox-last-selected").index())}e=e.not(".selectBox-optgroup, .selectBox-disabled");if(c.hasClass("selectBox-selected")){e.addClass("selectBox-selected")}else{e.removeClass("selectBox-selected")}}else{if((N&&j.metaKey)||(!N&&j.ctrlKey)){c.toggleClass("selectBox-selected")}else{c.siblings().removeClass("selectBox-selected");c.addClass("selectBox-selected")}}}else{c.siblings().removeClass("selectBox-selected");c.addClass("selectBox-selected")}if(k.hasClass("selectBox-dropdown")){k.find(".selectBox-label").text(c.text())}var f=0,g=[];if(d.attr("multiple")){k.find(".selectBox-selected A").each(function(){g[f++]=A(this).attr("rel")})}else{g=c.find("A").attr("rel")}k.data("selectBox-last-selected",c);if(d.val()!==g){d.val(g);U(d);d.trigger("change")}return true};var X=function(d,c){d=A(d);c=A(c);var f=d.data("selectBox-control")||A(),e=f.data("selectBox-options")||A();e.find(".selectBox-hover").removeClass("selectBox-hover");c.addClass("selectBox-hover")};var a=function(d,c){d=A(d);c=A(c);var f=d.data("selectBox-control")||A(),e=f.data("selectBox-options")||A();e.find(".selectBox-hover").removeClass("selectBox-hover")};var E=function(e,d,c){if(!d||d.length===0){return }e=A(e);var j=e.data("selectBox-control")||A(),g=j.data("selectBox-options")||A(),h=j.hasClass("selectBox-dropdown")?g:g.parent(),i=parseInt(d.offset().top-h.position().top),f=parseInt(i+d.outerHeight());if(c){h.scrollTop(d.offset().top-h.offset().top+h.scrollTop()-(h.height()/2))}else{if(i<0){h.scrollTop(d.offset().top-h.offset().top+h.scrollTop())}if(f>h.height()){h.scrollTop((d.offset().top+d.outerHeight())-h.offset().top+h.scrollTop()-h.height())}}};var O=function(k,c){k=A(k);var g=k.data("selectBox-control")||A(),l=g.data("selectBox-options")||A(),e=k.data("selectBox-settings")||{},f=0,h=0;if(g.hasClass("selectBox-disabled")){return }switch(c.keyCode){case 8:c.preventDefault();Z="";break;case 9:case 27:H();a(k);break;case 13:if(g.hasClass("selectBox-menuShowing")){W(k,l.find("LI.selectBox-hover:first"),c);if(g.hasClass("selectBox-dropdown")){H()}}else{R(k)}break;case 38:case 37:c.preventDefault();if(g.hasClass("selectBox-menuShowing")){var d=l.find(".selectBox-hover").prev("LI");f=l.find("LI:not(.selectBox-optgroup)").length;h=0;while(d.length===0||d.hasClass("selectBox-disabled")||d.hasClass("selectBox-optgroup")){d=d.prev("LI");if(d.length===0){if(e.loopOptions){d=l.find("LI:last")}else{d=l.find("LI:first")}}if(++h>=f){break}}X(k,d);W(k,d,c);E(k,d)}else{R(k)}break;case 40:case 39:c.preventDefault();if(g.hasClass("selectBox-menuShowing")){var j=l.find(".selectBox-hover").next("LI");f=l.find("LI:not(.selectBox-optgroup)").length;h=0;while(j.length===0||j.hasClass("selectBox-disabled")||j.hasClass("selectBox-optgroup")){j=j.next("LI");if(j.length===0){if(e.loopOptions){j=l.find("LI:first")}else{j=l.find("LI:last")}}if(++h>=f){break}}X(k,j);W(k,j,c);E(k,j)}else{R(k)}break}};var D=function(c,e){c=A(c);var f=c.data("selectBox-control")||A(),d=f.data("selectBox-options")||A();if(f.hasClass("selectBox-disabled")){return }switch(e.keyCode){case 9:case 27:case 13:case 38:case 37:case 40:case 39:break;default:if(!f.hasClass("selectBox-menuShowing")){R(c)}e.preventDefault();clearTimeout(C);Z+=String.fromCharCode(e.charCode||e.keyCode);d.find("A").each(function(){if(A(this).text().substr(0,Z.length).toLowerCase()===Z.toLowerCase()){X(c,A(this).parent());E(c,A(this).parent());return false}});C=setTimeout(function(){Z=""},1000);break}};var P=function(c){c=A(c);c.attr("disabled",false);var d=c.data("selectBox-control");if(!d){return }d.removeClass("selectBox-disabled")};var J=function(c){c=A(c);c.attr("disabled",true);var d=c.data("selectBox-control");if(!d){return }d.addClass("selectBox-disabled")};var F=function(c,f){c=A(c);c.val(f);f=c.val();var g=c.data("selectBox-control");if(!g){return }var e=c.data("selectBox-settings")||{},d=g.data("selectBox-options")||A();U(c);d.find(".selectBox-selected").removeClass("selectBox-selected");d.find("A").each(function(){if(typeof (f)==="object"){for(var h=0;h');for(var e in b[g]){c.append('")}l.append(c)}else{var h=A('");l.append(h)}}break}if(!f){return }f.data("selectBox-options").remove();var k=f.hasClass("selectBox-dropdown")?"dropdown":"inline";m=M(l,k);f.data("selectBox-options",m);switch(k){case"inline":f.append(m);break;case"dropdown":U(l);A("BODY").append(m);break}};var I=function(c){A(c).css("MozUserSelect","none").bind("selectstart",function(d){d.preventDefault()})};var G=function(e,f){var c=A("
              • "),d=A("");c.addClass(e.attr("class"));c.data(e.data());d.attr("rel",e.val()).text(e.text());c.append(d);if(e.attr("disabled")){c.addClass("selectBox-disabled")}if(e.prop("selected")){c.addClass("selectBox-selected")}f.append(c)};var T=function(e){var i=A(window).scrollTop();var g=i+A(window).height();var c=e.offset().top;var d=c+e.outerHeight();var h=c-i;var f=g-d;return(h>=0&&f>=0)};switch(K){case"control":return A(this).data("selectBox-control");case"settings":if(!b){return A(this).data("selectBox-settings")}A(this).each(function(){A(this).data("selectBox-settings",A.extend(true,A(this).data("selectBox-settings"),b))});break;case"options":if(b===undefined){return A(this).data("selectBox-control").data("selectBox-options")}A(this).each(function(){V(this,b)});break;case"value":if(b===undefined){return A(this).val()}A(this).each(function(){F(this,b)});break;case"refresh":A(this).each(function(){L(this)});break;case"enable":A(this).each(function(){P(this)});break;case"disable":A(this).each(function(){J(this)});break;case"destroy":A(this).each(function(){Y(this)});break;default:A(this).each(function(){S(this,K)});break}return A(this)}})})(jQuery)}; -; - -// *************************** -// js.compressed/global.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -(function(C){if(typeof window.console!="object"){window.console={}}var D=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];for(var B=0;B").append(X.shift()).text();console.log("Intercept AJAX template render calls: Fetching CSS file: {0}".format(W));C.get(W,{cache:true},function(Z){var Y=C("",{rel:"stylesheet",type:"text/css",href:W}),a=C(".js-additional-css");if(a.length==1){a.before(Y)}else{C("head").append(Y)}}).then(function(){console.log("Intercept AJAX template render calls: Fetched CSS file: {0}".format(W));if(C(".js-debug-css-template-list").length>0){var Z=J(W),Y=C("
                  ");C.each(Z,function(c,d){if(Q){Y.append(C("
                1. ").append(c))}else{Y.append(C("
                2. ").append(d))}});var a=C(".js-debug-css-template-list").append(C("
                3. ").append(vBulletin.phrase.get("added_via_ajax_call")+":").append(Y));var b=a.prev("b");b.text(parseInt(b.text(),10)+1)}M(X)},function(){console.warn("Intercept AJAX template render calls: Failed to fetch CSS file: {0}".format(W));M(X)})};M(L)}}}}})()});String.prototype.format=function(){var F=this,E=arguments.length;while(E--){F=F.replace(new RegExp("\\{"+E+"\\}","gm"),arguments[E])}return F};jQuery.fn.reverse=[].reverse;window.vBulletin=window.vBulletin||{};vBulletin.getStackTrace=function(){var E=new Error();return E.stack};vBulletin.cookie=vBulletin.cookie||{};vBulletin.cookie.convertBbarrayCookie=function(F,E){F=F||"";E=E||"get";if(E=="set"){F=F.replace(/"/g,".");F=F.replace(/:/g,"-");F=F.replace(/;/g,"_")}else{F=F.replace(/\./g,'"');F=F.replace(/-/g,":");F=F.replace(/_/g,";")}return F};vBulletin.cookie.fetchBbarrayCookie=function(E,H){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var F=C.cookie(pageData.cookie_prefix+E);if(F!=""&&!vBulletin.cookie.bbarraycookiecache[E]){try{vBulletin.cookie.bbarraycookiecache[E]=C.parseJSON(vBulletin.cookie.convertBbarrayCookie(F))}catch(G){vBulletin.cookie.bbarraycookiecache[E]=null}}if(vBulletin.cookie.bbarraycookiecache[E]){return vBulletin.cookie.bbarraycookiecache[E][H]?vBulletin.cookie.bbarraycookiecache[E][H]:null}else{return null}};vBulletin.cookie.setBbarrayCookie=function(E,K,G,I){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var F=C.cookie(pageData.cookie_prefix+E);if(F!=""&&!vBulletin.cookie.bbarraycookiecache[E]){try{vBulletin.cookie.bbarraycookiecache[E]=C.parseJSON(vBulletin.cookie.convertBbarrayCookie(F))}catch(H){vBulletin.cookie.bbarraycookiecache[E]=null}}if(!vBulletin.cookie.bbarraycookiecache[E]){vBulletin.cookie.bbarraycookiecache[E]={}}vBulletin.cookie.bbarraycookiecache[E][K]=G;var J={path:pageData.cookie_path,domain:pageData.cookie_domain};if(I){J.expires=365}C.cookie(pageData.cookie_prefix+E,vBulletin.cookie.convertBbarrayCookie(JSON.stringify(vBulletin.cookie.bbarraycookiecache[E]),"set"),J)};vBulletin.cookie.unsetBbarrayCookie=function(E,I){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var F=C.cookie(pageData.cookie_prefix+E);if(F!=""&&!vBulletin.cookie.bbarraycookiecache[E]){try{vBulletin.cookie.bbarraycookiecache[E]=C.parseJSON(vBulletin.cookie.convertBbarrayCookie(F))}catch(G){vBulletin.cookie.bbarraycookiecache[E]=null}}if(!vBulletin.cookie.bbarraycookiecache[E]||!vBulletin.cookie.bbarraycookiecache[E][I]){return }delete vBulletin.cookie.bbarraycookiecache[E][I];var H={path:pageData.cookie_path,domain:pageData.cookie_domain};C.cookie(pageData.cookie_prefix+E,vBulletin.cookie.convertBbarrayCookie(JSON.stringify(vBulletin.cookie.bbarraycookiecache[E]),"set"),H)};(function(){var E=jQuery.fn.dialog;jQuery.fn.dialog=function(){if(typeof arguments[0]=="object"){var F=false;if(typeof arguments[0].open=="function"){F=arguments[0].open}arguments[0].open=function(){window.setTimeout(function(){vBulletin.Responsive.Debounce.runCallbacks()},0);if(F){return F.apply(this,arguments)}}}return E.apply(this,arguments)}})();(function(){var E=jQuery.fn.selectBox;jQuery.fn.selectBox=function(){var F=C(this);if(typeof F.attr("tabindex")=="undefined"){F.attr("tabindex","0")}return E.apply(this,arguments)}})();(function A(){(function(){var F="b_menu__dropdown--active",I=".js-menu__username-iconcontainer",H=".js-menu__dropdown-submenu",E=function(J){C(H,J).slideUp("fast");C(I,J).addClass("expand").removeClass("collapse");J.removeClass(F)},G=function(K){var J=C(".js-menu__login-iframe");J.closest("ul").show();J.trigger("load");J.closest("ul").hide();$subList=C("> ul",K);C(I,K).addClass("collapse").removeClass("expand");K.addClass(F);C(H,K).css("top",K.outerHeight()).slideDown("fast")};C("#main-navbar .secondary-nav").removeClass("h-disabled");C(".js-menu__login-iframe").on("load",function(N){try{var M=C(this),L=M.contents().find("html")[0],J=L.scrollHeight;if(J>0){M.height(J);M.parent().height(J)}}catch(K){}});C("#main-navbar .js-menu__dropdown").on("click",function(L){var M=C(this),K=C("> ul",M);if(M.hasClass("h-disabled")||M.closest(".secondary-nav").hasClass("h-disabled")){return false}if(M.hasClass(F)){L.stopPropagation();try{L.target.parentNode.click()}catch(J){}E(M);return true}G(M);return false});C("body").on("click",function(J){if(C(J.target).closest(".js-menu__dropdown").size()==0){E(C(".js-menu__dropdown"))}})})();C(".ui-tabs .ui-tabs-nav > li").addClass("ui-state-disabled");C(".announcement-tabs .ui-tabs-nav > li").removeClass("ui-state-disabled")})();window.vBulletin.getAjaxBaseurl=function(){if(pageData.baseurl.indexOf("http://")==0){return pageData.baseurl.substring(5)}else{if(pageData.baseurl.indexOf("https://")==0){return pageData.baseurl.substring(6)}else{return pageData.baseurl}}};window.vBulletin.normalizeAjaxUrl=function(E){if(E.indexOf("http://")==0){return E.substring(5)}else{if(E.indexOf("https://")==0){return E.substring(6)}else{return E}}};window.vBulletin.runBeforeCallback=function(G,F){if(C.isArray(G)){G.unshift(F)}else{var E=G;G=function(){F.apply(this,arguments);if(typeof E=="function"){E.apply(this,arguments)}}}return G};window.vBulletin.pageHasSelectors=function(E){if(C.isArray(E)&&E.length>0&&C.trim(E.toString())!=""){var F=false;C.each(E,function(G,H){if(C(H).length>0){F=true;return false}});return F}return true};window.vBulletin.areJsonObjectsEqual=function(G,E){var F=function(J,I){for(var H in J){if(J.hasOwnProperty(H)&&I.hasOwnProperty(H)){var L=J[H],K=I[H];if(L!=K){if(L instanceof Array&&K instanceof Array){if(C(L).not(K).length>0||C(K).not(L).length>0){return false}else{continue}}else{return false}switch(L.constructor){case Object:if(!window.vBulletin.areJsonObjectsEqual(L,K)){return false}break;case Function:if(L.toString()!=K.toString()){return false}break;default:return false}}}else{return false}}return true};return(Object.keys(G).length==Object.keys(E).length)?F(G,E):false};window.vBulletin.ajaxSetup=(function(){var E=false;return{init:function(){if(E){return }E=true;C.ajaxSetup({contentType:"application/x-www-form-urlencoded; charset=UTF-8"})}}})();window.vBulletin.ajaxSetup.init();window.vBulletin.ajaxProfile=(function(){var G=[],H=false,F=true,E=false;return{init:function(){if(H){return }H=true;C(function(){if(C("#debug-information").length==0){F=false}C("
                    ").attr("id","debug-ajax-request-list").hide().css({height:"150px",overflow:"auto",padding:"4px",border:"1px solid #CCC",background:"#EEE","margin-top":"2px","margin-bottom":"4px"}).appendTo(C("#debug-information #debug-ajax-request-count").closest("li"));C("#debug-information #debug-ajax-request-count").css("cursor","pointer").on("click",function(){C("#debug-ajax-request-list").toggle()});E=true});function I(){if(E){C("#debug-information #debug-ajax-request-count").text(G.length);C.each(G,function(){if(!this.displayed){this.displayed=true;this.relUrl=this.url.indexOf(pageData.baseurl)==0?this.url.substring(pageData.baseurl.length):this.url;C("
                  1. ").addClass("js-request-counter-"+this.requestCounter).text(this.relUrl).appendTo(C("#debug-ajax-request-list"))}var J=this.totalTimeTaken-this.networkTimeTaken;var K='{0} ({1}, {2}ms, {3}ms){5}'.format(this.relUrl,this.status,this.networkTimeTaken,J,this.totalTimeTaken,(this.errorThrown?" Error: "+this.errorThrown:""));C("#debug-ajax-request-list .js-request-counter-"+this.requestCounter).html(K)})}}C.ajaxPrefilter(function(J,M,K){if(!F){return }var L=G.length;console.log("vBulletin AJAX profile: Before request #"+L);G.push({displayed:false,url:J.url,relUrl:"",startTimeStamp:(new Date()).getTime(),endTimeStamp:0,finalTimeStamp:0,textStatus:"UNKNOWN",errorThrown:"",requestCounter:L,networkTimeTaken:0,totalTimeTaken:0});J.success=vBulletin.runBeforeCallback(J.success,function(O,P,N){G[L].endTimeStamp=(new Date()).getTime()});J.error=vBulletin.runBeforeCallback(J.error,function(N,P,O){G[L].endTimeStamp=(new Date()).getTime();G[L].errorThrown=O});J.complete=vBulletin.runBeforeCallback(J.complete,function(N,O){G[L].finalTimeStamp=(new Date()).getTime();G[L].status=O;G[L].networkTimeTaken=G[L].endTimeStamp-G[L].startTimeStamp;G[L].totalTimeTaken=G[L].finalTimeStamp-G[L].startTimeStamp;I()})})}}})();window.vBulletin.ajaxProfile.init();window.vBulletin.loadingIndicator=(function(){var J=0,I=false,H=false,F=0,E=0;function G(L){if(L){var N=C(".js-loading-indicator"),M=N.outerWidth(),K=C(window).outerWidth();if(K>0&&M>0){N.css("left",((K-M)/2))}N.show();C("body").css("cursor","wait")}else{C(".js-loading-indicator").hide();C("body").css("cursor","auto")}}return{init:function(){if(I){return }C(document).ajaxStart(function(){window.vBulletin.loadingIndicator.show("ajaxStart")});C(document).ajaxStop(function(){window.vBulletin.loadingIndicator.hide("ajaxStop")});I=true},show:function(K){if(F>0&&K=="ajaxStart"){--F;++E;console.log("vBulletin.loadingIndicator.show ajax indicator suppressed");return }++J;console.log("vBulletin.loadingIndicator.show Counter: "+J+" Source: "+(K||"Unspecified"));if(J>0){H=window.setTimeout(function(){if(H){G(true);H=false}},1000)}},hide:function(K){if(E>0&&K=="ajaxStop"){--E;console.log("vBulletin.loadingIndicator.hide ajax indicator suppressed");return }--J;J=J<0?0:J;if(!K){J=0}console.log("vBulletin.loadingIndicator.hide Counter: "+J+" Source: "+(K||"Unspecified"));if(J<1){if(H){window.clearTimeout(H);H=false}G(false)}},suppressNextAjaxIndicator:function(){++F}}})();window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||["alert","cancel","confirmation","no","ok","prompt","yes"];window.vBulletin.phrase.cache=window.vBulletin.phrase.cache||{};window.vBulletin.phrase.uncachable=window.vBulletin.phrase.uncachable||[];window.vBulletin.phrase.render=function(E){var G=E[0];for(var F=1;F0){vBulletin.loadingIndicator.suppressNextAjaxIndicator();C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/phrase/fetch",async:false,data:({phrases:G}),type:"POST",dataType:"json",success:function(I){if(I){if(typeof (I[F])!="undefined"){E=I[F]}window.vBulletin.cache.setBucket("phrases"+pageData.languageid);C.each(I,function(K,J){window.vBulletin.cache.set(K,J)});H.length=0}else{console.warn("Unexpected result when fetching phrases")}},error:function(K,J,I){console.warn("Error when fetching phrases: {0}".format(I))}})}return E};window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=C.merge(window.vBulletin.phrase.precache,["admin","admin_auth","all_changes_made_will_be_lost_would_you_like_to_continue","april","attach_link","attach_video","august","cancel","cancel_edit","close","compare_versions","conversation","december","done","edit_conversation","email_addresses_must_match","error","error_fetching_online_users_x","error_loading_ckeditor_script","error_loading_editor","error_loading_post","error_posting_comment_code_x","error_saving_vote","error_x","existing_reply_will_be_deleted","february","flag_a_post","follow","follow_error","following","following_pending","following_remove","friday_min","go_to_first_new_post","hour","inlinemod_auth_login_failed","inlinemod_auth_login_first","inlinemod_auth_password_empty","invalid_data","invalid_data_requested","invalid_email_address","invalid_request","invalid_server_response_please_try_again","invalid_special_channel_subscribe_request","invalid_user_permissions","invalid_username_specified","invalid_username_specified_maxlength_x","invalid_username_specified_minlength_x","invalid_query_definition_x","january","join","joined","join_error","july","june","leave","loading","logged_out_while_editing_post","login","login_success_admin_auth","march","may","minute","moderator","monday_min","new_posts","no","no_create_permissions","no_icon","no_leave_channel_permission","no_one_voted","no_permission","no_update_permissions","no_valid_tags_found","not_logged_no_permission","november","now","october","onbeforeunload_message_while_editing_post","password_must_be_at_least_four_chars","passwords_must_match","people_who_liked","physically_remove_blog","physically_remove_comment","physically_remove_media","physically_remove_reply","physically_remove_topic","physically_remove_visitorMessage","please_enter_a_username","please_enter_a_valid_url_and_click_attach","please_enter_link_url","please_enter_video_url","please_enter_your_comment","please_enter_your_email_address","please_enter_your_reason_why_you_want_to_flag_this_post","please_provide_search_string","please_select_a_day","please_select_a_month","please_select_a_year","post_comment","post_history","posttype_blog","posttype_comment","posttype_media","posttype_reply","posttype_topic","posttype_visitorMessage","preview","saturday_min","search","see_less","see_more","select_option_and_click_delete_button_blog","select_option_and_click_delete_button_comment","select_option_and_click_delete_button_media","select_option_and_click_delete_button_reply","select_option_and_click_delete_button_topic","select_option_and_click_delete_button_visitorMessage","send_report","september","share_post_link_help","soft_delete_blog","soft_delete_comment","soft_delete_media","soft_delete_notes_blog","soft_delete_notes_comment","soft_delete_notes_media","soft_delete_notes_reply","soft_delete_notes_topic","soft_delete_notes_visitorMessage","soft_delete_reply","soft_delete_topic","soft_delete_visitorMessage","sunday_min","thanks_for_signing_up_log_in","the_report_has_been_sent","time","tuesday_min","thursday_min","unable_to_check_admin_permissions","unexpected_error","unfollow_error","unsubscribe","unsubscribe_overlay_error","unvote_cap","user_name_x_already_in_use_choose_different_name","vote_a_post","vote_cap","wednesday_min","xs_avatar","yes","you_have_a_pending_edit_unsaved"]);window.vBulletin.cache.initBucket("phrases"+pageData.languageid,pageData.phrasedate,window.vBulletin.phrase.precache,window.vBulletin.phrase.remoteGet);window.vBulletin.phrase.get=function(){if(arguments.length<1){console.log("vBulletin.phrase.get() called with no parameters");return""}if(typeof arguments[0]=="object"){arguments=arguments[0]}window.vBulletin.cache.setBucket("phrases"+pageData.languageid);var E=window.vBulletin.cache.get(arguments[0]);arguments[0]=E;return window.vBulletin.phrase.render(arguments)};window.vBulletin.getScrollbarWidth=function(){if(C("body").data("scrollbar-width")){return C("body").data("scrollbar-width")}var E=C('
                    ').appendTo("body"),G=E.children(),F=G.innerWidth()-G.height(99).innerWidth();E.remove();C("body").data("scrollbar-width",F);return F};window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.remoteGet=function(F,H){var G=[F];C.each(H,function(J,I){if(C.inArray(I,G)===-1){G.push(I)}});var E=null;C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/options/fetchValues",async:false,data:({options:G}),type:"POST",dataType:"json",success:function(I){if(I){vBulletin.cache.setBucket("options");C.each(I,function(J,K){if(J==F){E=K}vBulletin.cache.set(J,K)});H.length=0}else{console.warn("Unexpected result when fetching options")}},error:function(K,J,I){console.warn("Error when fetching options: {0}".format(I))}});return E};window.vBulletin=window.vBulletin||{};window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=C.merge(window.vBulletin.options.precache,["crontab","bbtitle","markinglimit","threadpreview"]);vBulletin.cache.initBucket("options",window.pageData.optionsdate,window.vBulletin.options.precache,window.vBulletin.options.remoteGet);window.vBulletin.options.get=function(E){window.vBulletin.cache.setBucket("options");return window.vBulletin.cache.get(E)};window.vBulletin.openAuthDialog=function(I,H,E,F){H=H||"inlinemod_auth";E=E||function(){};var G=openConfirmDialog({title:vBulletin.phrase.get(H),message:vBulletin.phrase.get("loading")+"...",width:500,dialogClass:"inlinemod-auth-dialog loading",buttonLabel:{yesLabel:vBulletin.phrase.get("login"),noLabel:vBulletin.phrase.get("cancel")},onClickYesWithAjax:true,onClickYes:function(){var K=G.find(".inlinemod-auth-form"),L=C(".js-inlineauth_password").val(),M=C(".js-inlineauth_username").val(),J=C(".error-msg-box");J.text("").addClass("h-hide");C.ajax({url:vBulletin.normalizeAjaxUrl(K.attr("action")),data:{password:L,username:M},type:"POST",dataType:"json",success:function(N){if(N.error){J.text(vBulletin.phrase.get(N.error)).removeClass("h-hide")}else{G.dialog("close");G.dialog("close");if(typeof (F)=="function"){F()}return I()}},error:function(P,O,N){console.log("/auth/inlinemodLogin failed, error: "+N);openAlertDialog({title:vBulletin.phrase.get(H),message:P.status,iconType:"error"})}})},onClickNo:E});C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/inlinemod_auth",type:"POST",dataType:"json",success:function(J){console.log("/ajax/render/inlinemod_auth");if(J&&!J.errors){C(".inlinemod-auth-dialog").removeClass("loading");C(".dialog-content .message",G).html(J);G.dialog("option","position",{of:window});C('[name="password"]',G).on("keydown",function(K){if(K.which==13){K.preventDefault();C("#btnConfirmDialogYes",G).click()}});C("input",G).first().focus()}else{console.log("/ajax/render/inlinemod_auth successful, but response was not valid");openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error",onAfterClose:function(){G.dialog("close")}})}},error:function(L,K,J){console.log("/ajax/render/inlinemod_auth failed, error: "+J);openAlertDialog({title:vBulletin.phrase.get(H),message:vBulletin.phrase.get("error_loading_delete_form"),iconType:"error",onAfterClose:function(){G.dialog("close")}})}})};window.vBulletin.assertUserHasAdminPermission=function(I,H,E,F){if(C(H).data("in-progress")){return false}C("body").css("cursor","wait");var G=arguments.callee.caller;C(H).data("in-progress",true);C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/user/currentUserHasAdminPermission",data:({adminPermission:I}),type:"POST",dataType:"json",complete:function(){C("body").css("cursor","auto");C(H).data("in-progress",null)},success:function(J){console.log("ajax/api/user/currentUserHasAdminPermission result:"+JSON.stringify(J));if(J===true){E()}else{if(J&&J.errors&&J.errors.length>0){if(J.errors[0]=="auth_required"){window.vBulletin.openAuthDialog(function(){G.apply(H)},"admin_auth",function(){},F);return }openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("nopermission_loggedout"),iconType:"error",onAfterClose:function(){C("#config-dialog").dialog("close");window.location.reload()}});C("#config-dialog .loader").hide()}else{openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("unable_to_check_admin_permissions"),iconType:"error",onAfterClose:function(){C("#config-dialog").dialog("close");window.location.reload()}});C("#config-dialog .loader").hide()}}},error:function(L,K,J){console.log("ajax/api/user/currentUserHasAdminPermission error: "+J);openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("unable_to_check_admin_permissions"),iconType:"error",onAfterClose:function(){C("#config-dialog").dialog("close");window.location.reload()}});C("#config-dialog .loader").hide()}})};vBulletin.selectTabByIndex=function(E){var F=this instanceof C?this:C(this);if(F.length&&E>-1&&F.hasClass("ui-tabs")){F.data("noPushState",true).tabs("option","active",E).data("noPushState",null).find(".ui-tabs-nav li").removeClass("ui-state-focus").eq(E).addClass("ui-state-focus").find("a").focus()}};C.ui.tabs.prototype._isLocal=function(){return true};vBulletin.tabify=function(F){var G=this instanceof C?this:C(this);if(G.length){var E={tabOptions:{},tabHistory:null,allowHistory:false,tabParamAsQueryString:true,hash:"",getTabIndexByHash:function(){return -1}};F=C.extend({},E,F);if(F.tabHistory instanceof vBulletin.history.instance&&F.tabHistory.isEnabled()){G.on("tabscreate",function(K,M){var H=vBulletin.parseQueryString(location.search,["_"]),N=Object.keys(H).length,J=vBulletin.getSelectedTabHashOrPath(G,F.tabParamAsQueryString),L=F.tabHistory.getState();if(((F.tabParamAsQueryString&&N>1&&typeof H.tab!="undefined")||(!F.tabParamAsQueryString&&N>0))&&(!L||C.isEmptyObject(L.data))){var I={from:"tabs",tab:J};F.tabHistory.setDefaultState(I,document.title,location.href)}F.tabHistory.setStateChange(function(T){var S=F.tabHistory.getState();if(S.data.from=="tabs"){F.tabHistory.log(S.data,S.title,S.url);var Q=F.getTabIndexByHash(S.data.tab),O=vBulletin.parseQueryString(S.url,["tab","_"]);if(G.tabs("option","selected")!=Q){vBulletin.selectTabByIndex.call(G,Q);if(!C.isEmptyObject(O)){C(window).trigger("statechange.filter",["tabs",O])}}else{if(!C.isEmptyObject(O)){C(window).trigger("statechange.filter",["tabs",O])}else{var P,R,U;if(S.data.tab){R=F.tabParamAsQueryString?C(S.data.tab):C('.ui-tabs .ui-tabs-panel[data-url-path="'+S.data.tab+'"]')}P=(R&&R.length&&R)||C(G.closest(".canvas-widget").data("widget-default-tab"));U=C(".toolbar-filter-overlay .filter-options .js-default-checked",P);if(U.length){U.prop("checked",true).first().data("bypass-filter-display",true).trigger("change",[true]).data("bypass-filter-display",null);C(".filtered-by",P).addClass("h-hide").find(".filter-text-wrapper").empty()}else{C(".conversation-toolbar .js-default-checked",P).first().trigger("click",[true])}}}}},"tabs");if(typeof F.tabOptions.create=="function"){F.tabOptions.create.call(G[0],K,M)}})}if(F.allowHistory&&F.tabHistory instanceof vBulletin.history.instance){G.on("tabsbeforeactivate",function(M,N){var H=N.newPanel,K=N.newTab;if(typeof F.tabOptions.beforeActivate=="function"&&F.tabOptions.beforeActivate.call(this,M,N)===false){return false}var J,O=(F.tabParamAsQueryString?H.selector:C(K.context).data("url-path")),L=F.tabParamAsQueryString?undefined:G.find(".ui-tabs-nav > li > a").map(function(){return C(this).data("url-path")}).get();if(!F.tabHistory.isEnabled()){J=vBulletin.makeFilterUrlFromSelectedFilters(H,O.replace("#",""),F.tabParamAsQueryString,L,F.hash);location.href=J;return false}if(!G.data("noPushState")){var I={from:"tabs",tab:O};J=vBulletin.makeFilterUrlFromSelectedFilters(H,O.replace("#",""),F.tabParamAsQueryString,L);F.tabHistory.pushState(I,document.title,J)}else{G.data("noPushState",null)}})}G.tabs(F.tabOptions)}return G};vBulletin.getSelectedTabHashOrPath=function(F,G){var E;if(G){E=F.find(".ui-tabs-nav > .ui-tabs-active > a").prop("hash")}else{E=F.find(".ui-tabs-nav > .ui-tabs-active > a").data("url-path")}return E||""};vBulletin.parseUrl=function(F){var E=document.createElement("a"),G;E.href=F||"/";G=E.pathname;if(G.indexOf("/")!=0){G="/"+G}return{protocol:E.protocol,hostname:E.hostname,port:E.port,pathname:G,search:E.search,hash:E.hash}};vBulletin.makeHistoryUrl=function(J,E,H,F,I){var G=vBulletin.makePaginatedUrl(J,E);G=vBulletin.makeTabUrl(G,H.tab,H.tabParamAsQueryString);G=vBulletin.makeFilterUrl(G,F.filterName,F.filterValue,F.context,I);return G};vBulletin.makeTabUrl=function(F,H,L,J,I){if(F){var K=vBulletin.parseUrl(F),M;if(L){I=I||"tab";M=new RegExp("([?+|&+])"+I+"=\\w+[-\\w]*","i");if(K.search.match(M)){F=K.pathname+K.search.replace(M,"$1{0}={1}".format(I,H))}else{if(K.search){F="{0}{1}&{2}={3}".format(K.pathname,K.search,I,H)}else{F="{0}?{1}={2}".format(K.pathname,I,H)}}}else{var G=K.pathname.replace(/\/$/,""),E=G.split("/");M="\\/"+E[E.length-(G.match(/\/page([0-9]+)/)?2:1)]+"$";F=K.pathname.replace(new RegExp(M),"/"+H)+K.search}}else{F="/"}if(J){F+="#"+J}return F};vBulletin.makePaginatedUrl=function(G,F){if(G){var E=G.match(/\/page[0-9]+/);if(E){if(F>1){G=G.replace(E[0],"/page"+F)}else{G=G.replace(E[0],"")}}else{if(F>1){if(G.match(/\?/)){G=G.replace(/\?/,"/page"+F+"?")}else{if(G.match(/\#/)){G=G.replace(/\#.*/,"/page"+F)}else{G+="/page"+F}}}}}return G};vBulletin.makeFilterUrl=function(E,J,N,F,I,G){G=G||false;E=E||location.href;var O=C(".filtered-by",F),L=vBulletin.parseUrl(E),P=L.search;var K=C(".js-button-filter.js-default-checked.js-checked",F);if(K.data("filter-name")==J&&K.data("filter-value")==N){G=true}if(!G&&((O.data("clicked")&&C('.toolbar-filter-overlay input[name="{0}"][value="{1}"]'.format(J,N),F).hasClass("js-default-checked"))||(C('.toolbar-search-form input[name="{0}"]'.format(J),F).length&&!N))){G=true;O.data("clicked",null)}E=L.pathname;if(P&&P.length>1){if(P.match(new RegExp(J+"=","i"))){var H=vBulletin.parseQueryString(P);if(!C.isEmptyObject(H)){var M="";C.each(H,function(Q,R){if(!G||Q!=J){M+="{0}={1}&".format(Q,(Q==J?N:R))}});if(M){E+="?"+M.substring(0,M.length-1)}}}else{if(!G){E+=P+"&{0}={1}".format(J,encodeURIComponent(N))}else{E+=P}}}else{if(!G){E+="?{0}={1}".format(J,encodeURIComponent(N))}}if(I){E+="#"+I}return E};vBulletin.getSelectedFilters=function(E,F){var G={};if(!F){var H=E.serializeArray();C.each(H,function(K,L){if(L.name!="securitytoken"){if(L.name.slice(-2)=="[]"){var J=L.name.split("[]");G[J[0]]=G[J[0]]||[];G[J[0]].push(L.value)}else{G[L.name]=L.value}}})}else{var I=E.parent().find(".filtered-by .filter-text").filter(":visible");E.find(":input:radio:checked").each(function(K,M){var L=C(M);if((L.hasClass("js-default-checked")||L.data("bypass-filter-display")==1)&&(I.length==0||I.filter('[data-filter-name={0}][data-filter-value="{1}"]').length==0)){return true}if(M.name.slice(-2)=="[]"){var J=M.name.split("[]");G[J[0]]=G[J[0]]||[];G[J[0]].push(M.value)}else{G[M.name]=M.value}})}return G};vBulletin.makeFilterUrlFromSelectedFilters=function(I,J,S,O,L){var Q,H=location.pathname.replace(/\/$/,"").replace(/\/page[0-9]+/,""),G=C(".toolbar-filter-overlay",I),N=vBulletin.getSelectedFilters(G,true),P=C(".pagenav-form .js-pagenum",I).val()||1,K=C(".toolbar-search-form .js-filter-search",I).val()||"",U=C(I).closest(".canvas-widget"),R=C(".conversation-toolbar-wrapper",I).length?(C(".conversation-toolbar-wrapper",I).data("allow-history")=="1"):(C(I).data("allow-history")=="1"),F=new vBulletin.history.instance(R),E=U.data("widget-default-tab")||U.find(".ui-tabs-nav > li:first-child a").attr("href");if(C.isEmptyObject(N)){C(".conversation-toolbar .js-button-filters",I).each(function(){var V=C(".js-button-filter.js-checked:not(.js-default-checked)",this);if(V.length){N[V.data("filter-name")]=V.data("filter-name")}})}if(!S){var T=new RegExp("\\/("+O.join("|")+")/?$"),M=H.match(T);if(M){H=H.replace(new RegExp(M[0]),"/"+J)}else{H+="/"+J}}if(P>1&&F.isEnabled()){H+="/page"+P}if(S&&J&&E!=("#"+J)){N.tab=J;if(!F.isEnabled()){H+="?tab="+J}}if(!F.isEnabled()){return H+(L?"#"+L:"")}if(K){N.q=K}Q=C.param(N);return H+(Q?"?"+Q:"")+(L?"#"+L:"")};vBulletin.parseQueryString=function(H,F){var E={},I;if(H&&H.length>1){I=H.indexOf("?");F=(F instanceof Array)?F:[];if(I!=-1){var G=H.substring(I+1).split("&");C.each(G,function(J,L){var K=L.split("=");if(F.length==0||(C.inArray(K[0],F)==-1)){E[K[0]]=decodeURIComponent((K[1]||"")).replace(/\+/g," ")}})}}return E};vBulletin.pagination=function(K){var S={context:document,onPageChanged:null,tabParamAsQueryString:true,allowHistory:false};if(K&&typeof K=="object"){C.extend(S,K)}var G,H=C(".pagenav-controls .pagenav-form",S.context),R=Number(C(".defaultpage",H).val())||Number(C(".js-pagenum",H).val())||1,M=new vBulletin.history.instance(S.allowHistory);H.data("object-instance",this);if(M.isEnabled()){var N=vBulletin.parseQueryString(location.search,["_"]),I=location.pathname.match(/\/page([0-9]+)/),F=M.getState();if(I&&Number(I[1])>1&&C.isEmptyObject(N)&&(!F||C.isEmptyObject(F.data))){G=vBulletin.makePaginatedUrl(location.href,R);var O={from:"pagination",page:R,tab:S.tabParamAsQueryString?"#"+H.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(H.closest(".ui-tabs"),false)};M.setDefaultState(O,document.title,G)}M.setStateChange(function(a){var T=M.getState();if(T.data.from=="pagination"){M.log(T.data,T.title,T.url);if(location.search){var c=vBulletin.parseQueryString(location.search,["_"]);if(!C.isEmptyObject(c)||c.tab=="groups-tab"){delete c.tab;C(window).trigger("statechange.filter",["pagination",c]);return }}var X,V,d,b,Z;if(T.data.tab){X=S.tabParamAsQueryString?C(T.data.tab):C('.ui-tabs .ui-tabs-panel[data-url-path="'+T.data.tab+'"]')}V=(X&&X.length&&X)||S.context;d=C(".conversation-toolbar .filter-wrapper",V).data("object-instance");if(d){d.resetFilters(true)}if(T.data.tab){b=X.closest(".ui-tabs");$tabAnchor=S.tabParamAsQueryString?b.find('.ui-tabs-nav > li > a[href*="{0}"]'.format(T.data.tab)):b.find('.ui-tabs-nav > li > a[data-url-path="'+T.data.tab+'"]');if(!$tabAnchor.parent().hasClass("ui-tabs-active")){var Y=$tabAnchor.parent().index();vBulletin.selectTabByIndex.call(b,Y);return }}var f=C(".pagenav-controls .pagenav-form",V);var W=f.data("object-instance");if(W&&typeof W.getOption=="function"&&typeof W.getOption("onPageChanged")=="function"){var U=T.data.page||R;W.getOption("onPageChanged").apply(f.get(0),[U,false,!location.search,location.search])}}},"pagination")}function E(){return parseInt((C(".pagetotal",this).html()||"").replace(/[^\d]+/g,""),10)||1}function L(U,Y){var X=E.apply(this),T=C(".arrow[rel=next]",this),W=C(".arrow[rel=prev]",this);if(U<1){U=1}else{if(U>X){U=X}}C(".js-pagenum",this).val(U);if(U==X){T.addClass("h-disabled").removeAttr("href")}else{T.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,U+1))}if(U==1){W.addClass("h-disabled").removeAttr("href")}else{W.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,U-1))}if(typeof S.onPageChanged=="function"){S.onPageChanged.apply(this,[U,Y])}if(X>1&&M.isEnabled()&&!Y){var Z=M.getState();if(!Z||!Z.data||!Z.data.from||C.inArray(Z.data.from,["filter_blogs","filter_groups"]==-1)){if(U==1){G=C(".arrow[rel=next]",this).attr("href")}else{G=C(".arrow[rel=prev]",this).attr("href")}if(G){G=vBulletin.makePaginatedUrl(G,U);var V={from:"pagination",page:U,tab:S.tabParamAsQueryString?"#"+C(this).closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(C(this).closest(".ui-tabs"),false)};M.pushState(V,document.title,G)}}}}function Q(T){var U=parseInt(T);if(U&&typeof U==="number"){C("input[name=result-id]",H).val(U)}}function J(T){C("a.see-all-btn",this).closest(".pagenav-controls")[T?"addClass":"removeClass"]("h-hide")}C(".arrow",H).off("click").on("click",function(V){var U=C(this),W=this.form||U.closest("form").get(0);if(!U.hasClass("h-disabled")){var T=parseInt(C(".js-pagenum",W).val())+((U.attr("rel")=="next")?1:-1);if(!M.isEnabled()&&S.allowHistory){if(!this.href||this.hash==this.href){this.href=vBulletin.makePaginatedUrl(location.href,T)}return true}L.apply(W,[T,false])}return false});function P(){C(S.context).off("click",".js-pagenav .js-pagenav-button").on("click",".js-pagenav .js-pagenav-button",function(V){if(M.isEnabled()){var W=C(this),T=W.data("page"),U=C(".pagenav-form",S.context).get(0);L.apply(U,[T,false]);return false}return true}).off("mouseover",".js-pagenav .js-pagenav-button").on("mouseover",".js-pagenav .js-pagenav-button",function(U){var T=C(this);if(!T.prop("href")){T.prop("href",vBulletin.makePaginatedUrl(location.href,parseInt(T.data("page"),10)))}});C(".js-pagenav .js-pagenav-button",S.context).each(function(){this.href=vBulletin.makePaginatedUrl(location.href,parseInt(C(this).data("page")))})}P();C(".js-pagenum",H).off("keypress").on("keypress",function(V){if(V.keyCode==13){V.preventDefault();var T=parseInt(C(this).val(),10);var U=E.apply(this.form);if(T>U){T=U}if(T<1){T=1}if(M.isEnabled()){L.apply(this.form,[T,false])}else{if(S.allowHistory){location.href=vBulletin.makePaginatedUrl(location.href,T)}else{L.apply(this.form,[T,false])}}}});C(".js-pagenum",H).off("click").on("click",function(T){C(this).select()});this.updatePageInfo=function(U,T){if(U&&typeof U=="object"){var V=U.totalpages||1,W=C(".pagenav-controls .pagenav-form",S.context);C(".pagetotal",W).text(V);if(typeof U.showseemore!="undefined"){if(U.showseemore){J.apply(W,[false])}else{J.apply(W,[true])}}U.perpage=vBulletin.conversation.POSTS_PER_PAGE;if(T&&C(".pagenav-container",S.context).length>0){C.post(pageData.baseurl+"/ajax/render/pagenav",{pagenav:U},function(X){if(X){C(".pagenav-container",S.context).replaceWith(X.template);P()}},"json")}L.apply(W.get(0),[U.pagenumber,T])}};this.updateResultId=function(T){Q(T)};this.setOption=function(T,U){S[T]=U};this.getOption=function(T){return S[T]};this.updatePageNavigation=function(U,T,V){L.apply(U.get(0),[T,V])}};vBulletin.conversation=vBulletin.conversation||{};vBulletin.conversation.toggleCommentBox=function(){var E=C(this).closest(".js-comment-entry__parent").find(".js-comment-entry");E.slideToggle("fast",function(){var F=C(this).find(".js-comment-entry__textbox");if(F.is(":visible")){F.focus()}});E.find(".js-comment-entry__cancel").off("click").on("click",function(F){E.slideToggle();return false});return false};vBulletin.conversation.postComment=function(L,I){var G=this;var F=C(G).closest(".js-comment-entry").find(".js-comment-entry__textbox");var K=C.trim(F.val());console.log(K);if(!K||(F.hasClass("placeholder")&&K==F.attr("placeholder"))){openAlertDialog({title:vBulletin.phrase.get("post_comment"),message:vBulletin.phrase.get("please_enter_your_comment"),iconType:"warning",onAfterClose:function(){F.focus()}});return false}C("body").css("cursor","wait");C(G).blur();var E=C(G).closest(".js-comment-entry__parent"),J=C(G).closest(".js-comment-entry--blog").length==1?1:0,H=C(G).closest(".js-comment-entry--article").length==1?1:0;C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/post-comment",data:({text:K,parentid:E.attr("data-node-id"),postindex:E.find(".js-post__content .b-post__count").text().replace("#",""),view:E.parent().hasClass("stream-view")?"stream":"thread",redirecturl:F.hasClass(".reload-on-post")?1:0,isblogcomment:J,isarticlecomment:H,humanverify:{input:C(G).closest(".js-comment-entry").find('[name="humanverify[input]"]').val(),hash:C(G).closest(".js-comment-entry").find('[name="humanverify[hash]"]').val()},recaptcha_challenge_field:C(G).closest(".js-comment-entry").find('[name="recaptcha_challenge_field"]').val(),recaptcha_response_field:C(G).closest(".js-comment-entry").find('[name="recaptcha_response_field"]').val()}),type:"POST",dataType:"json",complete:function(N,M){console.log("post-comment complete.");C("body").css("cursor","auto");vBulletin.hv.reset()},success:function(M,O,P){console.log("post-comment successful! result:"+JSON.stringify(M));if(M){if(!M.error){if(typeof I=="function"){I.apply(G,[M])}if(!J&&!H){C(G).closest(".js-comment-entry").slideToggle()}vBulletin.subscribe.updateSubscribeButton(M.topic_subscribed);var N=E.attr("data-node-id");if(pageData.threadmarking=="0"||pageData.userid=="0"){vBulletin.cookie.setBbarrayCookie("discussion_view",N,Math.round(new Date().getTime()/1000))}else{C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/markRead",data:{nodeid:N},type:"POST",dataType:"json",complete:function(){},success:function(Q){if(Q&&!Q.error){console.log("Topic "+N+" is marked read successfully!")}else{console.log("Topic "+N+" is marked read failed: "+Q.error)}},error:function(S,R,Q){console.log("Topic "+N+" is marked read failed:"+Q)}})}}else{openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_x",M.error),iconType:"warning"})}}else{openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error:function(O,N,M){console.log("post-comment failed! error:"+M);openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_posting_comment_code_x",O.status),iconType:"error"})}})};vBulletin.conversation.showIp=function(F){var H=C(this),G=C(this).data("post-ip"),E=C(this).data("post-host");openAlertDialog({title:vBulletin.phrase.get("ip_info"),message:vBulletin.phrase.get("ip_address_is")+": "+G+"
                    "+vBulletin.phrase.get("host_name_is")+': ...',iconType:"none"});vBulletin.AJAX({call:"/ajax/api/node/getHostName",data:{ip:G},success:function(I,J,K){C(".ip-host-name").removeClass("loading").html(I)}});return false};vBulletin.conversation.showPostHistory=function(H){var I=C(this);var G=C(this).closest(".js-post").attr("data-node-id");var F=openConfirmDialog({title:vBulletin.phrase.get("post_history"),message:vBulletin.phrase.get("loading")+"...",width:800,dialogClass:"post-history-dialog dialog-container dialog-box loading",buttonLabel:{yesLabel:vBulletin.phrase.get("compare_versions"),noLabel:vBulletin.phrase.get("cancel")},onAfterClose:function(){if(this.id=="btnConfirmDialogYes"){var K=F.find(".post-history-form");var J={oldpost:K.find("input:radio[name=old]:checked").val()||1,newpost:K.find("input:radio[name=new]:checked").val()||1,nodeid:G};C("#btnConfirmDialogYes").hide();var L=openConfirmDialog({title:vBulletin.phrase.get("post_history"),message:vBulletin.phrase.get("loading")+"...",width:800,dialogClass:"post-history-comparison-dialog dialog-container dialog-box loading",buttonLabel:{yesLabel:vBulletin.phrase.get("compare_versions"),noLabel:vBulletin.phrase.get("close")},onAfterClose:function(){C("#btnConfirmDialogYes").show()}});E(L,"post_history_form",J)}}});E(F,"post_history_form",{nodeid:G});function E(J,K,L){C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/"+K,data:L,type:"POST",dataType:"json",success:function(M){console.log("/ajax/render/"+K);if(M&&!M.errors){J.removeClass("loading").find(".dialog-content .message").html(M).find("[placeholder]").placeholder().end().end().dialog("option","position",{of:window})}else{console.log("/ajax/render/"+K+" successful, but response was not valid: "+JSON.stringify(M));openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error",onAfterClose:function(){J.dialog("close")}})}},error:function(O,N,M){console.log("/ajax/render/"+K+" failed, error: "+M);openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_loading_delete_form"),iconType:"error",onAfterClose:function(){J.dialog("close")}})}})}};vBulletin.conversation.flagPost=function(F){var G=C(this),E=C(this).closest(".js-post").attr("data-node-id");openPromptDialog({title:vBulletin.phrase.get("flag_a_post"),message:vBulletin.phrase.get("please_enter_your_reason_why_you_want_to_flag_this_post"),buttonLabel:{okLabel:vBulletin.phrase.get("send_report"),cancelLabel:vBulletin.phrase.get("cancel")},multiline:true,validation:{type:"string"},onClickOK:function(H){C("body").css("cursor","wait");C.ajax({url:vBulletin.getAjaxBaseurl()+"/report/report",type:"POST",data:{reason:H,reportnodeid:E},dataType:"json",success:function(I){if(I){if(I.error){console.log("/report/report failed, error: "+JSON.stringify(I.error));var J;if(I.error.length>1){J=vBulletin.phrase.get(I.error)}else{J=vBulletin.phrase.get(I.error[0])}openAlertDialog({title:vBulletin.phrase.get("flag_a_post"),message:J,iconType:"error"})}else{openAlertDialog({title:vBulletin.phrase.get("flag_a_post"),message:vBulletin.phrase.get("the_report_has_been_sent"),iconType:"",onAfterClose:function(){C("#prompt-dialog").dialog("close")}})}}},error:function(K,J,I){console.log("/report/report failed, error: "+I);openAlertDialog({title:vBulletin.phrase.get("flag_a_post"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error",onAfterClose:function(){C("#prompt-dialog").dialog("close")}})},complete:function(){C("body").css("cursor","default")}})}});return false};vBulletin.conversation.editPost=function(K,N){var P=C(this),G,O,L=P.closest(".conversation-list");if(P.closest(".js-comments").length>0){G="comment"}var H=C(".edit-conversation-container form",L);if(H.length>0){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:vBulletin.phrase.get("you_have_a_pending_edit_unsaved"),iconType:"warning",onAfterClose:function(){vBulletin.animateScrollTop(H.closest(".js-post").offset().top,{duration:"slow"})}});return }if(N&&N.isFilterSelected("conversations_on")){N.toggleNewConversations(false)}window.vBulletin.loadingIndicator.show();K.preventDefault();var F=P.parent().attr("data-node-id"),E=(G=="comment")?P.closest(".js-comment"):P.closest(".js-post__content-wrapper");if(L.hasClass("thread-view")){O="thread"}else{if(L.hasClass("full-activity-view")){O="full-activity-stream"}else{if(L.hasClass("activity-view")){O="activity-stream"}else{O="stream"}}}G=G||E.attr("data-node-type")||"";var J,M=C(".b-post__count",E).text()||"1";if(G=="comment"&&(O=="thread"||L.closest(".blog-conversation-content-widget").length==1)){J=Number(M.replace("#",""))}else{J=Number(M.replace("#",""))-1}var I=function(R,U,W,Q){if(R&&R.error){window.vBulletin.loadingIndicator.hide();Q.find(".js-button-group .js-button").prop("disabled",false);if(C.isArray(R.error)){switch(R.error[0]){case"toomanyimages":var V=vBulletin.phrase.get("toomanyimages",R.error[1],R.error[2]);break;default:C.each(R.error,function(Y,Z){R.error[Y]=vBulletin.phrase.get(Z)});var V=R.error.join("
                    ")}}else{var V=vBulletin.phrase.get(R.error)}openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:V,iconType:"error"});return }var X=C(".edit-conversation-container form",E).data("content-type");var S=vBulletin.triggerHandler.apply(Q.get(0),["afterSave",C(document),R]);if(S===false){C("body").trigger(X+"_editform_onunload",[E]);window.vBulletin.loadingIndicator.hide();return }Q.closest(".conversation-reply-slideout").addClass("h-hide");var T=pageData;T["posts-perpage"]=vBulletin.conversation.POSTS_PER_PAGE;if(O=="thread"){T["comments-perpage"]=vBulletin.conversation.COMMENTS_PER_PAGE}var W=C.post(vBulletin.getAjaxBaseurl()+"/create-content/loadnode",{nodeid:F,view:O,index:J,page:T,type:G,isAjaxTemplateRender:true},function(c){if(c.error){openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get(c.error),iconType:"error"})}else{var Y=Q.closest(".js-content-entry").data("current-channelid"),a=Q.find('input[name="parentid"]:checked').val(),Z=C(c);if(Y>0&&a>0&&(Y!=a)){window.location.reload(true);return }C("body").trigger(X+"_editform_onunload",[E]);if(N&&N.isFilterSelected("conversations_on")){N.toggleNewConversations(true)}P.closest(".js-post").replaceWith(Z);C("body").trigger(X+"_newcontent_onload",[Z]);var d=Z.attr("data-node-id");if(Z.hasClass("js-conversation-starter")){var b=C(".js-post-title",Z).first().text();document.title=b+" - "+vBulletin.options.get("bbtitle");C(".page-title-widget .js-main-title").text(b)}C(".js-select-box",Z).selectBox();vBulletin.animateScrollTop(Z.offset().top,{duration:"slow"})}},"json").error(function(){openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_loading_post"),iconType:"error"})}).complete(function(){window.vBulletin.loadingIndicator.hide()})};C.post(vBulletin.getAjaxBaseurl()+"/create-content/loadeditor",{nodeid:F,type:G,view:O,isAjaxTemplateRender:true},function(Q){if(Q.error){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:vBulletin.phrase.get(Q.error),iconType:"error"})}else{var R=function(){if(typeof vBulletin.upload=="undefined"||typeof vBulletin.tagEditor=="undefined"||typeof vBulletin.contentEntryBox.init=="undefined"){vBulletin.ckeditor.loadScripts("",{},R);return }E.addClass("b-post--edit");E.find(".js-post__content").first().addClass("b-post__content--edit");E.find(".b-post__footer").first().addClass("b-post__footer--edit");$container=E.find(".edit-conversation-container").first();E.closest(".js-album-detail").find(".list-item-header").addClass("h-hide").end().find(".conversation-body").addClass("h-hide").end().find(".profile-media-uploadphotos").addClass("h-hide-imp").end().find(".photo-preview").addClass("h-hide").end();vBulletin.contentEntryBox.init();vBulletin.contentEntryBox.setDefaultTab($container.find(".js-content-entry").first());$container.show();console.log($container);window.vBulletin.loadingIndicator.hide();var U=$container.find(".js-attach-list");vBulletin.upload.initializePhotoUpload(E);var T=C(".js-post[data-node-id={0}] .tag-editor-container .tag-input".format(F));if(T.length>0&&typeof vBulletin.tagEditor!="undefined"){var V=new vBulletin.tagEditor.instance(T.selector)}if(U.data("attach-count")>0){$container.find(".b-toolbar__item").filter(function(){return C(this).data("panel")=="b-content-entry-panel__content--attachment"}).click()}vBulletin.contentEntryBox.afterPanelChange(E);C(".js-datepicker",$container).not(".hasDatePicker").datetimepicker({showOn:"both",buttonImage:pageData.baseurl+"/images/calendar-blue.png",buttonImageOnly:true,ampm:true})};console.log("Edit mode: Adding Content Entry UI to DOM (contains parsed post text in the .js-editor-parsed-text element)");C(".edit-conversation-container",E).first().hide().html(Q);var S=C(".edit-conversation-container form",E).data("content-type");C(window).off("beforeunload.editPost").on("beforeunload.editPost",function(){return vBulletin.phrase.get("onbeforeunload_message_while_editing_post")});C("body").trigger(S+"_editform_onload",[E,R]);C(".edit-conversation-container input[placeholder], .edit-conversation-container textarea[placeholder]",E).placeholder();C("form",E).ajaxForm({dataType:"json",success:I,beforeSerialize:function(T){console.log("ajaxForm beforeSerialize (vBulletin.conversation.editPost)");T.trigger("beforeSave");var U=C("body").triggerHandler(S+"_editform_onbeforeserialize",[T]);return(U===false)?false:true},beforeSubmit:function(W,V,U){var T=vBulletin.contentEntryBox.validateForm.apply(V,[U]);if(T===false){return false}C(window).off("beforeunload.editPost");window.vBulletin.loadingIndicator.show();return true},complete:function(){console.log("ajaxForm complete (vBulletin.conversation.editPost)")}})}},"json").error(function(R,S,Q){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:"HTTP {0} - {1}".format(R.status,Q),iconType:"error"})}).complete(function(R,S,Q){window.vBulletin.loadingIndicator.hide()})};vBulletin.conversation.votePost=function(F){var E=C(this).closest(".js-post").attr("data-node-id");C(".js-post[data-node-id="+E+"] .js-post-control__vote").addClass("h-disabled");C("body").css("cursor","wait");if(!C(this).hasClass("voted")){C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/reputation/vote",type:"POST",data:{nodeid:E},dataType:"json",success:function(G){if(G){if(G.errors){openAlertDialog({title:vBulletin.phrase.get("error_saving_vote"),message:vBulletin.phrase.get(G.errors[0]),iconType:"error"});C(".list-item[data-node-id="+E+"] .js-post-control__vote").removeClass("h-disabled")}else{C(".js-post[data-node-id="+G.nodeid+"] .votecount").html(G.votes);C(".js-post[data-node-id="+E+"] .js-post-control__vote").addClass("voted").removeClass("h-disabled").find(".b-post-control__label").text(vBulletin.phrase.get("unvote_cap")).end()}}},complete:function(){C("body").css("cursor","default")}})}else{C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/reputation/unvote",type:"POST",data:{nodeid:E},dataType:"json",success:function(G){if(G){if(G.errors){openAlertDialog({title:vBulletin.phrase.get("error_saving_vote"),message:vBulletin.phrase.get(G.errors[0]),iconType:"error"});C(".js-post[data-node-id="+E+"] .js-post-control__vote").removeClass("h-disabled")}else{C(".js-post[data-node-id="+G.nodeid+"] .votecount").html(G.votes);C(".js-post[data-node-id="+E+"] .js-post-control__vote").removeClass("voted").removeClass("h-disabled").find(".b-post-control__label").text(vBulletin.phrase.get("vote_cap")).end()}}},complete:function(){C("body").css("cursor","default")}})}};vBulletin.conversation.showWhoVoted=function(G){var E=C(this);if(C(this).hasClass("novotepopup")){return }var F=E.closest(".js-post").attr("data-node-id");E.qtip({content:{title:{text:vBulletin.phrase.get("people_who_liked"),button:true},text:vBulletin.phrase.get("loading")+"...",ajax:{url:vBulletin.getAjaxBaseurl()+"/ajax/api/reputation/fetchWhovoted",type:"POST",data:{nodeid:F},dataType:"json",once:false,success:function(K,I){if(K.errors){this.set("content.text",K.errors[0][0])}else{if(K.length<1){this.set("content.text",vBulletin.phrase.get("no_one_voted"))}else{var M="
                    ";this.set("content.text",M)}}},error:function(H,J,I){this.set("content.text","failed to load.")}}},position:{my:"left top",at:"right top",viewport:C(window)},show:{event:"click"},hide:{event:"unfocus",fixed:true},style:{classes:"ui-tooltip-shadow ui-tooltip-light ui-tooltip-whovoted"}});E.qtip("api").show()};vBulletin.conversation.processPostContent=function(E){E.css("border-bottom","").filter(".stream-view.activity-view").find(".list-item-poll form.poll").each(function(F,G){if(C(this).is(":visible")&&C(".view-less-ctrl",this).hasClass("h-hide")){vBulletin.conversation.limitVisiblePollOptionsInAPost(this,3)}})};vBulletin.conversation.limitVisiblePollOptionsInAPost=function(I,H){if(typeof H=="undefined"){H=3}var F=0,G=C("ul.poll li",I),E=parseInt(G.css("line-height"),10);G.each(function(J){C(this).removeClass("h-hide");var K=C(this).height();F+=K/E;if(F>H){C(this).addClass("h-hide")}else{C(this).css("display","")}});if(F>3){C(".view-more-ctrl",I).removeClass("h-hide").next(".js-button-group").addClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}else{C(".view-more-ctrl",I).addClass("h-hide").next(".js-button-group").removeClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}};vBulletin.conversation.bindEditFormEventHandlers=function(L){L=(L)?L.toLowerCase():"";if(C.inArray(L,["text","gallery","video","poll","link","comment"])!=-1||L=="all"){var G=function(Q,P){if(typeof P=="function"){console.log("Edit mode: initializeEditor");var O=Q.find(".js-editor");if(O.length>0){vBulletin.ckeditor.initEditor(O,{success:function(R){if(typeof P=="function"){P();vBulletin.contentEntryBox.afterPanelChange(Q);vBulletin.ckeditor.initEditorComponents(Q);var S=this;window.setTimeout(function(){console.log("Edit mode: Adding post data to CKEditor (vBulletin.conversation.bindEditFormEventHandlers)");S.setData(O.prev(".js-editor-parsed-text").html(),function(){var T=vBulletin.ckeditor.getEditor(R);vBulletin.ckeditor.fixTableFunctionality.call(vBulletin.ckeditor,{},T);T.focus()})},0)}},error:function(S){if(typeof P=="function"){P()}O.prop("disabled",false).removeClass("ckeditor-load-on-focus").closest(".js-content-entry").addClass("b-content-entry--no-ckeditor");var R=O.prev(".js-editor-parsed-text").html();if(R!=""){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/editor/convertHtmlToBbcode",data:{nodeid:pageData.nodeid,data:R,allowsmilie:1,securitytoken:pageData.securitytoken},success:function(T){if(T&&T.data){O.html(T.data)}else{openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error_phrase:"error_converting_message"})}},hideLoadingDialog:false})}else{if(typeof P=="function"){P();O.focus()}}}};var M=function(Q){var P=Q.find(".js-editor");if(P.length>0){var O=P.attr("id");if(vBulletin.ckeditor.editorExists(O)){vBulletin.ckeditor.destroyEditor(O)}}P.closest("form").remove()};var F=function(){C("body").off("comment_editform_onload").on("comment_editform_onload",function(P,Q,O){if(typeof O=="function"){O();C(".js-editor",Q).focus().filter(".autogrow").elastic().off("blur.elastic")}}).off("comment_editform_onunload").on("comment_editform_onunload",function(O,P){})};var I=function(){C("body").off("text_editform_onload").on("text_editform_onload",function(P,Q,O){G(Q,O)}).off("text_editform_onunload").on("text_editform_onunload",function(O,P){M(P)}).off("text_newcontent_onload").on("text_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}})};var J=function(){C("body").off("poll_editform_onload").on("poll_editform_onload",function(P,Q,O){G(Q,O)}).off("poll_editform_onunload").on("poll_editform_onunload",function(O,P){M(P)}).off("poll_newcontent_onload").on("poll_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P);vBulletin.conversation.limitVisiblePollOptionsInAPost(C("form.poll",P),3)}})};var H=function(){C("body").off("gallery_editform_onload").on("gallery_editform_onload",function(P,Q,O){C('.b-toolbar__item[data-panel="b-content-entry-panel__content--gallery"]',Q).trigger("click");G(Q,function(){if(typeof O=="function"){O()}vBulletin.upload.initializePhotoUpload(Q)})}).off("gallery_editform_onunload").on("gallery_editform_onunload",function(O,P){M(P)}).off("gallery_editform_onbeforeserialize").on("gallery_editform_onbeforeserialize",function(P,O){O.find(".caption-box").each(function(){var Q=C(this);if(Q.hasClass("placeholder")&&Q.val()==Q.attr("placeholder")){Q.val("")}});return true}).off("gallery_newcontent_onload").on("gallery_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}})};var K=function(){C("body").off("video_editform_onload").on("video_editform_onload",function(P,Q,O){C('.b-toolbar__item[data-panel="b-content-entry-panel__content--video"]',Q).trigger("click");G(Q,function(){if(typeof O=="function"){O()}N(C(".b-content-entry-panel__content--video",Q),"video")});C(".js-attach-button",Q).on("click",function(U){U.preventDefault();var R=C(this),V=R.closest(".b-content-entry-panel__content--video"),T=C(".b-link-input__url",V),S=C.trim(T.val());if(!S){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get("please_enter_video_url"),iconType:"warning",onAfterClose:function(){T.focus()}});return false}R.prop("disabled",true);C(".js-contententry-buttons .b-button",V).prop("disabled",true);C("body").css("cursor","wait");C.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:S,isAjaxTemplateRender:true},function(X){if(X.error){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get(X.error),iconType:"warning",onAfterClose:function(){T.focus()}})}else{$template=C(X);V.find(".js-panel-content").append($template);N(V,"video");$template.fadeIn("slow",function(){T.val("");C(".b-link-input",V).addClass("h-hide")});var W=Q.closest("form");if($template.find("js-video-url")){W.data("content-type","video")}else{W.data("content-type","link")}}},"json").error(function(Y,X,W){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:"HTTP {0} - {1}".format(Y.status,W),iconType:"error"})}).complete(function(){C("body").css("cursor","default");R.prop("disabled",false);C(".js-contententry-buttons .b-button",V).prop("disabled",false)})})}).off("video_editform_onunload").on("video_editform_onunload",function(O,P){M(P)}).off("video_newcontent_onload").on("video_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}})};var E=function(){C("body").off("link_editform_onload").on("link_editform_onload",function(P,Q,O){C('.b-toolbar__item[data-panel="b-content-entry-panel__content--link"]',Q).trigger("click");G(Q,function(){if(typeof O=="function"){O()}N(C(".b-content-entry-panel__content--link",Q),"link")});C(".js-attach-button",Q).on("click",function(U){U.preventDefault();var R=C(this),V=R.closest(".b-content-entry-panel__content--link"),T=C(".b-link-input__url",V),S=C.trim(T.val());if(!S){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("please_enter_a_valid_url_and_click_attach"),iconType:"warning",onAfterClose:function(){T.focus()}});return false}if(!S.match(/^https?:\/\//)){S="http://"+S;T.val(S)}R.prop("disabled",true);C(".js-contententry-buttons .b-button",V).prop("disabled",true);C("body").css("cursor","wait");C.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:S,isAjaxTemplateRender:true},function(Y){if(Y.error){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:vBulletin.phrase.get(Y.error),iconType:"warning",onAfterClose:function(){T.focus()}})}else{var X=C(Y);X.find("img").error(function(){C(this).closest("li").remove()});V.find(".js-panel-content").append(X);N(V,"link");X.fadeIn("slow",function(){T.val("");C(".b-link-input",V).addClass("h-hide")});var W=Q.closest("form");if(X.find("js-video-url")){W.data("content-type","video")}else{W.data("content-type","link")}}},"json").error(function(Y,X,W){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:"HTTP {0} - {1}".format(Y.status,W),iconType:"error"})}).complete(function(){C("body").css("cursor","default");R.prop("disabled",false);C(".js-contententry-buttons .b-button",V).prop("disabled",false)})})}).off("link_editform_onunload").on("link_editform_onunload",function(O,P){M(P)}).off("link_newcontent_onload").on("link_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}}).off("link_savepost_success").on("link_savepost_success",function(O,P){C(".b-link-input",P).removeClass("h-hide-imp")})};var N=function(P,Q){C(".b-link-content__urlinfo .js-link-edit",P).on("click",function(S){S.preventDefault();var R=C(this).parent().parent();R.addClass("b-link-content__urlinfo-meta--edit-mode");C(".js-link-textbox",R).val(C.trim(C(".b-link-content__urlinfo-text",R).text())).trigger("focus");C(".js-link-save",R).on("click",function(T){T.preventDefault();C(".b-link-content__urlinfo-text",R).text(C(".js-link-textbox",R).val());R.removeClass("b-link-content__urlinfo-meta--edit-mode")})});C(".js-link-remove",P).on("click",function(R){R.preventDefault();C(this).closest(".b-content-entry-panel__content").find(".b-link-input").removeClass("h-hide");C(this).closest(".js-panel-content").empty();C(".b-link-input",P).removeClass("h-hide")});if(Q=="link"){C(".js-link-preview-checkbox",P).off("click").on("click",function(){C(".b-link-content__thumbnail",P)[this.checked?"addClass":"removeClass"]("h-hide")});var O=C(".b-link-thumbnail-list__item",P).length;C(".b-link-thumbnail-list",P).jcarousel({scroll:1,wrap:null,size:O,rtl:C("html").attr("dir")=="rtl",buttonNextCallback:function(T,S,R){if(R){C(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",P).removeClass("b-icon__arrow-right-m--disabled").addClass("b-icon__arrow-right-m--default")}else{C(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",P).addClass("b-icon__arrow-right-m--disabled").removeClass("b-icon__arrow-right-m--default")}},buttonPrevCallback:function(T,S,R){if(R){C(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",P).removeClass("b-icon__arrow-left-m--disabled").addClass("b-icon__arrow-left-m--default")}else{C(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",P).addClass("b-icon__arrow-left-m--disabled").removeClass("b-icon__arrow-left-m--default")}},initCallback:function(S,R){if(R=="init"&&O>0){C(".b-thumbnail-nav .b-thumbnail-nav__counter",P).html("1/"+O);C(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",P).off("click").on("click",function(){if(!C(this).hasClass("b-icon__arrow-left-m--disabled")){C(".jcarousel-container .jcarousel-prev",P).trigger("click")}});C(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",P).off("click").on("click",function(){if(!C(this).hasClass("b-icon__arrow-right-m--disabled")){C(".jcarousel-container .jcarousel-next",P).trigger("click")}})}},itemVisibleInCallback:function(U,S,R,T){if(T=="init"){return false}C(".b-thumbnail-nav .b-thumbnail-nav__counter",P).html(R+"/"+O);C('input[type="radio"]',S).prop("checked",true)},itemFallbackDimension:90})}};switch(L){case"text":I();break;case"comment":F();break;case"poll":J();break;case"gallery":H();break;case"video":K();break;case"link":E();break;case"all":I();F();J();H();K();E();break}}};vBulletin.isScrolledIntoView=function(G,L){var M=false;if(C.isPlainObject(L)&&(L).toString()=="[object Object]"){M=true;L.top=0;L.bottom=0}G=(G instanceof C)?G:C(G);if(G.length==0){return false}var E=C(window).scrollTop(),F=E+C(window).height(),J=G.offset().top,H=J+G.outerHeight(),K=J-E,I=F-H;if(M){L.top=K;L.bottom=I}return(K>=0&&I>=0)};vBulletin.scrollToFixed=function(I){var E=this,F={element:C(),fixedAt:"top",limit:0,triggerOnload:true,zIndex:99},G=("scrollToFixed"+Math.random()).replace(".","");function H(O){F=C.extend({},F,O);if(F.element){F.element=(F.element instanceof C)?F.element:C(F.element);if(F.element.length>0){if(C.inArray(F.fixedAt,["top","bottom"])){F.fixedAt="top"}var L=F.element,J="scrolltofixed",K={width:L.width(),offset:L.offset(),"margin-top":parseInt(L.css("margin-top"),10),"margin-bottom":parseInt(L.css("margin-bottom"),10),cssPosition:L.css("position"),coordinates:{left:L.css("left"),top:L.css("top"),right:L.css("right"),bottom:L.css("bottom")}};var N=C("
                    ").addClass("scrolltofixed-filler").hide().insertAfter(L);L.data("origOffsetTop",K.offset.top);L.css("z-index",F.zIndex);L.data("object-instance",E);var M=C(window).off("scroll."+G).on("scroll."+G,function(){if(L.is(":hidden")){return }var S=C(this).scrollTop();if(F.limit>0&&S>F.limit&&L.hasClass(J)){L.removeClass(J).css({position:"absolute",left:"auto",right:"auto",top:"auto",bottom:"auto",width:K.width})}else{if((F.limit>0&&SK.offset.top&&!L.hasClass(J))||(F.limit<=0&&S>K.offset.top&&!L.hasClass(J))){N.css({display:L.css("display"),width:L.outerWidth(true),height:L.outerHeight(true),"float":L.css("float")});var P=(vBulletin.Responsive&&vBulletin.Responsive.scrollToFixedBreakPoint)?vBulletin.Responsive.scrollToFixedBreakPoint:0;if(C("#vb-page-body").width()>P){L.addClass(J).width(K.width).css({left:K.offset.left,right:"auto",width:K.width,top:(F.fixedAt=="top")?0:"auto",bottom:(F.fixedAt=="bottom")?0:"auto",position:""})}else{N.hide()}var R=K["margin-"+F.fixedAt];if(R){var Q={};Q[F.fixedAt]=-R+"px";L.animate(Q,"fast")}}else{if(S<=K.offset.top&&L.hasClass(J)){N.hide();L.removeClass(J).css({position:"",width:"",left:"",top:"",right:"",bottom:""})}}}}).off("resize."+G).on("resize."+G,function(){L.removeClass(J).width("auto").css({position:"",left:""});K.width=L.width();K.offset=L.offset();C(this).trigger("scroll."+G)});if(F.triggerOnload){M.trigger("scroll."+G)}}}}this.updateLimit=function(J){if(!isNaN(Number(J))){F.limit=J;C(window).trigger("scroll."+G)}};this.addLimit=function(J){if(!isNaN(Number(J))){F.limit+=J;C(window).trigger("scroll."+G)}};this.reset=function(J){H(J)};H(I)};vBulletin.scrollToAnchor=function(I){I=I.replace(/(:|\.|\[|\]|,|\/)/g,"\\$1");var G=C(I);console.log("vBulletin.scrollToAnchor() hash: {0}, found: {1}".format(I,G.length));if(G.length>0){var F=G.show().offset().top-2;G.hide();var H=C("html,body"),E=C(".scrolltofixed-floating.scrolltofixed-top"),J=false;if(E.length>0){if(C(".list-container .list-item:first a.anchor"+I).length==1){if(E.hasClass("scrolltofixed")){E.removeClass("scrolltofixed")}F=E.offset().top;J=true}else{if(E.hasClass("scrolltofixed")){F-=E.outerHeight()}}}H.animate({scrollTop:F},1000,function(){if(!J){var L=G.show().offset().top;G.hide();var K=C(".scrolltofixed-floating.scrolltofixed-top.scrolltofixed");L-=(K.length>0)?K.outerHeight():0;H.animate({scrollTop:L},"slow")}C("a.anchor").show()});return false}C("a.anchor").show();return true};if(location.hash){vBulletin.scrollToAnchor(location.hash)}vBulletin.animateScrollTop=function(F,G){console.log("vBulletin.animateScrollTop({0})".format(F));var E=C(".scrolltofixed-floating.scrolltofixed-top");if(E.length>0){var H=E.data("origOffsetTop")||E.offset().top;if(!E.hasClass("scrolltofixed")&&HtruncatedHeight){F.closest(".list-item-body").find(".post-links").removeClass("hide-see-link").find(".see-link").off("click").on("click",function(){var I=C(this);if(I.hasClass("more")){F.removeClass("ellipsis")}else{F.addClass("ellipsis")}I.toggleClass("more less");var H=I.text();I.text(I.data("toggle-text")).data("toggle-text",H);return false})}});C(".list-item .see-link.more").each(function(F){var G=C(this).closest(".list-item"),I=C(G).find(".post-content.restore");if(I.length>0){var L=false,J=false,N=C(this).text(),H="",M=C(I).html(),K=this;C(this).on("click",function(){nodeid=C(G).attr("data-node-id");if(L){C(K).text(N);C(I).html(M);L=false}else{if(J){C(K).text(vBulletin.phrase.get("see_less"));L=true;C(I).html(H)}else{if(!J&&nodeid){C.ajax({url:vBulletin.getAjaxBaseurl()+"/activity/fetchText",type:"POST",data:{nodeid:nodeid},dataType:"json",complete:function(){},success:function(O){if(O&&!O.error&&O.nodeText){H=O.nodeText;if(H.length<=M.length){C(K).addClass("ui-helper-hidden");postLink=C(K).closest(".post-links").html().replace("|","");C(K).closest(".post-links").html(postLink)}else{C(I).html(O.nodeText);C(K).text(vBulletin.phrase.get("see_less"));console.log("loaded content for node "+nodeid);L=true;J=true;return false}}},error:function(Q,P,O){console.log("Attempt to load text for node "+nodeid+" failed:"+O)}})}}}return false})}})};vBulletin.markreadcheck=function(){if((parseInt(pageData.threadmarking)>0)&&(parseInt(pageData.userid)>0)){return }var E=C.cookie(pageData.cookie_prefix+"lastvisit");if(parseInt(pageData.userid)>0&&(!E||pageData.lastvisit>E)){E=pageData.lastvisit}var F=Math.round(new Date().getTime()/1000),G=F-vBulletin.options.get("markinglimit")*86400;C(".forum-item").each(function(){var I=parseInt(C(this).attr("data-lastcontent")),H=0;if(I<=E){C(this).removeClass("new");return }H=vBulletin.cookie.fetchBbarrayCookie("channel_view",C(this).attr("data-channel-id"));H=H?parseInt(H):0;C(this).toggleClass("new",(I>H))});C(".subforum-item").each(function(){var I=parseInt(C(this).attr("data-lastcontent")),H=0;if(I<=E){C(this).removeClass("new").find(".icon").removeClass("new");return }H=vBulletin.cookie.fetchBbarrayCookie("channel_view",C(this).attr("data-channel-id"));H=H?parseInt(H):0;C(this).toggleClass("new",(I>H)).find(".icon").toggleClass("new",(I>H))});C(".topic-item").each(function(){var I=parseInt(C(this).attr("data-lastcontent")),J=0,H=0,L=0;if(pageData.userid=="0"){if(I<=E){C(this).addClass("read");return }H=vBulletin.cookie.fetchBbarrayCookie("channel_view",C(this).attr("data-channel-id"));H=H?parseInt(H):0;J=vBulletin.cookie.fetchBbarrayCookie("discussion_view",C(this).attr("data-node-id"));J=J?parseInt(J):0;L=Math.max(H,J)}else{L=C(this).attr("data-readtime")?parseInt(C(this).attr("data-readtime")):0;H=C(this).attr("data-channelreadtime")?parseInt(C(this).attr("data-channelreadtime")):0;L=Math.max(L,H,G)}if(I<=L||C(this).hasClass("redirect")){C(this).addClass("read")}else{if(C(this).find(".topic-wrapper .go-to-first-unread").length==0){var K=C(this).find(".topic-wrapper .topic-title").attr("href");if(typeof (K)!="undefined"){K+=(K.indexOf("?")==-1?"?":"&")+"goto=newpost";C("").addClass("go-to-first-unread").attr("href",K).attr("title",vBulletin.phrase.get("go_to_first_new_post")).html(" ").prependTo(C(this).find(".topic-wrapper"));C(this).find(".vb-icon-topic-status").attr("title",vBulletin.phrase.get("new_posts"))}}}})};vBulletin.markchannelsread=function(G,H,E){channelids=[];if(parseInt(G)){vBulletin.setChannelRead(G,H)}else{if(pageData.channelid&&parseInt(pageData.channelid)&&parseInt(pageData.threadmarking)>0&&parseInt(pageData.userid)>0){vBulletin.setChannelRead(pageData.channelid,H)}else{channels=C(E).closest(".widget-content").find(".forum-list-container .forum-item");subchannels=C(E).closest(".widget-content").find(".forum-list-container .subforum-item");result=false;var F=function(I,K){var J=parseInt(C(K).attr("data-channel-id"),10);if(J){channelids.push(J)}};C.each(channels,F);C.each(subchannels,F)}}C.each(channelids,function(I,J){if(I>=channelids.length-1){vBulletin.setChannelRead(J,H)}else{vBulletin.setChannelRead(J,[])}})};vBulletin.setChannelRead=function(F,G){var H=Math.round(new Date().getTime()/1000);if(pageData.threadmarking=="0"||!parseInt(pageData.userid)){if(F==0){C.cookie(pageData.cookie_prefix+"lastvisit",H)}else{var E;try{E=C.parseJSON(vBulletin.cookie.convertBbarrayCookie(C.cookie(pageData.cookie_prefix+"channel_view")))||{}}catch(I){E={}}E[F]=H;var J={path:pageData.cookie_path,domain:pageData.cookie_domain};J.expires=365;C.cookie(pageData.cookie_prefix+"channel_view",vBulletin.cookie.convertBbarrayCookie(JSON.stringify(E),"set"),J)}if(G.success&&typeof G.success=="function"){G.success()}}else{C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/markChannelsRead",data:{nodeid:F},type:"POST",dataType:"json",complete:function(){},success:function(K){if(K&&!K.error){console.log("Channel "+F+" is marked read successfully!")}if(G.success&&typeof G.success=="function"){G.success(K)}else{console.log("Channel "+F+" is marked read failed: "+K.error)}},error:function(M,L,K){console.log("Channel "+F+" is marked read failed:"+error);openAlertDialog({title:vBulletin.phrase.get("forum"),message:"HTTP {0} - {1}".format(M.status,K),iconType:"error"})}})}return true};vBulletin.ckeditor=vBulletin.ckeditor||{};window.CKEDITOR_BASEPATH=pageData.baseurl+"/js/ckeditor/";vBulletin.ckeditor.requiredScriptsLoaded=false;vBulletin.ckeditor.requiredScriptsLoadFailed=false;vBulletin.ckeditor.requiredScriptLoadingStarted=false;vBulletin.ckeditor.checkEnvironment=function(){var H=navigator.userAgent.toLowerCase(),I=H.match(/edge[ \/](\d+.?\d*)/),F=H.indexOf("trident/")>-1,K=!!(I||F);var G={ie:K,edge:!!I,webkit:!K&&(H.indexOf(" applewebkit/")>-1),air:(H.indexOf(" adobeair/")>-1),mac:(H.indexOf("macintosh")>-1),quirks:(document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10)),mobile:(H.indexOf("mobile")>-1),iOS:/(ipad|iphone|ipod)/.test(H)};G.gecko=(navigator.product=="Gecko"&&!G.webkit&&!G.opera&&!G.ie);if(G.webkit){if(H.indexOf("chrome")>-1){G.chrome=true}else{G.safari=true}}var E=0;if(G.ie){if(I){E=parseFloat(I[1])}else{if(G.quirks||!document.documentMode){E=parseFloat(H.match(/msie (\d+)/)[1])}else{E=document.documentMode}}G.ie9Compat=E==9;G.ie8Compat=E==8;G.ie7Compat=E==7;G.ie6Compat=E<7||G.quirks}if(G.gecko){var J=H.match(/rv:([\d\.]+)/);if(J){J=J[1].split(".");E=J[0]*10000+(J[1]||0)*100+(J[2]||0)*1}}if(G.air){E=parseFloat(H.match(/ adobeair\/(\d+)/)[1])}if(G.webkit){E=parseFloat(H.match(/ applewebkit\/(\d+)/)[1])}var L=(!(G.ie&&E<7)&&!(G.gecko&&E<40000)&&!(G.webkit&&E<534));return L};vBulletin.ckeditor.fireCallbacks=function(H,F,E,G){if(E=="error"&&typeof F.error=="function"){F.error(H)}if(E=="success"&&typeof F.success=="function"){F.success.apply(G,[H,G])}if(typeof F.complete=="function"){F.complete(H)}};vBulletin.ckeditor.initEditor=function(G,F){F=F||{};G=vBulletin.ckeditor.verifyEditorId(G);console.log("Ckeditor: initEditor({0})".format(G));if(!vBulletin.ckeditor.checkEnvironment()){var E=C("#"+G).closest(".js-content-entry");E.find("li[data-panel=b-content-entry-panel__content--toggle-editor]").addClass("h-hide");E.find("li[data-panel=b-content-entry-panel__content--smiley]").addClass("h-hide");E.find("form").append(C(''));vBulletin.ckeditor.fireCallbacks(G,F,"error");return }if(vBulletin.ckeditor.requiredScriptsLoaded){vBulletin.ckeditor.doInitEditor(G,F)}else{vBulletin.ckeditor.loadScripts(G,F)}};vBulletin.ckeditor.loadScripts=function(G,F,E){if(vBulletin.ckeditor.requiredScriptLoadingStarted){console.warn("Ckeditor: Trying to load required scripts more than once.");return }vBulletin.ckeditor.requiredScriptLoadingStarted=true;F=F||{};G=G||"";if(typeof (F.hideLoadingDialog)!=="undefined"&&!F.hideLoadingDialog){vBulletin.ckeditor.showLoadingDialog(G)}var I=function(){if(F.showError||!vBulletin.ckeditor.requiredScriptsLoadFailed){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_loading_ckeditor_script"),iconType:"warning"})}vBulletin.loadingIndicator.hide();vBulletin.ckeditor.requiredScriptsLoadFailed=true;vBulletin.ckeditor.fireCallbacks(G,F,"error")};var H=function(){if(!vBulletin.ckeditor.requiredScriptsLoadFailed){if(typeof E=="function"){E()}if(typeof vBulletin.ckeditor.doInitEditor=="function"&&window.CKEDITOR){vBulletin.ckeditor.requiredScriptsLoaded=true;vBulletin.ckeditor.doInitEditor(G,F)}else{setTimeout(H,10)}}else{vBulletin.ckeditor.fireCallbacks(G,F,"error");if(!F.hideLoadingDialog){vBulletin.ckeditor.hideLoadingDialog(G)}}};if(typeof vBulletin.ckeditor.doInitEditor!="function"&&!window.CKEDITOR){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/ckeditor_javascript",success:function(K){var J=[];var L=/src="([^"]+)"/g;while(match=L.exec(K)){J.push(match[1])}var M=function(){if(J.length>0){console.log("Ckeditor: Calling getScript for: {0}".format(J[0]));C.getScript(J[0],function(N,P,O){if(P!="success"){console.warn("Ckeditor: Error loading "+J[0]);I();return false}console.log("Ckeditor: Script loaded: "+J[0]);J.splice(0,1);M()}).fail(function(O,P,N){console.warn("Ckeditor: Error loading script: "+P+" Exception: "+N);I()})}else{H()}};M()},error_phrase:"error_fetching_dialog"})}else{H()}};vBulletin.ckeditor.editorExists=function(E){return false};vBulletin.ckeditor.isEditorEmpty=function(E){return true};vBulletin.ckeditor.resetEditor=function(E){return false};vBulletin.ckeditor.getEditorContent=function(F){F=vBulletin.ckeditor.verifyEditorId(F);if(!F){return false}if(vBulletin.ckeditor.editorExists(F)){var E=vBulletin.ckeditor.getEditor(F);if(E&&E.getData){return C.trim(E.getData())}else{return false}}else{return C.trim(C("#"+F).val())}};vBulletin.ckeditor.focusEditor=function(F){F=vBulletin.ckeditor.verifyEditorId(F);if(!F){return }if(vBulletin.ckeditor.editorExists(F)){var E=vBulletin.ckeditor.getEditor(F);if(E){E.focus()}}else{C("#"+F).focus()}};vBulletin.ckeditor.loadingDialogStack={};vBulletin.ckeditor.showLoadingDialog=function(E){if((typeof vBulletin.ckeditor.loadingDialogStack[E]!="undefined")&&vBulletin.ckeditor.loadingDialogStack[E]){return }vBulletin.ckeditor.loadingDialogStack[E]=true;var F=C("#"+E);if(F.length>0&&F.is(":visible")){F.prop("disabled",true)}window.vBulletin.loadingIndicator.show("vBulletin.ckeditor.showLoadingDialog editorId: "+E)};vBulletin.ckeditor.hideLoadingDialog=function(E){if((typeof vBulletin.ckeditor.loadingDialogStack[E]=="undefined")||!vBulletin.ckeditor.loadingDialogStack[E]){return }vBulletin.ckeditor.loadingDialogStack[E]=false;C("#"+E).prop("disabled",false);window.vBulletin.loadingIndicator.hide("vBulletin.ckeditor.hideLoadingDialog editorId: "+E)};vBulletin.ckeditor.generatedIdCounter=0;vBulletin.ckeditor.verifyEditorId=function(F){F=F||"";if(typeof F=="string"){return F}else{if(typeof F=="object"&&typeof F.checkDirty!="undefined"&&typeof F.name!="undefined"){return F.name}else{var E=F instanceof C?F:C(F);if(!E.attr("id")){++vBulletin.ckeditor.generatedIdCounter;E.attr("id",("vb-cke-instance-"+vBulletin.ckeditor.generatedIdCounter))}return E.attr("id")}}};vBulletin.ckeditor.initEditorComponents=function(F,E){F=F||document;C(function(){C(".js-ckeditor-init-on-focus",F).off("focus").on("focus",function(){vBulletin.ckeditor.initEditor(C(this))});C(".js-ckeditor-init-on-page-load",F).each(function(){vBulletin.ckeditor.initEditor(C(this))});if(E){return }(function(){var I=function(J){return C(".js-content-entry-post-icons option",F).filter(function(){return(C(this).val()==J)}).data("icon-url")};var H=function(J){if(J==0){return C("").html(vBulletin.phrase.get("no_icon")).get(0)}var K=I(J);if(K){return C("").attr("src",K).attr("alt","").get(0)}else{return""}};C(".js-content-entry-post-icons",F).selectBox().change(function(){var J=C(this).val();C(".js-content-entry-post-icons.selectBox-dropdown .selectBox-label",F).html(H(J))});C(".js-content-entry-post-icons-selectBox-dropdown-menu li a").each(function(){var J=C(this).attr("rel");C(this).html(H(J))});C(".js-content-entry-post-icons",F).trigger("change")})();C(".js-content-entry-prefixes",F).selectBox();var G=[];C(".js-select-box",F).each(function(){var H=C(this),I;while(H.is(":hidden")){I=H.closest(".h-hide");if(I.length<1){break}G.push(I);I.removeClass("h-hide")}H.selectBox()});C.each(G,function(H,I){I.addClass("h-hide")})})};vBulletin.ckeditor.initEditorComponents(document);C(".js-focus-on-page-load").first().focus();vBulletin.errorAlert=function(F,E){openAlertDialog({title:F,message:E,iconType:"error"})};vBulletin.makeErrorAlertCallback=function(H,G,E,F){return(function(J,N,L){var I="";if(typeof J.status!="undefined"){I+=" "+J.status}if(N!=null){I+=" "+N}if(typeof L!="undefined"){I+=" "+L}var K=vBulletin.phrase.get(G)+"

                    "+vBulletin.phrase.get("error_information_x",I);var M={title:H,message:G,callUrl:E,textStatus:N,jqXHRStatus:J.status,errorThrown:L};console.log(F+" Error callback: "+E);console.log(F+" Error data:");console.dir(M);vBulletin.errorAlert(vBulletin.phrase.get(H),K)})};vBulletin.makeAjaxSuccessCallback=function(F,G,J,H,I){var E=function(L){console.log(I+" Success callback: "+F.url);if(!L){if(!G.emptyResponse){console.log(I+" Success, Empty response.");vBulletin.errorAlert(vBulletin.phrase.get(F.title_phrase),vBulletin.phrase.get("invalid_server_response_please_try_again"))}else{G.emptyResponse.apply(this,arguments)}}else{if(L&&(L.errors||L.error)){var M=L.errors||L.error;if(!C.isArray(M)){M=[M]}var N=(C("#debug-information").length==1);if(N){console.log(I+" Success, API Error(S):");console.dir(M)}else{console.log(I+" Success, API Error.")}if(M[0]=="inlinemodauth_required"){return vBulletin.inlinemod.openAuthDialog({func:H,context:J,args:[G]})}if(F.api_error){var P=F.api_error.apply(J,[M,L,F]);if(!P){return }}var K=[],O="";C.each(M,function(){var R=this,Q=R;if(C.isArray(R)){if(R[0]=="exception_trace"){O=R[1];return true}Q=R[0]}var S=vBulletin.phrase.get(R);Q=Q!=S?(" ("+Q+")"):"";K.push("
                  2. "+S+Q+"
                  3. ")});if(N&&O){K.push('
                  4. ")}if(N){K.push('
                  5. ")}K="
                      "+K.join("\n")+"
                    ";vBulletin.errorAlert(vBulletin.phrase.get(F.title_phrase),vBulletin.phrase.get("error_x",K));return false}else{if(G.success){console.log(I+" Success.");G.success.apply(this,arguments)}}}};return E};vBulletin.AJAX=function(F){var E={type:"POST",dataType:"json",title_phrase:"error",error_phrase:"error",api_error:false,element:null};C.extend(true,E,F);if(!E.url){E.url=vBulletin.getAjaxBaseurl()+E.call;E.call=""}if(!E.error){E.error=vBulletin.makeErrorAlertCallback(E.title_phrase,E.error_phrase,E.url,"vBulletin.AJAX")}E.success=vBulletin.makeAjaxSuccessCallback(E,F,this,vBulletin.AJAX,"vBulletin.AJAX");C.ajax(E)};vBulletin.ajaxForm=function(F){var E={dataType:"json",title_phrase:"error",error_phrase:"error",element:null,complete:function(){C(".button[type=submit]",this).prop("disabled",false)},beforeSerialize:function(G){C(".placeholder",G).each(function(){var H=C(this);if(H.val()==H.attr("placeholder")){H.val("")}})},beforeSubmit:function(I,H,G){C(".button[type=submit]",this).prop("disabled",true);return true}};C.extend(E,F);if(!E.error){E.error=vBulletin.makeErrorAlertCallback(E.title_phrase,E.error_phrase,E.url,"vBulletin.ajaxForm")}E.success=vBulletin.makeAjaxSuccessCallback(E,F,this,vBulletin.ajaxForm,"vBulletin.ajaxForm");this.ajaxForm(E)};vBulletin.doReplaceSecurityToken=function(E){if(E==""){return }C("form").each(function(){var F=C(this);if(typeof (this.method)!="undefined"&&this.method.toLowerCase()=="post"){if(F.find('input[name="securitytoken"]').length){F.find('input[name="securitytoken"]').val(E)}else{F.append('')}}});pageData.securitytoken=E;console.log("Securitytoken updated")};window.openAlertDialog=function(J){var I=C("#alert-dialog");J=J||{};if(!I.data("created")){I.dialog({autoOpen:false,zIndex:10100,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,dialogClass:"dialog-container alert-dialog-container dialog-box",create:function(){I.data("created",true)}})}I.dialog("option","width",J.width||500);I.dialog("option","title",J.title||vBulletin.phrase.get("alert"));var F=I.find(".dialog-content");var G=F.find(".message");var E=F.find(".icon");var H=C("#btnAlertDialogOK");if(J.maxHeight){F.css({"max-height":J.maxHeight,overflow:"auto"})}else{F.css({"max-height":"",overflow:""})}if(J.message){G.html(J.message)}E.removeClass(function(K,L){return(L.match(/\S+-icon\b/g)||[]).join(" ")});J.buttonLabel=J.buttonLabel||vBulletin.phrase.get("ok");H.html(J.buttonLabel);I.find(".js-button").toggleClass("b-button--sitebuilder",C("body").is(".edit-mode"));I.off("dialogopen").on("dialogopen",function(){H.off("click").on("click",function(){if(typeof J.onBeforeClose=="function"){J.onBeforeClose.apply(this)}I.dialog("close")}).focus()});I.off("dialogclose").on("dialogclose",function(){if(typeof J.onAfterClose=="function"){J.onAfterClose.apply(H)}});switch(J.iconType){case"warning":E.addClass("warning-icon vb-icon vb-icon-warning");E.show();break;case"error":E.addClass("error-icon vb-icon vb-icon-error");E.show();break;default:E.addClass("no-icon").hide()}I.dialog("open");return I};window.openConfirmDialog=function(I){I=I||{};var E=C("#confirm-dialog");if(!E.data("created")){E.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,create:function(){E.data("created",true)}})}var L=I.title||vBulletin.phrase.get("confirmation");E.dialog("option","title",L);E.closest(".ui-dialog").find(".ui-dialog-title").html(L);var M=E.find(".dialog-content");var J=M.find(".message");var K=M.find(".icon");if(I.message){J.html(I.message.replace("\n","
                    "))}E.dialog("option","width",(I.width?I.width:500));E.dialog("option","dialogClass","dialog-container confirm-dialog-container dialog-box "+(I.dialogClass||""));K.removeClass(function(N,O){return(O.match(/\S+-icon\b/g)||[]).join(" ")});I.buttonLabel=I.buttonLabel||{};I.buttonLabel.yesLabel=I.buttonLabel.yesLabel||vBulletin.phrase.get("yes");I.buttonLabel.noLabel=I.buttonLabel.noLabel||vBulletin.phrase.get("no");var G=C("#btnConfirmDialogYes").html(I.buttonLabel.yesLabel);var H=C("#btnConfirmDialogNo").html(I.buttonLabel.noLabel);G.addClass("b-button--primary").removeClass("b-button--secondary");H.addClass("b-button--secondary").removeClass("b-button--primary");E.find(".js-button").toggleClass("b-button--sitebuilder",C("body").is(".edit-mode"));var F;E.off("dialogopen").on("dialogopen",function(){var O=C("#btnConfirmDialogYes").off("click").on("click",function(){F=this;var Q,P;if(typeof I.onClickYes=="function"){Q=I.onClickYes.apply(this);if(typeof I.onClickYesWithAjax!="undefined"&&I.onClickYesWithAjax){return false}}if(Q===false){return false}if(typeof I.onBeforeClose=="function"){P=I.onBeforeClose.apply(this);if(typeof I.onBeforeCloseWithAjax!="undefined"&&I.onBeforeCloseWithAjax){return false}}if(P===false){return false}E.dialog("close")}).focus();var N=C("#btnConfirmDialogNo").off("click").on("click",function(){F=this;if(typeof I.onClickNo=="function"){I.onClickNo.apply(this)}if(typeof I.onBeforeClose=="function"){I.onBeforeClose.apply(this)}E.dialog("close")})});E.off("dialogclose").on("dialogclose",function(O,N){if(typeof I.onAfterClose=="function"){I.onAfterClose.apply(F)}});switch(I.iconType){case"warning":K.addClass("warning-icon vb-icon vb-icon-warning");K.show();break;case"question":K.addClass("question-icon");K.show();break;default:K.addClass("no-icon").hide()}E.dialog("open");return E};window.openPromptDialog=function(H){var J=C("#prompt-dialog");if(!J.data("created")){J.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:500,dialogClass:"dialog-container prompt-dialog-container dialog-box",create:function(){J.data("created",true)}})}H=H||{};J.dialog("option","title",H.title||vBulletin.phrase.get("prompt"));var M=J.find(".dialog-content"),I=M.find(".message"),K;if(H.message){I.html(H.message)}var E=H.initialValue||"";if(!H.multiline){K=J.find("input.input-box").val(E).removeClass("h-hide");K.next().addClass("h-hide");if(Number(H.maxlength)){K.attr("maxlength",Number(H.maxlength))}else{K.removeAttr("maxlength")}M.addClass("table");M.find("> div").addClass("td")}else{K=J.find("textarea.input-box").val(E).removeClass("h-hide");K.prev().addClass("h-hide");M.removeClass("table");M.find("> .td").removeClass("td")}H.buttonLabel=H.buttonLabel||{};H.buttonLabel.okLabel=H.buttonLabel.okLabel||vBulletin.phrase.get("ok");H.buttonLabel.cancelLabel=H.buttonLabel.cancelLabel||vBulletin.phrase.get("cancel");var L=C("#btnPromptDialogOK").html(H.buttonLabel.okLabel),G=C("#btnPromptDialogCancel").html(H.buttonLabel.cancelLabel),F;J.find(".js-button").toggleClass("b-button--sitebuilder",C("body").is(".edit-mode"));J.off("dialogopen").on("dialogopen",function(){var O=C("#btnPromptDialogOK").off("click").on("click",function(){F=this;var Q=C.trim(K.val()),P,R;if(H.validation&&typeof H.validation=="object"){if(H.validation.override&&typeof H.validation.custom=="function"){if(!H.validation.custom.apply(this,[K])){return false}}else{switch(H.validation.type){case"number":Q=Number(Q);if(isNaN(Q)){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input must be a number.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}if(H.validation.range&&typeof H.validation.range=="object"){if(QH.validation.range.max){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input must be within "+H.validation.range.min+" - "+H.validation.range.max+" only.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}}break;case"string":default:if(!Q){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input required.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}else{if(H.multiline&&Q.length>H.maxlength){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input too long. Maximum allowed is "+H.maxlength+" characters.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}}}if(H.validation.set&&C.isArray(H.validation.set)&&H.validation.set.length>0){if(C.inArray(Q,H.validation.set)==-1){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input must be one of these: "+H.validation.set.join(", ")+".",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}}if(typeof H.validation.custom=="function"){if(!H.validation.custom.apply(this,[K])){return false}}}}if(typeof H.onClickOK=="function"){R=H.onClickOK.apply(this,[Q]);if(typeof H.onClickOKWithAjax!="undefined"&&H.onClickOKWithAjax){return false}}if(R===false){return false}if(typeof H.onBeforeClose=="function"){P=H.onBeforeClose.apply(this);if(typeof H.onBeforeCloseWithAjax!="undefined"&&H.onBeforeCloseWithAjax){return false}}if(P===false){return false}J.dialog("close")}).trigger("focus");var N=C("#btnPromptDialogCancel").off("click").on("click",function(){F=this;if(typeof H.onClickCancel=="function"){H.onClickCancel.apply(this)}if(typeof H.onBeforeClose=="function"){H.onBeforeClose.apply(this)}J.dialog("close")})});J.off("dialogclose").on("dialogclose",function(){if(typeof H.onAfterClose=="function"){H.onAfterClose.apply(F);K.val("")}});J.dialog("open");K.trigger("focus");return J};window.openLoadingDialog=function(){console.warn("Function openLoadingDialog is deprecated.");window.vBulletin.loadingIndicator.show("openLoadingDialog")};window.closeLoadingDialog=function(){console.warn("Function closeLoadingDialog is deprecated.");window.vBulletin.loadingIndicator.hide("closeLoadingDialog")};window.bindFormReset=function(E){return C(E).on("reset",function(F,G){if(typeof G=="function"){G()}})};window.vBulletin=window.vBulletin||{};vBulletin.sitebuilder=vBulletin.sitebuilder||{};vBulletin.sitebuilder.toggleSitebuilder=function(E){var F=C(this);if(F.closest("li").hasClass("h-disabled")||F.closest("ul").hasClass("h-disabled")){return true}if(F.hasClass("on")){C.removeCookie(pageData.sb_state_cookie,{path:pageData.cookie_path,domain:pageData.cookie_domain});C("#main-navbar .main-nav").hide();F.removeClass("on");return true}if(C("#main-navbar .main-nav li").length>0){C("#main-navbar .main-nav").show();F.addClass("on");C.cookie(pageData.sb_state_cookie,"1",{path:pageData.cookie_path,domain:pageData.cookie_domain});return true}vBulletin.sitebuilder.loadSitebuilderMarkup(true);return true};vBulletin.sitebuilder.loadSitebuilderMarkup=function(E,G){E=E||false;function F(){if(typeof G=="function"){return G()}}if(C("#sitebuilder-wrapper").is(".js-sb-loaded")){return F()}vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/activate-sitebuilder",data:{pageid:pageData.pageid,nodeid:pageData.nodeid,userid:pageData.userid,loadMenu:E},cache:false,isAjaxTemplateRender:true,isAjaxTemplateRenderWithData:true,success:function(H){if(H&&H.templates){if(E){C("head").append(H.templates.css);C("#main-navbar .main-nav").hide().html(H.templates.menu)}C("#sitebuilder-wrapper").prepend(H.templates.main);C("#main-navbar .main-nav").show();C(".edit-switch-container .switch-control").addClass("on");C("#sitebuilder-wrapper").addClass("js-sb-loaded");C.cookie(pageData.sb_state_cookie,"1",{path:pageData.cookie_path,domain:pageData.cookie_domain});return F()}else{console.log("activating sitebuilder failed!");openAlertDialog({title:"Error",message:"Error activating SiteBuilder.

                    Please try again.",iconType:"error"})}}})};vBulletin.sitebuilder.menuClickProxy=function(){var E=this;vBulletin.sitebuilder.loadSitebuilderMarkup(false,function(){C("#main-navbar .sb-menu").off("click",vBulletin.sitebuilder.menuClickProxy);C(E).find("a").click()});return false};setTimeout(function(){if(!C.support.selectstart){C.fn.extend({disableSelection:function(){return this.each(function(){C(this).css({"-moz-user-select":"-moz-none","-webkit-user-select":"none","-khtml-user-select":"none","-o-user-select":"none","user-select":"none"})})},enableSelection:function(){return this.each(function(){C(this).css({"-moz-user-select":"","-webkit-user-select":"","-khtml-user-select":"","-o-user-select":"","user-select":""})})}})}function I(){window.vBulletin.loadingIndicator.init();C(document).off("click","a.animate-scroll").on("click","a.animate-scroll",function(){var Q=vBulletin.scrollToAnchor(this.hash);if(Q){window.location.href=this.href}return false});var P=function(Q){C(this).closest(".split-button").toggleClass("open").find(".submenu").toggleClass("h-hide");C("body").off("click.buttonset").on("click.buttonset",function(R){if(C(R.target).closest(".split-button").length==0){C(".split-button").removeClass("open").find(".submenu").addClass("h-hide");C("body").off("click.buttonset")}})};C(".split-button .button-text").button().closest(".button-set").find(".js-button__icon").button({text:false,icons:{primary:"vb-icon vb-icon-triangle-down-wide"}}).on("click",P).closest(".button-set").buttonset().filter(".one-click").find(".button-text").on("click",P);C(document).off("click",".canvas-widget .toggle-button").on("click",".canvas-widget .toggle-button",function(T,Q){var S=C(this),U=S.closest(".canvas-widget");if(S.hasClass("expand")){if(Q){C(".widget-content",U).show()}else{C(".widget-content",U).slideDown("slow")}U.removeClass("collapsed")}else{if(Q){C(".widget-content",U).hide()}else{C(".widget-content",U).slideUp("slow")}U.addClass("collapsed")}S.toggleClass("collapse expand");var R=S.attr("title");S.attr("title",S.data("toggle-title")).data("toggle-title",R);return false});C(".conversation-toolbar-wrapper form.toolbar-filter-overlay").trigger("reset");var N=!!("placeholder" in document.createElement("input"));if(!N){var M=C("input[placeholder], textarea[placeholder]");M.filter(":focus").addClass("js-temp-focus").blur();M.placeholder();var O=function(R){var Q=M.filter(".js-temp-focus").focus();if(R){Q.removeClass("js-temp-focus")}};C(window).on("load.placeholder_temp",function(){O(true);C(window).off("load.placeholder_temp")});O()}if(C("textarea.autogrow").length>0){C("textarea.autogrow").elastic().off("blur.elastic")}C(".edit-switch-container .switch-control").on("mousedown",vBulletin.sitebuilder.toggleSitebuilder);C("#main-navbar .lnkAdminCP").removeClass("h-disabled");C("#main-navbar .sb-menu").removeClass("h-disabled").on("click",vBulletin.sitebuilder.menuClickProxy);C("select.custom-dropdown").selectBox();C(document).off("keypress",".js-button").on("keypress",".js-button",function(Q){if(Q.which==32||Q.which==13){if(Q.target&&Q.target.nodeName&&(Q.target.nodeName+"").toLowerCase()=="label"&&C(Q.target).find("input").length==1){C(Q.target).find("input").trigger("click")}else{C(this).trigger("click")}Q.preventDefault()}});C(document).off("keypress",".js-link").on("keypress",".js-link",function(Q){if(Q.which==13){C(this).trigger("click");Q.preventDefault()}});C(".js-debug-collapse-list").next("ol, ul").hide();C(document).off("click",".js-debug-collapse-list").on("click",".js-debug-collapse-list",function(Q){C(this).next("ol, ul").toggle()});C(document).off("click",".js-toggle-slider").on("click",".js-toggle-slider",function(){var T=C(this);if(T.is(".b-toggle-slider--yes")){T.removeClass("b-toggle-slider--yes").addClass("b-toggle-slider--no");T.find(".b-toggle-slider__radio--no").prop("checked",true);T.data("value","0")}else{T.removeClass("b-toggle-slider--no").addClass("b-toggle-slider--yes");T.find(".b-toggle-slider__radio--yes").prop("checked",true);T.data("value","1")}var S=C(".js-toggle-slider, .js-toggle-slider__dependent"),Q=S.index(T),R=false;S.each(function(U,V){if(U==Q){R=true}else{if(R==true){var W=C(this);if(W.is(".js-toggle-slider__dependent")){W.toggleClass("h-hide")}else{R=false;return false}}}});T.trigger("change",T.data("value"));return false});C(".js-select-box").selectBox();C(".mainmenu li:has(.submenu)").on("click",function(Q){C(".submenu",this).show();return false}).hover(function(){},function(Q){C(".submenu",this).hide()});C(".mainmenu.textControls li").on("click",function(Q){if(C(".tagCtrl",this).length==0){C("#tag-dialog").hide()}});C(".mainmenu .submenu li a").on("click",function(R){var Q=C(this).closest(".js-comp-menu-dropdown");if(Q.length){Q.removeClass("b-comp-menu-dropdown--open")}else{C(this).closest(".submenu").hide()}});C(".channel-content-widget .new-conversation-btn").off("click").on("click",function(){window.location.href=pageData.baseurl+"/new-content/"+pageData.channelid});C(".pagenav-form").submit(function(){if(Number(this.page.value)>0){location.href=this.action+"&p="+this.page.value}return false}).trigger("reset");C(".toolbar-pagenav").off("keydown",".toolbar-pagenav input").on("keydown",".toolbar-pagenav input",function(R){var Q=R.which;if(!R.shiftKey&&!R.altKey&&!R.ctrlKey&&((Q>=48&&Q<=57)||(Q>=96&&Q<=105)||Q==8||Q==9||Q==13||Q==35||Q==36||Q==37||Q==39||Q==46||Q==45)){return true}return false});C(document).off("click",".js-post__manage").on("click",".js-post__manage",function(){if(typeof vBulletin.inlinemod=="undefined"){var R=vBulletin.getAjaxBaseurl()+"/js/inlinemod.js?v="+pageData.simpleversion,Q=this;C.getScript(R,function(){vBulletin.inlinemod.manage_deleted_form.apply(Q)}).error(function(){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_loading_inlinemod_script"),iconType:"warning"})})}else{vBulletin.inlinemod.manage_deleted_form.apply(this)}});C(document).off("click",".js-post__show-hide").on("click",".js-post__show-hide",function(){var S=C(this),R=S.text(),Q=S.data("toggle-text");if(S.hasClass("js-post__show-hide--show")){S.closest(".js-post").addClass("b-post--show-deleted-content");S.html(Q).data("toggle-text",R).removeClass("js-post__show-hide--show")}else{S.closest(".js-post").removeClass("b-post--show-deleted-content");S.html(Q).data("toggle-text",R).addClass("js-post__show-hide--show")}});C(document).off("click","a.video-frame").on("click","a.video-frame",function(S){S.preventDefault();var R={code:this.getAttribute("data-vcode"),provider:this.getAttribute("data-vprovider")};if(this.getAttribute("data-height")){R.height=this.getAttribute("data-height")}if(this.getAttribute("data-width")){R.width=this.getAttribute("data-width")}var Q=C(this);C.post(vBulletin.getAjaxBaseurl()+"/ajax/render/bbcode_video",R,function(T){if(T){Q.replaceWith(T)}},"json")});vBulletin.markreadcheck();C(document).off("click","a.markchannelsread, a.navbar_mark_channels_read").on("click","a.markchannelsread, a.navbar_mark_channels_read",function(){vBulletin.markchannelsread(0,{success:function(){location.reload()},failed:function(){openAlertDialog({title:vBulletin.phrase.get("forum"),message:"Mark Channels Read failed: {0}".format(result),iconType:"error"})}},C(this));return false});C(".js-footer-go-to-top").off("click").on("click",function(Q){Q.preventDefault();C("body,html").animate({scrollTop:0},800)})}function K(){window.clearTimeout(M);if(pageData.securitytoken!="guest"){var M=window.setTimeout(K,3600000);C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/replace-securitytoken",data:{securitytoken:pageData.securitytoken},type:"POST",dataType:"json",success:function(O){if(O&&!O.error){var N=0;vBulletin.doReplaceSecurityToken(O.newtoken)}else{console.log("/ajax/replace-securitytoken, error: "+error);if(++N==3){vBulletin.doReplaceSecurityToken("guest")}}},error:function(P,O,N){console.log("/ajax/replace-securitytoken, error: "+N);if(++E==3){vBulletin.doReplaceSecurityToken("guest")}}})}}function H(){if(typeof (pageData.adminAction)!="undefined"){vBulletin.assertUserHasAdminPermission("canusesitebuilder",self,function(){},function(){window.location.reload()})}if(vBulletin.options.get("crontab")){if(pageData.nextcron<=pageData.current_server_datetime){vBulletin.loadingIndicator.suppressNextAjaxIndicator();C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/apidetach/cron/run",type:"POST",dataType:"json",success:function(M){if(M&&M.errors){console.warn("Cron error: "+vBulletin.phrase.get(M.errors[0][0]))}console.log("Cron run successfully.")},error:function(O,N,M){console.warn("Error when running cron: {0}".format(M))}})}else{}}}I();C("#searchPopupControl").on("click",function(M){if(C(this).hasClass("open")){C(this).removeClass("open");C("#searchPopupContent").hide()}else{C(this).addClass("open");C("#searchPopupContent").show()}});C("html").on("click",function(M){if(C(M.target).closest("#searchForm").size()==0&&C("#searchPopupControl").hasClass("open")){C("#searchPopupControl").removeClass("open");C("#searchPopupContent").hide()}});C("#btnAdvSearch").off("click").on("click",function(N){N.preventDefault();C(this).data("clicked2submit",1);var M=C("#searchForm");C('').appendTo(M);M.submit()});C("#searchForm").off("submit.searchform").on("submit.searchform",function(Q){var S={},O=C("#q");if(C.trim(O.val()).length>0){S.keywords=C.trim(O.val())}else{if(!C("#btnAdvSearch").data("clicked2submit")){openAlertDialog({title:vBulletin.phrase.get("search"),message:vBulletin.phrase.get("please_provide_search_string"),iconType:"warning",onAfterClose:function(){C("#searchForm #q").focus()}});Q.stopPropagation();return false}}var N=C(this).find("#searchPopupContent"),R=N.find(".searchFields_title_only");if(R.size()>0&&R.prop("checked")){S.title_only=1}var M=N.find(".searchFields_author");if(M.size()>0&&M.prop("checked")){S.author=[M.val()]}var P=N.find(".searchFields_channel");if(P.size()>0&&P.prop("checked")){S.channel=[P.val()]}N.find("input[name=searchJSON]").val(JSON.stringify(S));return true});C(".history-backbutton").off("click").on("click",function(M){history.back()});C(".popupControl[popup-body]").off("click").on("click",function(N){var O=C(this).attr("popup-body");if(!O){return false}var M=C(this).parent().find("."+O);if(!M){return false}C(M).toggleClass("h-hide")});var L;if(!(L=C.cookie(pageData.cookie_prefix+"np_notices_displayed"))){L=new Array()}if(!(L instanceof Array)){L=new Array(L)}C('ul.notices li[data-notice-persistent="0"]').each(function(M){L.push(C(this).attr("data-notice-id"))});if(L.length>0){C.cookie(pageData.cookie_prefix+"np_notices_displayed",L,{path:pageData.cookie_path,domain:pageData.cookie_domain})}else{C.cookie(pageData.cookie_prefix+"np_notices_displayed",null,{path:pageData.cookie_path,domain:pageData.cookie_domain})}C("ul.notices > li > .close").off("click").on("click",function(M){var O=C(this).closest("li"),N=O.attr("data-notice-id");C("body").css("cursor","wait");C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/notice/dismiss",data:{noticeid:N},type:"POST",dataType:"json",complete:function(){C("body").css("cursor","auto")},success:function(P){if(P&&!P.error){console.log("Notice dismissed successfully!");O.hide("slow",function(){if(C(this).parent().find(">li:visible").length==0){C(this).parent().addClass("h-hide")}})}},error:function(R,Q,P){console.log("Notice dismissed failed! error:"+P);openAlertDialog({title:"Error",message:"Error dismissing the notice.",iconType:"error"})}})});C("#frmActivateuser").ajaxForm({dataType:"json",beforeSubmit:function(P,O,N){var M="",Q="";if(C.trim(C(".username",O).val())==""){M=vBulletin.phrase.get("please_enter_a_username");Q=".username"}else{if(C.trim(C(".activateid",O).val())==""){M=vBulletin.phrase.get("requiredfieldmissing",vBulletin.phrase.get("activation_code"));Q=".activateid"}}if(M){openAlertDialog({title:vBulletin.phrase.get("error"),message:M,iconType:"warning",onAfterClose:function(){C(Q,O).focus()}});return false}return true},success:function(O,Q,R,N){if(O&&O.response&&O.response.errors){var S=[];for(var M in O.response.errors){if(O.response.errors[M][0]!="exception_trace"&&O.response.errors[M][0]!="errormsg"){S.push(vBulletin.phrase.get(O.response.errors[M]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:S.join("
                    "),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var P=O.response.msg_params;P.unshift(O.response.msg);openAlertDialog({title:vBulletin.phrase.get("activate_your_account"),message:vBulletin.phrase.get.apply(vBulletin.phrase,P),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});C("#frmActivateemail").ajaxForm({dataType:"json",beforeSubmit:function(P,O,N){var M="",Q="";if(C.trim(C(".email",O).val())==""){M=vBulletin.phrase.get("please_enter_your_email_address")}else{if(!isValidEmailAddress(C(".email",O).val())){M=vBulletin.phrase.get("invalid_email_address")}}if(M){openAlertDialog({title:vBulletin.phrase.get("error"),message:M,iconType:"warning",onAfterClose:function(){C(Q,O).focus()}});return false}return true},success:function(O,Q,R,N){if(O&&O.response&&O.response.errors){var S=[];for(var M in O.response.errors){if(O.response.errors[M][0]!="exception_trace"&&O.response.errors[M][0]!="errormsg"){S.push(vBulletin.phrase.get(O.response.errors[M]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:S.join("
                    "),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var P=O.response.msg_params;P.unshift(O.response.msg);openAlertDialog({title:vBulletin.phrase.get("email_activation_codes"),message:vBulletin.phrase.get.apply(vBulletin.phrase,P),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});var G=C.cookie(pageData.cookie_prefix+"userstyleid");if(G){C(".stylechooser").val(G)}C(".stylechooser").change(function(){var M=C("option:selected",C(this)).val(),N=new Date();N.setDate(N.getDate()+365);C.cookie(pageData.cookie_prefix+"userstyleid",M,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:N});window.location.reload()});var J=C.cookie(pageData.cookie_prefix+"languageid");if(J){C(".languagechooser").val(J)}C(".languagechooser").change(function(){var M=C("option:selected",C(this)).val(),N=new Date();N.setDate(N.getDate()+365);C.cookie(pageData.cookie_prefix+"languageid",M,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:N});window.location.reload()});C("a.navbar_profile").on("click",function(){if(pageData.userid=="0"){C("#lnkLoginSignupMenu").click();return false}});vBulletin.doReplaceSecurityToken(pageData.securitytoken);var F=window.setTimeout(K,3600000),E=0;setTimeout(H,5)},1);vBulletin.getQueryString=function(F){if(F==""){return{}}var E={};for(var G=0;G0){A=$("
                    ").text(B).html()}A=String(A).replace(/"/g,""");return A}function showPhotoDialog(A){$("#gallery_dialog"+A).dialog()}function displayPositionedPopup(E){if(E.dialog){E.dialog=$(E.dialog)}if(!E.dialog||E.dialog.size()==0){E.dialog=$("
                    ").html('

                    ').addClass("custom-dialog").css("z-index",1100).appendTo(document.body);if(E.className){E.dialog.addClass(E.className)}if(E.width){E.dialog.css("width",E.width)}if(typeof E.id=="string"){E.dialog.prop("id",E.id)}E.dialog.find(".btnClose").on("click",function(){E.dialog.fadeOut();return false})}if(E.content){if(typeof E.content=="string"){E.dialog.find(".content").html(E.content);if(typeof E.loaded=="function"){E.loaded(E)}E.dialog.show()}else{if(typeof E.content=="function"){E.dialog.find(".content").html('Loading...');E.dialog.show();window.setTimeout(function(){E.content(E)},1)}}}var A=$("#wrapper").offset(),D=$("#wrapper").outerWidth(),N=$(E.target).offset(),K=$(E.target).outerWidth(),I=$(E.target).outerHeight(),F=E.dialog.outerWidth(),M=E.dialog.find(".arrow"),H=M.outerWidth(),L=M.outerHeight(),C=F-M.position().left-H,B=N.left+(K/2)-F+C+(H/2)-2;if(B0){var B=C.filter("."+F);if(B.length==1){C=B}else{if((E=C.filter(".h-hide")).length==1){C=E}else{C=C.first().clone().removeClass().addClass("conversation-status-message notice").appendTo(".conversation-status-messages")}}C=(B.length==1?B:C).show();if(!vBulletin.isScrolledIntoView(C)){var D=C.offset().top-10;C.hide();$("html,body").animate({scrollTop:D},"slow",function(){C.find("span").html(A).end().addClass(F+" show-x").fadeIn("slow","linear")})}else{if(C.hasClass("h-hide")){C.hide().removeClass("h-hide").addClass(F+" show-x").find("span").html(A).end().fadeIn(800,"linear")}else{C.fadeOut("slow","linear",function(){C.find("span").html(A).end().addClass(F+" show-x").fadeIn("slow","linear")})}}}}window.vBulletin.htmlEntities=function(A){return String(A).replace(/&/g,"&").replace(//g,">").replace(/'"'/g,""")};window.vBulletin.htmlEntities_decode=function(A){return String(A).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};window.vBulletin.loadedIds=window.vBulletin.loadedIds||[];window.vBulletin.isAlreadyLoaded=function(A){if($.inArray(A,window.vBulletin.loadedIds)!=-1){return true}window.vBulletin.loadedIds.push(A)};; - -// *************************** -// js.compressed/jquery/history.js -// *************************** -/** - * History.js Core - * @author Benjamin Arthur Lupton - * @copyright 2010-2011 Benjamin Arthur Lupton - * @license New BSD License - * - * ============ NOTE: This version contains patch from https://github.com/christanto/history.js/commit/b78af84fc2b6b5da573e5ee0bd72f4213e36bb18 ============ - */ - -(function(window,undefined){ - "use strict"; - - // -------------------------------------------------------------------------- - // Initialise - - // Localise Globals - var - console = window.console||undefined, // Prevent a JSLint complain - document = window.document, // Make sure we are using the correct document - navigator = window.navigator, // Make sure we are using the correct navigator - amplify = window.amplify||false, // Amplify.js - setTimeout = window.setTimeout, - clearTimeout = window.clearTimeout, - setInterval = window.setInterval, - clearInterval = window.clearInterval, - JSON = window.JSON, - History = window.History = window.History||{}, // Public History Object - history = window.history; // Old History Object - - // MooTools Compatibility - JSON.stringify = JSON.stringify||JSON.encode; - JSON.parse = JSON.parse||JSON.decode; - - // Check Existence - if ( typeof History.init !== 'undefined' ) { - throw new Error('History.js Core has already been loaded...'); - } - - // Initialise History - History.init = function(){ - // Check Load Status of Adapter - if ( typeof History.Adapter === 'undefined' ) { - return false; - } - - // Check Load Status of Core - if ( typeof History.initCore !== 'undefined' ) { - History.initCore(); - } - - // Check Load Status of HTML4 Support - if ( typeof History.initHtml4 !== 'undefined' ) { - History.initHtml4(); - } - - // Return true - return true; - }; - - // -------------------------------------------------------------------------- - // Initialise Core - - // Initialise Core - History.initCore = function(){ - // Initialise - if ( typeof History.initCore.initialized !== 'undefined' ) { - // Already Loaded - return false; - } - else { - History.initCore.initialized = true; - } - - // ---------------------------------------------------------------------- - // Options - - /** - * History.options - * Configurable options - */ - History.options = History.options||{}; - - /** - * History.options.hashChangeInterval - * How long should the interval be before hashchange checks - */ - History.options.hashChangeInterval = History.options.hashChangeInterval || 100; - - /** - * History.options.safariPollInterval - * How long should the interval be before safari poll checks - */ - History.options.safariPollInterval = History.options.safariPollInterval || 500; - - /** - * History.options.doubleCheckInterval - * How long should the interval be before we perform a double check - */ - History.options.doubleCheckInterval = History.options.doubleCheckInterval || 500; - - /** - * History.options.storeInterval - * How long should we wait between store calls - */ - History.options.storeInterval = History.options.storeInterval || 1000; - - /** - * History.options.busyDelay - * How long should we wait between busy events - */ - History.options.busyDelay = History.options.busyDelay || 250; - - /** - * History.options.debug - * If true will enable debug messages to be logged - */ - History.options.debug = History.options.debug || false; - - /** - * History.options.initialTitle - * What is the title of the initial state - */ - History.options.initialTitle = History.options.initialTitle || document.title; - - /** - * History.options.transformHash - * If true will transform the HTML4 hash to HTML5 equivalence. Set to false if you want the hash to be just a plain string, no meaning whatsoever. - */ - History.options.transformHash = History.options.transformHash || true; - - // ---------------------------------------------------------------------- - // Interval record - - /** - * History.intervalList - * List of intervals set, to be cleared when document is unloaded. - */ - History.intervalList = []; - - /** - * History.clearAllIntervals - * Clears all setInterval instances. - */ - History.clearAllIntervals = function(){ - var i, il = History.intervalList; - if (typeof il !== "undefined" && il !== null) { - for (i = 0; i < il.length; i++) { - clearInterval(il[i]); - } - History.intervalList = null; - } - }; - History.Adapter.bind(window,"beforeunload",History.clearAllIntervals); - History.Adapter.bind(window,"unload",History.clearAllIntervals); - - - // ---------------------------------------------------------------------- - // Debug - - /** - * History.debug(message,...) - * Logs the passed arguments if debug enabled - */ - History.debug = function(){ - if ( (History.options.debug||false) ) { - History.log.apply(History,arguments); - } - }; - - /** - * History.log(message,...) - * Logs the passed arguments - */ - History.log = function(){ - // Prepare - var - consoleExists = !(typeof console === 'undefined' || typeof console.log === 'undefined' || typeof console.log.apply === 'undefined'), - textarea = document.getElementById('log'), - message, - i,n - ; - - // Write to Console - if ( consoleExists ) { - var args = Array.prototype.slice.call(arguments); - message = args.shift(); - if ( typeof console.debug !== 'undefined' ) { - console.debug.apply(console,[message,args]); - } - else { - console.log.apply(console,[message,args]); - } - } - else { - message = ("\n"+arguments[0]+"\n"); - } - - // Write to log - for ( i=1,n=arguments.length; i - * @author James Padolsey - */ - History.getInternetExplorerMajorVersion = function(){ - var result = History.getInternetExplorerMajorVersion.cached = - (typeof History.getInternetExplorerMajorVersion.cached !== 'undefined') - ? History.getInternetExplorerMajorVersion.cached - : (function(){ - var v = 3, - div = document.createElement('div'), - all = div.getElementsByTagName('i'); - while ( (div.innerHTML = '') && all[0] ) {} - return (v > 4) ? v : false; - })() - ; - return result; - }; - - /** - * History.isInternetExplorer() - * Are we using Internet Explorer? - * @return {boolean} - * @license Public Domain - * @author Benjamin Arthur Lupton - */ - History.isInternetExplorer = function(){ - var result = - History.isInternetExplorer.cached = - (typeof History.isInternetExplorer.cached !== 'undefined') - ? History.isInternetExplorer.cached - : Boolean(History.getInternetExplorerMajorVersion()) - ; - return result; - }; - - /** - * History.emulated - * Which features require emulating? - */ - History.emulated = { - pushState: !Boolean( - window.history && window.history.pushState && window.history.replaceState - && !( - (/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i).test(navigator.userAgent) /* disable for versions of iOS before version 4.3 (8F190) */ - || (/AppleWebKit\/5([0-2]|3[0-2])/i).test(navigator.userAgent) /* disable for the mercury iOS browser, or at least older versions of the webkit engine */ - ) - ), - hashChange: Boolean( - !(('onhashchange' in window) || ('onhashchange' in document)) - || - (History.isInternetExplorer() && History.getInternetExplorerMajorVersion() < 8) - ) - }; - - /** - * History.enabled - * Is History enabled? - */ - History.enabled = !History.emulated.pushState; - - /** - * History.bugs - * Which bugs are present - */ - History.bugs = { - /** - * Safari 5 and Safari iOS 4 fail to return to the correct state once a hash is replaced by a `replaceState` call - * https://bugs.webkit.org/show_bug.cgi?id=56249 - */ - setHash: Boolean(!History.emulated.pushState && navigator.vendor === 'Apple Computer, Inc.' && /AppleWebKit\/5([0-2]|3[0-3])/.test(navigator.userAgent)), - - /** - * Safari 5 and Safari iOS 4 sometimes fail to apply the state change under busy conditions - * https://bugs.webkit.org/show_bug.cgi?id=42940 - */ - safariPoll: Boolean(!History.emulated.pushState && navigator.vendor === 'Apple Computer, Inc.' && /AppleWebKit\/5([0-2]|3[0-3])/.test(navigator.userAgent)), - - /** - * MSIE 6 and 7 sometimes do not apply a hash even it was told to (requiring a second call to the apply function) - */ - ieDoubleCheck: Boolean(History.isInternetExplorer() && History.getInternetExplorerMajorVersion() < 8), - - /** - * MSIE 6 requires the entire hash to be encoded for the hashes to trigger the onHashChange event - */ - hashEscape: Boolean(History.isInternetExplorer() && History.getInternetExplorerMajorVersion() < 7) - }; - - /** - * History.isEmptyObject(obj) - * Checks to see if the Object is Empty - * @param {Object} obj - * @return {boolean} - */ - History.isEmptyObject = function(obj) { - for ( var name in obj ) { - return false; - } - return true; - }; - - /** - * History.cloneObject(obj) - * Clones a object - * @param {Object} obj - * @return {Object} - */ - History.cloneObject = function(obj) { - var hash,newObj; - if ( obj ) { - hash = JSON.stringify(obj); - newObj = JSON.parse(hash); - } - else { - newObj = {}; - } - return newObj; - }; - - // ---------------------------------------------------------------------- - // URL Helpers - - /** - * History.getRootUrl() - * Turns "http://mysite.com/dir/page.html?asd" into "http://mysite.com" - * @return {String} rootUrl - */ - History.getRootUrl = function(){ - // Create - var rootUrl = document.location.protocol+'//'+(document.location.hostname||document.location.host); - if ( document.location.port||false ) { - rootUrl += ':'+document.location.port; - } - rootUrl += '/'; - - // Return - return rootUrl; - }; - - /** - * History.getBaseHref() - * Fetches the `href` attribute of the `` element if it exists - * @return {String} baseHref - */ - History.getBaseHref = function(){ - // Create - var - baseElements = document.getElementsByTagName('base'), - baseElement = null, - baseHref = ''; - - // Test for Base Element - if ( baseElements.length === 1 ) { - // Prepare for Base Element - baseElement = baseElements[0]; - baseHref = baseElement.href.replace(/[^\/]+$/,''); - } - - // Adjust trailing slash - baseHref = baseHref.replace(/\/+$/,''); - if ( baseHref ) baseHref += '/'; - - // Return - return baseHref; - }; - - /** - * History.getBaseUrl() - * Fetches the baseHref or basePageUrl or rootUrl (whichever one exists first) - * @return {String} baseUrl - */ - History.getBaseUrl = function(){ - // Create - var baseUrl = History.getBaseHref()||History.getBasePageUrl()||History.getRootUrl(); - - // Return - return baseUrl; - }; - - /** - * History.getPageUrl() - * Fetches the URL of the current page - * @return {String} pageUrl - */ - History.getPageUrl = function(){ - // Fetch - var - State = History.getState(false,false), - stateUrl = (State||{}).url||document.location.href; - - // Create - var pageUrl = stateUrl.replace(/\/+$/,'').replace(/[^\/]+$/,function(part,index,string){ - return (/\./).test(part) ? part : part+'/'; - }); - - // Return - return pageUrl; - }; - - /** - * History.getBasePageUrl() - * Fetches the Url of the directory of the current page - * @return {String} basePageUrl - */ - History.getBasePageUrl = function(){ - // Create - var basePageUrl = document.location.href.replace(/[#\?].*/,'').replace(/[^\/]+$/,function(part,index,string){ - return (/[^\/]$/).test(part) ? '' : part; - }).replace(/\/+$/,'')+'/'; - - // Return - return basePageUrl; - }; - - /** - * History.getFullUrl(url) - * Ensures that we have an absolute URL and not a relative URL - * @param {string} url - * @param {Boolean} allowBaseHref - * @return {string} fullUrl - */ - History.getFullUrl = function(url,allowBaseHref){ - // Prepare - var fullUrl = url, firstChar = url.substring(0,1); - allowBaseHref = (typeof allowBaseHref === 'undefined') ? true : allowBaseHref; - - // Check - if ( /[a-z]+\:\/\//.test(url) ) { - // Full URL - } - else if ( firstChar === '/' ) { - // Root URL - fullUrl = History.getRootUrl()+url.replace(/^\/+/,''); - } - else if ( firstChar === '#' ) { - // Anchor URL - fullUrl = History.getPageUrl().replace(/#.*/,'')+url; - } - else if ( firstChar === '?' ) { - // Query URL - fullUrl = History.getPageUrl().replace(/[\?#].*/,'')+url; - } - else { - // Relative URL - if ( allowBaseHref ) { - fullUrl = History.getBaseUrl()+url.replace(/^(\.\/)+/,''); - } else { - fullUrl = History.getBasePageUrl()+url.replace(/^(\.\/)+/,''); - } - // We have an if condition above as we do not want hashes - // which are relative to the baseHref in our URLs - // as if the baseHref changes, then all our bookmarks - // would now point to different locations - // whereas the basePageUrl will always stay the same - } - - // Return - return fullUrl.replace(/\#$/,''); - }; - - /** - * History.getShortUrl(url) - * Ensures that we have a relative URL and not a absolute URL - * @param {string} url - * @return {string} url - */ - History.getShortUrl = function(url){ - // Prepare - var shortUrl = url, baseUrl = History.getBaseUrl(), rootUrl = History.getRootUrl(); - - // Trim baseUrl - if ( History.emulated.pushState ) { - // We are in a if statement as when pushState is not emulated - // The actual url these short urls are relative to can change - // So within the same session, we the url may end up somewhere different - shortUrl = shortUrl.replace(baseUrl,''); - } - - // Trim rootUrl - shortUrl = shortUrl.replace(rootUrl,'/'); - - // Ensure we can still detect it as a state - if ( History.isTraditionalAnchor(shortUrl) ) { - shortUrl = './'+shortUrl; - } - - // Clean It - shortUrl = shortUrl.replace(/^(\.\/)+/g,'./').replace(/\#$/,''); - - // Return - return shortUrl; - }; - - // ---------------------------------------------------------------------- - // State Storage - - /** - * History.store - * The store for all session specific data - */ - History.store = amplify ? (amplify.store('History.store')||{}) : {}; - History.store.idToState = History.store.idToState||{}; - History.store.urlToId = History.store.urlToId||{}; - History.store.stateToId = History.store.stateToId||{}; - - /** - * History.idToState - * 1-1: State ID to State Object - */ - History.idToState = History.idToState||{}; - - /** - * History.stateToId - * 1-1: State String to State ID - */ - History.stateToId = History.stateToId||{}; - - /** - * History.urlToId - * 1-1: State URL to State ID - */ - History.urlToId = History.urlToId||{}; - - /** - * History.storedStates - * Store the states in an array - */ - History.storedStates = History.storedStates||[]; - - /** - * History.savedStates - * Saved the states in an array - */ - History.savedStates = History.savedStates||[]; - - /** - * History.getState() - * Get an object containing the data, title and url of the current state - * @param {Boolean} friendly - * @param {Boolean} create - * @return {Object} State - */ - History.getState = function(friendly,create){ - // Prepare - if ( typeof friendly === 'undefined' ) { friendly = true; } - if ( typeof create === 'undefined' ) { create = true; } - - // Fetch - var State = History.getLastSavedState(); - - // Create - if ( !State && create ) { - State = History.createStateObject(); - } - - // Adjust - if ( friendly ) { - State = History.cloneObject(State); - State.url = State.cleanUrl||State.url; - } - - // Return - return State; - }; - - /** - * History.getIdByState(State) - * Gets a ID for a State - * @param {State} newState - * @return {String} id - */ - History.getIdByState = function(newState){ - - // Fetch ID - var id = History.extractId(newState.url); - if ( !id ) { - // Find ID via State String - var str = History.getStateString(newState); - if ( typeof History.stateToId[str] !== 'undefined' ) { - id = History.stateToId[str]; - } - else if ( typeof History.store.stateToId[str] !== 'undefined' ) { - id = History.store.stateToId[str]; - } - else { - // Generate a new ID - while ( true ) { - id = String(Math.floor(Math.random()*1000)); - if ( typeof History.idToState[id] === 'undefined' && typeof History.store.idToState[id] === 'undefined' ) { - break; - } - } - - // Apply the new State to the ID - History.stateToId[str] = id; - History.idToState[id] = newState; - } - } - - // Return ID - return id; - }; - - /** - * History.normalizeState(State) - * Expands a State Object - * @param {object} State - * @return {object} - */ - History.normalizeState = function(oldState){ - // Prepare - if ( !oldState || (typeof oldState !== 'object') ) { - oldState = {}; - } - - // Check - if ( typeof oldState.normalized !== 'undefined' ) { - return oldState; - } - - // Adjust - if ( !oldState.data || (typeof oldState.data !== 'object') ) { - oldState.data = {}; - } - - // ---------------------------------------------------------------------- - - // Create - var newState = {}; - newState.normalized = true; - newState.title = oldState.title||''; - newState.url = History.getFullUrl(History.unescapeString(oldState.url||document.location.href)); - newState.hash = History.getShortUrl(newState.url); - newState.data = History.cloneObject(oldState.data); - - // Fetch ID - newState.id = History.getIdByState(newState); - - // ---------------------------------------------------------------------- - - // Clean the URL - newState.cleanUrl = newState.url.replace(/\??\&_suid.*/,''); - newState.url = newState.cleanUrl; - - // Check to see if we have more than just a url - var dataNotEmpty = !History.isEmptyObject(newState.data); - - // Apply - if ( newState.title || dataNotEmpty ) { - // Add ID to Hash - newState.hash = History.getShortUrl(newState.url).replace(/\??\&_suid.*/,''); - if ( !/\?/.test(newState.hash) ) { - newState.hash += '?'; - } - newState.hash += '&_suid='+newState.id; - } - - // Create the Hashed URL - newState.hashedUrl = History.getFullUrl(newState.hash); - - // ---------------------------------------------------------------------- - - // Update the URL if we have a duplicate - if ( (History.emulated.pushState || History.bugs.safariPoll) && History.hasUrlDuplicate(newState) ) { - newState.url = newState.hashedUrl; - } - - // ---------------------------------------------------------------------- - - // Return - return newState; - }; - - /** - * History.createStateObject(data,title,url) - * Creates a object based on the data, title and url state params - * @param {object} data - * @param {string} title - * @param {string} url - * @return {object} - */ - History.createStateObject = function(data,title,url){ - // Hashify - var State = { - 'data': data, - 'title': title, - 'url': url - }; - - // Expand the State - State = History.normalizeState(State); - - // Return object - return State; - }; - - /** - * History.getStateById(id) - * Get a state by it's UID - * @param {String} id - */ - History.getStateById = function(id){ - // Prepare - id = String(id); - - // Retrieve - var State = History.idToState[id] || History.store.idToState[id] || undefined; - - // Return State - return State; - }; - - /** - * Get a State's String - * @param {State} passedState - */ - History.getStateString = function(passedState){ - // Prepare - var State = History.normalizeState(passedState); - - // Clean - var cleanedState = { - data: State.data, - title: passedState.title, - url: passedState.url - }; - - // Fetch - var str = JSON.stringify(cleanedState); - - // Return - return str; - }; - - /** - * Get a State's ID - * @param {State} passedState - * @return {String} id - */ - History.getStateId = function(passedState){ - // Prepare - var State = History.normalizeState(passedState); - - // Fetch - var id = State.id; - - // Return - return id; - }; - - /** - * History.getHashByState(State) - * Creates a Hash for the State Object - * @param {State} passedState - * @return {String} hash - */ - History.getHashByState = function(passedState){ - // Prepare - var hash, State = History.normalizeState(passedState); - - // Fetch - hash = State.hash; - - // Return - return hash; - }; - - /** - * History.extractId(url_or_hash) - * Get a State ID by it's URL or Hash - * @param {string} url_or_hash - * @return {string} id - */ - History.extractId = function ( url_or_hash ) { - // Prepare - var id; - - // Extract - var parts,url; - parts = /(.*)\&_suid=([0-9]+)$/.exec(url_or_hash); - url = parts ? (parts[1]||url_or_hash) : url_or_hash; - id = parts ? String(parts[2]||'') : ''; - - // Return - return id||false; - }; - - /** - * History.isTraditionalAnchor - * Checks to see if the url is a traditional anchor or not - * @param {String} url_or_hash - * @return {Boolean} - */ - History.isTraditionalAnchor = function(url_or_hash){ - // Check - var isTraditional = !(/[\/\?\.]/.test(url_or_hash)); - - // Return - return isTraditional; - }; - - /** - * History.extractState - * Get a State by it's URL or Hash - * @param {String} url_or_hash - * @return {State|null} - */ - History.extractState = function(url_or_hash,create){ - // Prepare - var State = null; - create = create||false; - - // Fetch SUID - var id = History.extractId(url_or_hash); - if ( id ) { - State = History.getStateById(id); - } - - // Fetch SUID returned no State - if ( !State ) { - // Fetch URL - var url = History.getFullUrl(url_or_hash); - - // Check URL - id = History.getIdByUrl(url)||false; - if ( id ) { - State = History.getStateById(id); - } - - // Create State - if ( !State && create && !History.isTraditionalAnchor(url_or_hash) ) { - State = History.createStateObject(null,null,url); - } - } - - // Return - return State; - }; - - /** - * History.getIdByUrl() - * Get a State ID by a State URL - */ - History.getIdByUrl = function(url){ - // Fetch - var id = History.urlToId[url] || History.store.urlToId[url] || undefined; - - // Return - return id; - }; - - /** - * History.getLastSavedState() - * Get an object containing the data, title and url of the current state - * @return {Object} State - */ - History.getLastSavedState = function(){ - return History.savedStates[History.savedStates.length-1]||undefined; - }; - - /** - * History.getLastStoredState() - * Get an object containing the data, title and url of the current state - * @return {Object} State - */ - History.getLastStoredState = function(){ - return History.storedStates[History.storedStates.length-1]||undefined; - }; - - /** - * History.hasUrlDuplicate - * Checks if a Url will have a url conflict - * @param {Object} newState - * @return {Boolean} hasDuplicate - */ - History.hasUrlDuplicate = function(newState) { - // Prepare - var hasDuplicate = false; - - // Fetch - var oldState = History.extractState(newState.url); - - // Check - hasDuplicate = oldState && oldState.id !== newState.id; - - // Return - return hasDuplicate; - }; - - /** - * History.storeState - * Store a State - * @param {Object} newState - * @return {Object} newState - */ - History.storeState = function(newState){ - // Store the State - History.urlToId[newState.url] = newState.id; - - // Push the State - History.storedStates.push(History.cloneObject(newState)); - - // Return newState - return newState; - }; - - /** - * History.isLastSavedState(newState) - * Tests to see if the state is the last state - * @param {Object} newState - * @return {boolean} isLast - */ - History.isLastSavedState = function(newState){ - // Prepare - var isLast = false; - - // Check - if ( History.savedStates.length ) { - var - newId = newState.id, - oldState = History.getLastSavedState(), - oldId = oldState.id; - - // Check - isLast = (newId === oldId); - } - - // Return - return isLast; - }; - - /** - * History.saveState - * Push a State - * @param {Object} newState - * @return {boolean} changed - */ - History.saveState = function(newState){ - // Check Hash - if ( History.isLastSavedState(newState) ) { - return false; - } - - // Push the State - History.savedStates.push(History.cloneObject(newState)); - - // Return true - return true; - }; - - /** - * History.getStateByIndex() - * Gets a state by the index - * @param {integer} index - * @return {Object} - */ - History.getStateByIndex = function(index){ - // Prepare - var State = null; - - // Handle - if ( typeof index === 'undefined' ) { - // Get the last inserted - State = History.savedStates[History.savedStates.length-1]; - } - else if ( index < 0 ) { - // Get from the end - State = History.savedStates[History.savedStates.length+index]; - } - else { - // Get from the beginning - State = History.savedStates[index]; - } - - // Return State - return State; - }; - - // ---------------------------------------------------------------------- - // Hash Helpers - - /** - * History.getHash() - * Gets the current document hash - * @return {string} - */ - History.getHash = function(){ - var hash = History.unescapeHash(document.location.hash); - return hash; - }; - - /** - * History.unescapeString() - * Unescape a string - * @param {String} str - * @return {string} - */ - History.unescapeString = function(str){ - // Prepare - var result = str; - - // Unescape hash - var tmp; - while ( true ) { - tmp = window.unescape(result); - if ( tmp === result ) { - break; - } - result = tmp; - } - - // Return result - return result; - }; - - /** - * History.unescapeHash() - * normalize and Unescape a Hash - * @param {String} hash - * @return {string} - */ - History.unescapeHash = function(hash){ - // Prepare - var result = History.normalizeHash(hash); - - // Unescape hash - result = History.unescapeString(result); - - // Return result - return result; - }; - - /** - * History.normalizeHash() - * normalize a hash across browsers - * @return {string} - */ - History.normalizeHash = function(hash){ - var result = hash.replace(/[^#]*#/,'').replace(/#.*/, ''); - - // Return result - return result; - }; - - /** - * History.setHash(hash) - * Sets the document hash - * @param {string} hash - * @return {History} - */ - History.setHash = function(hash,queue){ - // Handle Queueing - if ( queue !== false && History.busy() ) { - // Wait + Push to Queue - //History.debug('History.setHash: we must wait', arguments); - History.pushQueue({ - scope: History, - callback: History.setHash, - args: arguments, - queue: queue - }); - return false; - } - - // Log - //History.debug('History.setHash: called',hash); - - // Prepare - var adjustedHash = History.escapeHash(hash); - - // Make Busy + Continue - History.busy(true); - - // Check if hash is a state - var State = History.extractState(hash,true); - if ( State && !History.emulated.pushState ) { - // Hash is a state so skip the setHash - //History.debug('History.setHash: Hash is a state so skipping the hash set with a direct pushState call',arguments); - - // PushState - History.pushState(State.data,State.title,State.url,false); - } - else if ( document.location.hash !== adjustedHash ) { - // Hash is a proper hash, so apply it - - // Handle browser bugs - if ( History.bugs.setHash ) { - // Fix Safari Bug https://bugs.webkit.org/show_bug.cgi?id=56249 - - // Fetch the base page - var pageUrl = History.getPageUrl(); - - // Safari hash apply - History.pushState(null,null,pageUrl+'#'+adjustedHash,false); - } - else { - // Normal hash apply - document.location.hash = adjustedHash; - } - } - - // Chain - return History; - }; - - /** - * History.escape() - * normalize and Escape a Hash - * @return {string} - */ - History.escapeHash = function(hash){ - var result = History.normalizeHash(hash); - - // Escape hash - result = window.escape(result); - - // IE6 Escape Bug - if ( !History.bugs.hashEscape ) { - // Restore common parts - result = result - .replace(/\%21/g,'!') - .replace(/\%26/g,'&') - .replace(/\%3D/g,'=') - .replace(/\%3F/g,'?'); - } - - // Return result - return result; - }; - - /** - * History.getHashByUrl(url) - * Extracts the Hash from a URL - * @param {string} url - * @return {string} url - */ - History.getHashByUrl = function(url){ - // Extract the hash - var hash = String(url) - .replace(/([^#]*)#?([^#]*)#?(.*)/, '$2') - ; - - // Unescape hash - hash = History.unescapeHash(hash); - - // Return hash - return hash; - }; - - /** - * History.setTitle(title) - * Applies the title to the document - * @param {State} newState - * @return {Boolean} - */ - History.setTitle = function(newState){ - // Prepare - var title = newState.title; - - // Initial - if ( !title ) { - var firstState = History.getStateByIndex(0); - if ( firstState && firstState.url === newState.url ) { - title = firstState.title||History.options.initialTitle; - } - } - - // Apply - try { - document.getElementsByTagName('title')[0].innerHTML = title.replace('<','<').replace('>','>').replace(' & ',' & '); - } - catch ( Exception ) { } - document.title = title; - - // Chain - return History; - }; - - // ---------------------------------------------------------------------- - // Queueing - - /** - * History.queues - * The list of queues to use - * First In, First Out - */ - History.queues = []; - - /** - * History.busy(value) - * @param {boolean} value [optional] - * @return {boolean} busy - */ - History.busy = function(value){ - // Apply - if ( typeof value !== 'undefined' ) { - //History.debug('History.busy: changing ['+(History.busy.flag||false)+'] to ['+(value||false)+']', History.queues.length); - History.busy.flag = value; - } - // Default - else if ( typeof History.busy.flag === 'undefined' ) { - History.busy.flag = false; - } - - // Queue - if ( !History.busy.flag ) { - // Execute the next item in the queue - clearTimeout(History.busy.timeout); - var fireNext = function(){ - if ( History.busy.flag ) return; - for ( var i=History.queues.length-1; i >= 0; --i ) { - var queue = History.queues[i]; - if ( queue.length === 0 ) continue; - var item = queue.shift(); - History.fireQueueItem(item); - History.busy.timeout = setTimeout(fireNext,History.options.busyDelay); - } - }; - History.busy.timeout = setTimeout(fireNext,History.options.busyDelay); - } - - // Return - return History.busy.flag; - }; - - /** - * History.fireQueueItem(item) - * Fire a Queue Item - * @param {Object} item - * @return {Mixed} result - */ - History.fireQueueItem = function(item){ - return item.callback.apply(item.scope||History,item.args||[]); - }; - - /** - * History.pushQueue(callback,args) - * Add an item to the queue - * @param {Object} item [scope,callback,args,queue] - */ - History.pushQueue = function(item){ - // Prepare the queue - History.queues[item.queue||0] = History.queues[item.queue||0]||[]; - - // Add to the queue - History.queues[item.queue||0].push(item); - - // Chain - return History; - }; - - /** - * History.queue (item,queue), (func,queue), (func), (item) - * Either firs the item now if not busy, or adds it to the queue - */ - History.queue = function(item,queue){ - // Prepare - if ( typeof item === 'function' ) { - item = { - callback: item - }; - } - if ( typeof queue !== 'undefined' ) { - item.queue = queue; - } - - // Handle - if ( History.busy() ) { - History.pushQueue(item); - } else { - History.fireQueueItem(item); - } - - // Chain - return History; - }; - - /** - * History.clearQueue() - * Clears the Queue - */ - History.clearQueue = function(){ - History.busy.flag = false; - History.queues = []; - return History; - }; - - - // ---------------------------------------------------------------------- - // IE Bug Fix - - /** - * History.stateChanged - * States whether or not the state has changed since the last double check was initialised - */ - History.stateChanged = false; - - /** - * History.doubleChecker - * Contains the timeout used for the double checks - */ - History.doubleChecker = false; - - /** - * History.doubleCheckComplete() - * Complete a double check - * @return {History} - */ - History.doubleCheckComplete = function(){ - // Update - History.stateChanged = true; - - // Clear - History.doubleCheckClear(); - - // Chain - return History; - }; - - /** - * History.doubleCheckClear() - * Clear a double check - * @return {History} - */ - History.doubleCheckClear = function(){ - // Clear - if ( History.doubleChecker ) { - clearTimeout(History.doubleChecker); - History.doubleChecker = false; - } - - // Chain - return History; - }; - - /** - * History.doubleCheck() - * Create a double check - * @return {History} - */ - History.doubleCheck = function(tryAgain){ - // Reset - History.stateChanged = false; - History.doubleCheckClear(); - - // Fix IE6,IE7 bug where calling history.back or history.forward does not actually change the hash (whereas doing it manually does) - // Fix Safari 5 bug where sometimes the state does not change: https://bugs.webkit.org/show_bug.cgi?id=42940 - if ( History.bugs.ieDoubleCheck ) { - // Apply Check - History.doubleChecker = setTimeout( - function(){ - History.doubleCheckClear(); - if ( !History.stateChanged ) { - //History.debug('History.doubleCheck: State has not yet changed, trying again', arguments); - // Re-Attempt - tryAgain(); - } - return true; - }, - History.options.doubleCheckInterval - ); - } - - // Chain - return History; - }; - - // ---------------------------------------------------------------------- - // Safari Bug Fix - - /** - * History.safariStatePoll() - * Poll the current state - * @return {History} - */ - History.safariStatePoll = function(){ - // Poll the URL - - // Get the Last State which has the new URL - var - urlState = History.extractState(document.location.href), - newState; - - // Check for a difference - if ( !History.isLastSavedState(urlState) ) { - newState = urlState; - } - else { - return; - } - - // Check if we have a state with that url - // If not create it - if ( !newState ) { - //History.debug('History.safariStatePoll: new'); - newState = History.createStateObject(); - } - - // Apply the New State - //History.debug('History.safariStatePoll: trigger'); - History.Adapter.trigger(window,'popstate'); - - // Chain - return History; - }; - - // ---------------------------------------------------------------------- - // State Aliases - - /** - * History.back(queue) - * Send the browser history back one item - * @param {Integer} queue [optional] - */ - History.back = function(queue){ - //History.debug('History.back: called', arguments); - - // Handle Queueing - if ( queue !== false && History.busy() ) { - // Wait + Push to Queue - //History.debug('History.back: we must wait', arguments); - History.pushQueue({ - scope: History, - callback: History.back, - args: arguments, - queue: queue - }); - return false; - } - - // Make Busy + Continue - History.busy(true); - - // Fix certain browser bugs that prevent the state from changing - History.doubleCheck(function(){ - History.back(false); - }); - - // Go back - history.go(-1); - - // End back closure - return true; - }; - - /** - * History.forward(queue) - * Send the browser history forward one item - * @param {Integer} queue [optional] - */ - History.forward = function(queue){ - //History.debug('History.forward: called', arguments); - - // Handle Queueing - if ( queue !== false && History.busy() ) { - // Wait + Push to Queue - //History.debug('History.forward: we must wait', arguments); - History.pushQueue({ - scope: History, - callback: History.forward, - args: arguments, - queue: queue - }); - return false; - } - - // Make Busy + Continue - History.busy(true); - - // Fix certain browser bugs that prevent the state from changing - History.doubleCheck(function(){ - History.forward(false); - }); - - // Go forward - history.go(1); - - // End forward closure - return true; - }; - - /** - * History.go(index,queue) - * Send the browser history back or forward index times - * @param {Integer} queue [optional] - */ - History.go = function(index,queue){ - //History.debug('History.go: called', arguments); - - // Prepare - var i; - - // Handle - if ( index > 0 ) { - // Forward - for ( i=1; i<=index; ++i ) { - History.forward(queue); - } - } - else if ( index < 0 ) { - // Backward - for ( i=-1; i>=index; --i ) { - History.back(queue); - } - } - else { - throw new Error('History.go: History.go requires a positive or negative integer passed.'); - } - - // Chain - return History; - }; - - - // ---------------------------------------------------------------------- - // Initialise - - /** - * Create the initial State - */ - History.saveState(History.storeState(History.extractState(document.location.href,true))); - - /** - * Bind for Saving Store - */ - if ( amplify ) { - History.onUnload = function(){ - // Prepare - var - currentStore = amplify.store('History.store')||{}, - item; - - // Ensure - currentStore.idToState = currentStore.idToState || {}; - currentStore.urlToId = currentStore.urlToId || {}; - currentStore.stateToId = currentStore.stateToId || {}; - - // Sync - for ( item in History.idToState ) { - if ( !History.idToState.hasOwnProperty(item) ) { - continue; - } - currentStore.idToState[item] = History.idToState[item]; - } - for ( item in History.urlToId ) { - if ( !History.urlToId.hasOwnProperty(item) ) { - continue; - } - currentStore.urlToId[item] = History.urlToId[item]; - } - for ( item in History.stateToId ) { - if ( !History.stateToId.hasOwnProperty(item) ) { - continue; - } - currentStore.stateToId[item] = History.stateToId[item]; - } - - // Update - History.store = currentStore; - - // Store - amplify.store('History.store',currentStore); - }; - // For Internet Explorer - History.intervalList.push(setInterval(History.onUnload,History.options.storeInterval)); - // For Other Browsers - History.Adapter.bind(window,'beforeunload',History.onUnload); - History.Adapter.bind(window,'unload',History.onUnload); - // Both are enabled for consistency - } - - - // ---------------------------------------------------------------------- - // HTML5 State Support - - if ( History.emulated.pushState ) { - /* - * Provide Skeleton for HTML4 Browsers - */ - - // Prepare - var emptyFunction = function(){}; - History.pushState = History.pushState||emptyFunction; - History.replaceState = History.replaceState||emptyFunction; - } - else { - /* - * Use native HTML5 History API Implementation - */ - - /** - * History.onPopState(event,extra) - * Refresh the Current State - */ - History.onPopState = function(event){ - // Reset the double check - History.doubleCheckComplete(); - - // Check for a Hash, and handle apporiatly - var currentHash = History.getHash(); - if ( currentHash ) { - // Expand Hash - var currentState = History.extractState(currentHash||document.location.href,true); - if ( History.options.transformHash && currentState ) { - // We were able to parse it, it must be a State! - // Let's forward to replaceState - //History.debug('History.onPopState: state anchor', currentHash, currentState); - History.replaceState(currentState.data, currentState.title, currentState.url, false); - } - else { - // Traditional Anchor - //History.debug('History.onPopState: traditional anchor', currentHash); - History.Adapter.trigger(window,'anchorchange'); - History.busy(false); - } - - // We don't care for hashes - History.expectedStateId = false; - return false; - } - - // Prepare - var newState = false; - - // Prepare - event = event||{}; - if ( typeof event.state === 'undefined' ) { - // jQuery - if ( typeof event.originalEvent !== 'undefined' && typeof event.originalEvent.state !== 'undefined' ) { - event.state = event.originalEvent.state||false; - } - // MooTools - else if ( typeof event.event !== 'undefined' && typeof event.event.state !== 'undefined' ) { - event.state = event.event.state||false; - } - } - - // Ensure - event.state = (event.state||false); - - // Fetch State - if ( event.state ) { - // Vanilla: Back/forward button was used - newState = History.getStateById(event.state); - } - else if ( History.expectedStateId ) { - // Vanilla: A new state was pushed, and popstate was called manually - newState = History.getStateById(History.expectedStateId); - } - else { - // Initial State - newState = History.extractState(document.location.href); - } - - // The State did not exist in our store - if ( !newState ) { - // Regenerate the State - newState = History.createStateObject(null,null,document.location.href); - } - - // Clean - History.expectedStateId = false; - - // Check if we are the same state - if ( History.isLastSavedState(newState) ) { - // There has been no change (just the page's hash has finally propagated) - //History.debug('History.onPopState: no change', newState, History.savedStates); - History.busy(false); - return false; - } - - // Store the State - History.storeState(newState); - History.saveState(newState); - - // Force update of the title - History.setTitle(newState); - - // Fire Our Event - History.Adapter.trigger(window,'statechange'); - History.busy(false); - - // Return true - return true; - }; - History.Adapter.bind(window,'popstate',History.onPopState); - - /** - * History.pushState(data,title,url) - * Add a new State to the history object, become it, and trigger onpopstate - * We have to trigger for HTML4 compatibility - * @param {object} data - * @param {string} title - * @param {string} url - * @return {true} - */ - History.pushState = function(data,title,url,queue){ - //History.debug('History.pushState: called', arguments); - - // Check the State - if ( History.getHashByUrl(url) && History.emulated.pushState ) { - throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).'); - } - - // Handle Queueing - if ( queue !== false && History.busy() ) { - // Wait + Push to Queue - //History.debug('History.pushState: we must wait', arguments); - History.pushQueue({ - scope: History, - callback: History.pushState, - args: arguments, - queue: queue - }); - return false; - } - - // Make Busy + Continue - History.busy(true); - - // Create the newState - var newState = History.createStateObject(data,title,url); - - // Check it - if ( History.isLastSavedState(newState) ) { - // Won't be a change - History.busy(false); - } - else { - // Store the newState - History.storeState(newState); - History.expectedStateId = newState.id; - - // Push the newState - history.pushState(newState.id,newState.title,newState.url); - - // Fire HTML5 Event - History.Adapter.trigger(window,'popstate'); - } - - // End pushState closure - return true; - }; - - /** - * History.replaceState(data,title,url) - * Replace the State and trigger onpopstate - * We have to trigger for HTML4 compatibility - * @param {object} data - * @param {string} title - * @param {string} url - * @return {true} - */ - History.replaceState = function(data,title,url,queue){ - //History.debug('History.replaceState: called', arguments); - - // Check the State - if ( History.getHashByUrl(url) && History.emulated.pushState ) { - throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).'); - } - - // Handle Queueing - if ( queue !== false && History.busy() ) { - // Wait + Push to Queue - //History.debug('History.replaceState: we must wait', arguments); - History.pushQueue({ - scope: History, - callback: History.replaceState, - args: arguments, - queue: queue - }); - return false; - } - - // Make Busy + Continue - History.busy(true); - - // Create the newState - var newState = History.createStateObject(data,title,url); - - // Check it - if ( History.isLastSavedState(newState) ) { - // Won't be a change - History.busy(false); - } - else { - // Store the newState - History.storeState(newState); - History.expectedStateId = newState.id; - - // Push the newState - history.replaceState(newState.id,newState.title,newState.url); - - // Fire HTML5 Event - History.Adapter.trigger(window,'popstate'); - } - - // End replaceState closure - return true; - }; - - // Be aware, the following is only for native pushState implementations - // If you are wanting to include something for all browsers - // Then include it above this if block - - /** - * Setup Safari Fix - */ - if ( History.bugs.safariPoll ) { - History.intervalList.push(setInterval(History.safariStatePoll, History.options.safariPollInterval)); - } - - /** - * Ensure Cross Browser Compatibility - */ - if ( navigator.vendor === 'Apple Computer, Inc.' || (navigator.appCodeName||'') === 'Mozilla' ) { - /** - * Fix Safari HashChange Issue - */ - - // Setup Alias - History.Adapter.bind(window,'hashchange',function(){ - History.Adapter.trigger(window,'popstate'); - }); - - // Initialise Alias - if ( History.getHash() ) { - History.Adapter.onDomLoad(function(){ - History.Adapter.trigger(window,'hashchange'); - }); - } - } - - } // !History.emulated.pushState - - }; // History.initCore - - // Try and Initialise History - History.init(); - -})(window); -; - -// *************************** -// js.compressed/jquery/history.adapter.jquery.js -// *************************** -/** - * History.js jQuery Adapter - * @author Benjamin Arthur Lupton - * @copyright 2010-2011 Benjamin Arthur Lupton - * @license New BSD License - */ - -// Closure -(function(window,undefined){ - // Localise Globals - var - History = window.History = window.History||{}, - jQuery = window.jQuery; - - // Check Existence - if ( typeof History.Adapter !== 'undefined' ) { - throw new Error('History.js Adapter has already been loaded...'); - } - - // Add the Adapter - History.Adapter = { - /** - * History.Adapter.bind(el,event,callback) - * @param {Element|Selector} el - * @param {String} event - custom and standard events - * @param {Function} callback - * @return - */ - bind: function(el,event,callback){ - jQuery(el).bind(event,callback); - }, - - /** - * History.Adapter.trigger(el,event) - * @param {Element|Selector} el - * @param {String} event - custom and standard events - * @return - */ - trigger: function(el,event){ - jQuery(el).trigger(event); - }, - - /** - * History.Adapter.trigger(el,event,data) - * @param {Function} callback - * @return - */ - onDomLoad: function(callback) { - jQuery(callback); - } - }; - - // Try and Initialise History - if ( typeof History.init !== 'undefined' ) { - History.init(); - } - -})(window); -; - -// *************************** -// js.compressed/jquery/jquery.placeholder.min.js -// *************************** -/* -* Placeholder plugin for jQuery -* --- -* Copyright 2010, Daniel Stocks (http://webcloud.se) -* Released under the MIT, BSD, and GPL Licenses. -*/ - -(function(e){function t(t){this.input=t;if(t.attr("type")=="password"){this.handlePassword()}e(t[0].form).submit(function(){if(t.hasClass("placeholder")&&t[0].value==t.attr("placeholder")){t[0].value=""}})}t.prototype={show:function(e){if(this.input[0].value===""||e&&this.valueIsPlaceholder()){if(this.isPassword){try{this.input[0].setAttribute("type","text")}catch(t){this.input.before(this.fakePassword.show()).hide()}}this.input.addClass("placeholder");this.input[0].value=this.input.attr("placeholder")}},hide:function(){if(this.valueIsPlaceholder()&&this.input.hasClass("placeholder")){this.input.removeClass("placeholder");this.input[0].value="";if(this.isPassword){try{this.input[0].setAttribute("type","password")}catch(e){}this.input.show();this.input[0].focus()}}},valueIsPlaceholder:function(){return this.input[0].value==this.input.attr("placeholder")},handlePassword:function(){var t=this.input;t.attr("realType","password");this.isPassword=true;if(e.browser.msie&&t[0].outerHTML){var n=e(t[0].outerHTML.replace(/type=(['"])?password\1/gi,"type=$1text$1"));this.fakePassword=n.val(t.attr("placeholder")).addClass("placeholder").focus(function(){t.trigger("focus");e(this).hide()});e(t[0].form).submit(function(){n.remove();t.show()})}}};var n=!!("placeholder"in document.createElement("input"));e.fn.placeholder=function(){return n?this:this.each(function(){var n=e(this);var r=new t(n);r.show(true);n.focus(function(){r.hide()});n.blur(function(){r.show(false)});if(e.browser.msie){e(window).load(function(){if(n.val()){n.removeClass("placeholder")}r.show(true)});n.focus(function(){if(this.value==""){var e=this.createTextRange();e.collapse(true);e.moveStart("character",0);e.select()}})}})};if(!n){var r=e.fn.val;e.fn.val=function(n){if(n==null){var i=e(this);if(i.hasClass("placeholder")){var s=i.attr("placeholder"),o=i.attr("value");if(s&&s==o){var u=new t(i);u.hide();var a=r.call(this);u.show(true);return a}}return r.call(this)}else{return r.call(this,n)}}}})(jQuery); - -// *************************** -// js.compressed/jquery/jquery.jcarousel.custom.min.js -// *************************** -/*! - * jCarousel - Riding carousels with jQuery - * http://sorgalla.com/jcarousel/ - * - * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) - * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) - * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. - * - * Built on top of the jQuery library - * http://jquery.com - * - * Inspired by the "Carousel Component" by Bill Scott - * http://billwscott.com/carousel/ - * - * Modified for vBulletin: - * - added destroy method - * - changed reset method by adding a flag to call setup method - * - added check for undefined instance in the main jcarousel function - */ -(function(c){var d={vertical:false,rtl:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"
                    ",buttonPrevHTML:"
                    ",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},b=false;c(window).bind("load.jcarousel",function(){b=true});c.jcarousel=function(l,g){this.options=c.extend({},d,g||{});this.locked=false;this.autoStopped=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.buttonNextState=null;this.buttonPrevState=null;if(!g||g.rtl===undefined){this.options.rtl=(c(l).attr("dir")||c("html").attr("dir")||"").toLowerCase()=="rtl"}this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?(this.options.rtl?"right":"left"):"top";var q="",n=l.className.split(" ");for(var k=0;k
                    ").parent()}if(this.container.size()===0){this.container=this.clip.wrap("
                    ").parent()}if(q!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1){this.container.wrap('
                    ')}this.buttonPrev=c(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null){this.buttonPrev=c(this.options.buttonPrevHTML).appendTo(this.container)}this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext=c(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null){this.buttonNext=c(this.options.buttonNextHTML).appendTo(this.container)}this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css((this.options.rtl?"right":"left"),0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});if(!this.options.vertical&&this.options.rtl){this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl")}var m=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;var p=this.list.children("li");var r=this;if(p.size()>0){var f=0,h=this.options.offset;p.each(function(){r.format(this,h++);f+=r.dimension(this,m)});this.list.css(this.wh,(f+100)+"px");if(!g||g.size===undefined){this.options.size=p.size()}}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){r.next()};this.funcPrev=function(){r.prev()};this.funcResize=function(){if(r.resizeTimer){clearTimeout(r.resizeTimer)}r.resizeTimer=setTimeout(function(){r.reload()},100)};if(this.options.initCallback!==null){this.options.initCallback(this,"init")}if(!b&&c.browser.safari){this.buttons(false,false);c(window).bind("load.jcarousel",function(){r.setup()})}else{this.setup()}};var a=c.jcarousel;a.fn=a.prototype={jcarousel:"0.2.8"};a.fn.extend=a.extend=c.extend;a.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.resizeTimer=null;this.tail=null;this.inTail=false;if(this.locked){return}this.list.css(this.lt,this.pos(this.options.offset)+"px");var e=this.pos(this.options.start,true);this.prevFirst=this.prevLast=null;this.animate(e,false);c(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize);if(this.options.setupCallback!==null){this.options.setupCallback(this)}},reset:function(e){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");if(this.options.initCallback!==null){this.options.initCallback(this,"reset")}if(e){this.setup()}},reload:function(){if(this.tail!==null&&this.inTail){this.list.css(this.lt,a.intval(this.list.css(this.lt))+this.tail)}this.tail=null;this.inTail=false;if(this.options.reloadCallback!==null){this.options.reloadCallback(this)}if(this.options.visible!==null){var g=this;var h=Math.ceil(this.clipping()/this.options.visible),f=0,e=0;this.list.children("li").each(function(j){f+=g.dimension(this,h);if(j+1this.options.size){h=this.options.size}for(var f=g;f<=h;f++){var k=this.get(f);if(!k.length||k.hasClass("jcarousel-item-placeholder")){return false}}return true},get:function(e){return c(">.jcarousel-item-"+e,this.list)},add:function(l,q){var m=this.get(l),h=0,g=c(q);if(m.length===0){var p,k=a.intval(l);m=this.create(l);while(true){p=this.get(--k);if(k<=0||p.length){if(k<=0){this.list.prepend(m)}else{p.after(m)}break}}}else{h=this.dimension(m)}if(g.get(0).nodeName.toUpperCase()=="LI"){m.replaceWith(g);m=g}else{m.empty().append(q)}this.format(m.removeClass(this.className("jcarousel-item-placeholder")),l);var o=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;var f=this.dimension(m,o)-h;if(l>0&&l=this.first&&f<=this.last)){return}var h=this.dimension(g);if(fthis.options.size?this.options.size:C)}var z=this.first>C;var E=this.options.wrap!="circular"&&this.first<=1?1:this.first;var H=z?this.get(E):this.get(this.last);var B=z?E:E-1;var F=null,A=0,w=false,G=0,D;while(z?--B>=C:++Bthis.options.size)){D=this.get(this.index(B));if(D.length){F=this.add(B,D.clone(true))}}}H=F;G=this.dimension(F);if(w){A+=G}if(this.first!==null&&(this.options.wrap=="circular"||(B>=1&&(this.options.size===null||B<=this.options.size)))){n=z?n+G:n-G}}var s=this.clipping(),u=[],h=0,t=0;H=this.get(C-1);B=C;while(++h){F=this.get(B);w=!F.length;if(F.length===0){F=this.create(B).addClass(this.className("jcarousel-item-placeholder"));if(H.length===0){this.list.prepend(F)}else{H[z?"before":"after"](F)}if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(B<=0||B>this.options.size)){D=this.get(this.index(B));if(D.length){F=this.add(B,D.clone(true))}}}H=F;G=this.dimension(F);if(G===0){throw new Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...")}if(this.options.wrap!="circular"&&this.options.size!==null&&B>this.options.size){u.push(F)}else{if(w){A+=G}}t+=G;if(t>=s){break}B++}for(var r=0;r0){this.list.css(this.wh,this.dimension(this.list)+A+"px");if(z){n-=A;this.list.css(this.lt,a.intval(this.list.css(this.lt))-A+"px")}}var q=C+h-1;if(this.options.wrap!="circular"&&this.options.size&&q>this.options.size){q=this.options.size}if(B>q){h=0;B=q;t=0;while(++h){F=this.get(B--);if(!F.length){break}t+=this.dimension(F);if(t>=s){break}}}var o=q-h+1;if(this.options.wrap!="circular"&&o<1){o=1}if(this.inTail&&z){n+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&q==this.options.size&&(q-h+1)>=1){var y=a.intval(this.get(q).css(!this.options.vertical?"marginRight":"marginBottom"));if((t-y)>s){this.tail=t-s-y}}if(k&&C===this.options.size&&this.tail){n-=this.tail;this.inTail=true}while(C-->o){n+=this.dimension(this.get(C))}this.prevFirst=this.first;this.prevLast=this.last;this.first=o;this.last=q;return n},animate:function(i,e){if(this.locked||this.animating){return}this.animating=true;var f=this;var g=function(){f.animating=false;if(i===0){f.list.css(f.lt,0)}if(!f.autoStopped&&(f.options.wrap=="circular"||f.options.wrap=="both"||f.options.wrap=="last"||f.options.size===null||f.last=f.first&&k<=f.last)&&(k<1||k>f.options.size)){f.remove(k)}}}};this.notify("onBeforeAnimation");if(!this.options.animation||e===false){this.list.css(this.lt,i+"px");g()}else{var j=!this.options.vertical?(this.options.rtl?{right:i}:{left:i}):{top:i};var h={duration:this.options.animation,easing:this.options.easing,complete:g};if(c.isFunction(this.options.animationStepCallback)){h.step=this.options.animationStepCallback}this.list.animate(j,h)}},startAuto:function(f){if(f!==undefined){this.options.auto=f}if(this.options.auto===0){return this.stopAuto()}if(this.timer!==null){return}this.autoStopped=false;var e=this;this.timer=window.setTimeout(function(){e.next()},this.options.auto*1000)},stopAuto:function(){this.pauseAuto();this.autoStopped=true},pauseAuto:function(){if(this.timer===null){return}window.clearTimeout(this.timer);this.timer=null},buttons:function(g,f){if(g==null){g=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="first")||this.options.size===null||this.last=this.options.size){g=this.tail!==null&&!this.inTail}}if(f==null){f=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="last")||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1){f=this.tail!==null&&this.inTail}}var e=this;if(this.buttonNext.size()>0){this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext);if(g){this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext)}this.buttonNext[g?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",g?false:true);if(this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=g){this.buttonNext.each(function(){e.options.buttonNextCallback(e,this,g)}).data("jcarouselstate",g)}}else{if(this.options.buttonNextCallback!==null&&this.buttonNextState!=g){this.options.buttonNextCallback(e,null,g)}}if(this.buttonPrev.size()>0){this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);if(f){this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev)}this.buttonPrev[f?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",f?false:true);if(this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=f){this.buttonPrev.each(function(){e.options.buttonPrevCallback(e,this,f)}).data("jcarouselstate",f)}}else{if(this.options.buttonPrevCallback!==null&&this.buttonPrevState!=f){this.options.buttonPrevCallback(e,null,f)}}this.buttonNextState=g;this.buttonPrevState=f},notify:function(e){var f=this.prevFirst===null?"init":(this.prevFirst=g&&l<=f)){p(l)}}}}},create:function(e){return this.format("
                  6. ",e)},destroy:function(){this.reset();c(window).unbind(".jcarousel");this.list.removeData("jcarousel");this.container.removeData("jcarousel");this.buttonNext.removeData("jcarouselstate").remove();this.buttonPrev.removeData("jcarouselstate").remove();return this},format:function(k,h){k=c(k);var g=k.get(0).className.split(" ");for(var f=0;f1&&C(H).length==0&&C(".conversation-content-widget").length){var J=vBulletin.parseUrl(location.href),G=[J.pathname,J.search,(J.search?"&":"?"),"p=",K[1],K[0]];location.replace(G.join(""))}else{setTimeout(function(){history.back()},0);I=vBulletin.scrollToAnchor(H);if(I){window.scrollTo(0,0)}}}})}C(window).data("hashchange.history",true)}return this}})(jQuery);; - -// *************************** -// js.compressed/autocomplete.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,[]);var vBulletin_Autocomplete=function(V,c){var B=$(V),a=c.apiClass||null,L=c.apiFunction||"getAutocomplete",e=c.delay||500,d=c.minLength||3,Z=c.maxItems||false,F=B.attr("name")||"autocompleteElements",J=c.containerClass||"entry-field",K=c.placeholderText,P=((typeof c.autoFocus!="undefined")?c.autoFocus:false),G=((typeof c.appendTo!="undefined")?c.appendTo:"body"),N=[],A=B.parent(".autocomplete-container"),g=A.find(".autocompleteHelper"),b=false,T=false,R=B.siblings(".autocomplete-box"),I=c.beforeAdd||false,H=c.afterAdd||false,E=c.beforeDelete||false,C=c.afterDelete||false,O=this,Y=c.editorContext||null,X=function(){if(A.length==0){B.wrap('
                    ');A=B.parent(".autocomplete-container");A.addClass(J).on("mousedown",function(m){var i=this;setTimeout(function(){var n=$(".autocompleteHelper:visible",i);if(n.length>0){n[0].focus()}},10);return false})}if(R.length==0){R=$("
                    ").addClass("autocomplete-box").insertBefore(B)}if(g.length==0){g=$('').addClass("autocompleteHelper b-form-input__input--hide-clear-button").attr("placeholder",function(){return K?K:null}).attr("maxlength",function(){return B.attr("maxlength")?B.attr("maxlength"):null}).insertAfter(R)}g.attr("tabindex",B.attr("tabindex")||0);g.off("keydown").on("keydown",function(m){if(m.which==13){var i=$(m.target).val();if(i.length>=d){S(i,true,m)}}});g.off("blur").on("blur",function(i){b=window.setTimeout(function(){if(!T){var m=g.val();if(m.length>=d){S(m,true,i)}}T=false;b=false},200)});g.off("focus").on("focus",function(i){T=b?true:false;return false});var j=["font-family","font-size","font-weight","font-style","color","line-height","height"];var k;for(k=0;k";B.replaceWith(h);B=A.find('[name="'+F+'"]');g.autocomplete({autoFocus:P,appendTo:G,delay:e,minLength:d,search:function(i,m){console.log("searching for "+this.value)},source:function(i,m){console.log("getting source for "+i.term);vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/"+a+"/"+L,data:({searchStr:i.term}),success:function(o){console.log("got source for "+i.term+":");if(o&&$.isArray(o.suggestions)){var n=[];$.each(o.suggestions,function(p,q){if(Y&&Y.type=="tags"){n.push({label:q.title,value:pageData.userid})}else{n.push({label:q.title,value:q.value})}});m(n)}else{console.log("/ajax/api/"+a+"/"+L+" successful, but response was not an array");openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error_phrase:"error_getting_suggestions"})},select:function(m,i){O.addElement(i.item.label,i.item.value);g.val("");m.preventDefault()},focus:function(m,i){g.val(i.item.label);m.preventDefault()}});R.delegate(".element-x","click",function(p){var n=$(this).closest(".autocomplete");var m=n.find(".element-text").text().toLowerCase();var i=[];var o=false;$(N).each(function(q,r){if(r.label.toLowerCase()==m){o=r}else{i.push(r)}});if(typeof E=="function"){if(!E.call(this,o.label,o.data)){return false}}N=i;n.remove();f();if(typeof C=="function"){C.call(this,o.label,o.data)}});A.off("click").on("click",function(i){if(!$(i.target).hasClass("ui-autocomplete-input")){$(".ui-autocomplete-input",$(this)).focus()}return false});if(l){W.call(this,l)}},M=function(l,k){if(l==""){return false}if(typeof I=="function"){if(!I.call(this,l,k)){return false}}var j=true;$(N).each(function(n,o){if(o.label==l){j=false}});if(!j){return false}if(Z){if(N.length>=Z){return false}}var m=$("
                    ").addClass("element-x vb-icon vb-icon-x-blue").text("X");var h=$("
                    ").addClass("element-text").text(l);var i=$("
                    ").addClass("autocomplete").append(h).append(m).appendTo(R);N.push({label:l,value:k});f();if(typeof H=="function"){H.call(this,l,k)}R.show();return true},W=function(k){var h=k.length,j;for(j=0;j3)?3:H;I.off("click",".js-poll__view-results").on("click",".js-poll__view-results",function(L){L.preventDefault();var K=A(this).attr("data-nodeid"),J=A(this).closest("form");A.post(vBulletin.getAjaxBaseurl()+"/poll/get",{nodeid:K},function(M){B(J,M)},"json")});I.off("click",".js-poll__back-to-poll").on("click",".js-poll__back-to-poll",function(K){K.preventDefault();var J=A(this).closest(".js-poll__parent");J.find("div.pollresults").addClass("h-hide");J.find("form.poll").show()});I.off("click",".b-poll-fieldset__add-more").on("click",".b-poll-fieldset__add-more",function(L){var M=A(this),K=M.prev(".b-poll-fieldset__poll-answers"),J=K.find("li").first().clone(true);J.find(".b-form-input__input").val("").attr("name","polloptions[new][]");J.find(".js-remove-button").prop("disabled",false);J.appendTo(K).find(".b-form-input__input").focus();if(K.find("li").length==H){M.addClass("h-hide")}K.find(".js-remove-button").prop("disabled",false);return false});I.off("click",".b-poll-fieldset__poll-answers .js-remove-button").on("click",".b-poll-fieldset__poll-answers .js-remove-button",function(){var K=A(this),J=K.closest(".b-poll-fieldset__poll-answers");K.closest("li").remove();J.next(".b-poll-fieldset__add-more").removeClass("h-hide");if(J.find("li").length==1){J.find(".js-remove-button").prop("disabled",true)}return false});I.off("click",".js-poll-timeout").on("click",".js-poll-timeout",function(K){var J=A(this).closest(".b-poll-fieldset__poll-options").next(".b-poll-fieldset__datepicker-container");if(this.checked){J.removeClass("h-hide")}else{J.addClass("h-hide").find(".b-datepicker__input").val("")}});I.off("submit.formpoll","form.poll").on("submit.formpoll","form.poll",function(M){M.preventDefault();var J=A(this);var L=J.find('[name="polloptionid"]:checked').val();var K=[];J.find('[name="polloptionids[]"]:checked').each(function(){K.push(A(this).val())});A.post(vBulletin.normalizeAjaxUrl(J.attr("action")),{polloptionid:L,"polloptionids[]":K},function(O){if(O==false){openAlertDialog({title:vBulletin.phrase.get("vote_now"),message:vBulletin.phrase.get("vote_failed"),iconType:"warning"})}else{B(J,O);var N=J.parent();A("div.pollresults",N).find(".js-poll__back-to-poll").remove()}},"json")});A(document).off("click",".pollresults-data .voter-icon").on("click",".pollresults-data .voter-icon",function(){var J=A(this);if(J.find(".voters").is(":visible")){return false}A(".pollresults-data tr td.pollvoter-cell .voter-icon .voters").hide();var M=J.attr("data-node-id");var L=J.attr("data-polloption-id");var K=J.closest("form");A.post(vBulletin.getAjaxBaseurl()+"/poll/get-voters",{nodeid:M,polloptionid:L},function(N){if(N){if(!N.error){C(K,N,L,J)}else{D({message:N.error,type:"error"},J)}}else{D({message:vBulletin.phrase.get("vote_error_retrieving"),type:"error"},J)}},"json")});A(document).off("click",".pollresults-data .voter-icon .voters").on("click",".pollresults-data .voter-icon .voters",function(){e.stopPropagation();return true});if(A(".polloptioncontainer.new",I).length>0){for(var F=0;F").addClass(H.type).text(H.message);I.html(F)}else{I.html(H.voters)}I.fadeIn("slow");A("body").on("click.voterpopup",function(J){if(A(J.target).closest(".voter-icon").length==0){I.hide();A("body").off("click.voterpopup")}})}function C(F,H,K,I){var M=false;if(H.options){B(F,H);var J=H.options[K];if(J){M=true;if(!A.isEmptyObject(J.votersinfo)){var L=[];for(var G in J.votersinfo){L.push('{1}'.format(pageData.baseurl+J.votersinfo[G].profileUrl,J.votersinfo[G].username))}D({voters:L.join(", ")},I)}else{D({message:vBulletin.phrase.get("vote_first"),type:"note"},I)}}}if(!M){D({message:vBulletin.phrase.get("vote_error_retrieving"),type:"error"},I)}}function B(G,L){var F=G.parent(),H=L.options,K="";for(var I in H){var J=A(".pollresults-option-"+H[I].polloptionid);J.find(".title").html(JShtmlEncode(H[I].title));J.find(".bar-container .bar").css("width",H[I].percentage+"%");J.find(".percentage").html(H[I].percentage+"%");J.find(".votes span").html(H[I].votes);if(H[I].votes==1){K="vote"}else{K="votes"}J.find(".votes label").html(vBulletin.phrase.get(K))}A(".pollresults .pollvote-count span",F).html(L.poll_votes);if(L.poll_votes==1){K="vote"}else{K="votes"}A(".pollresults .pollvote-count label",F).html(vBulletin.phrase.get(K));G.hide();A("div.pollresults",F).removeClass("h-hide")}E(A(document))})})(jQuery);; - -// *************************** -// js.compressed/vbSlideshow.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["gallery_slideshow","no_photos_found_or_post_deleted"]);(function(G){window.vBulletin=window.vBulletin||{};vBulletin.gallery=vBulletin.gallery||{};var H=5,N=G("#slideshow-dialog"),L=false,M=false,E=0,F={};function K(R,S,V,Q){var X=R.find(".caption"),U;X.html("").hide();if(S.links){X.append(G("
                    ").addClass("links ellipsis").html(S.links))}if(S.title){X.append(G("
                    ").addClass("title ellipsis").html(S.title))}if(S.links&&S.title){U=15}else{if(S.links||S.title){U=35}else{U=50}}var T=R.find(".slideshow-wrapper .jcarousel-item-"+V+" img");var W=T.outerWidth();X.css({marginBottom:U+"px",width:W+"px",marginLeft:"auto",marginRight:"auto"});T.one("load",function(){var Y=G(this).outerWidth();X.css("width",Y+"px")});if(Q){X.fadeIn("slow",function(){R.click()})}else{X.show()}}function D(Q){if(Q.which==37){N.find(".jcarousel-prev").click()}else{if(Q.which==39){N.find(".jcarousel-next").click()}}if(Q.which>=33&&Q.which<=40){return false}}function C(Q){return false}function A(){var g=G(this);M=this;if(g.closest("#preview-overlay").length==1){return false}var U=g.attr("data-channelid"),c=g.closest(".photoPreviewBox"),h=g.attr("src");if(typeof (h)==="undefined"){h=g.attr("href")}if(L===false){L=(c.length>0)?c.index():g.index()}G(document).off("click","#slideshow-dialog .close-btn").on("click","#slideshow-dialog .close-btn",function(){N.dialog("close")});G(document).off("click",".thumbnails .image-wrapper").on("click",".thumbnails .image-wrapper",function(n,m){if(typeof m=="undefined"){m=true}G(".thumbnails .image-wrapper",N).addClass("dimmed");G(this).removeClass("dimmed");var l=Number(G(this).parent().attr("jcarouselindex"));N.data("thumbclick",true);vBulletin.gallery.slideshow.jcarousel("scroll",l,m);N.removeData("thumbclick")});G("body").css("overflow","hidden");var k=G(window).innerWidth(),X=G(window).innerHeight(),e=(k>768);var R=e?20:0,i=10,d=parseInt(k-(R*2),10),S=parseInt(X-(R*2),10);if(!e){N.css({borderRadius:0,borderWidth:0})}else{N.css({borderRadius:"",borderWidth:""})}var W=parseInt(d-(i*2),10),f=parseInt(S-(i*2),10),T=60,V=90,b=50,j=W-10,Z=parseInt(f-T-b-(i*3),10),a=parseInt(((Z/2)-21),10);E=j;H=Math.max(1,Math.floor(E/V));N.dialog({autoOpen:false,resizable:false,closeOnEscape:true,showTitleBar:false,modal:true,width:d,height:S,dialogClass:"slideshow-dialog",open:function(){G(".ui-widget-overlay").bind("click",function(){N.dialog("close")});G(document).off("keydown",D).on("keydown",D);G(document).off("mousewheel",C).on("mousewheel",C)},close:function(m,l){if(vBulletin.gallery.thumbnails){vBulletin.gallery.thumbnails.jcarousel("destroy")}if(vBulletin.gallery.slideshow){vBulletin.gallery.slideshow.jcarousel("destroy")}G("body").css("overflow","auto");G(document).off("keydown",D);G(document).off("mousewheel",C);M=false;L=false}});var Q=N.find(".slideshow-wrapper .slideshow-list");if(Q.length==0){Q=N.find(".slideshow-wrapper").append(G("
                      ").addClass("slideshow-list"))}N.dialog("open");window.vBulletin.loadingIndicator.show();var Y=g.closest(".js-slideshow__gallery-node").attr("data-node-id")||g.closest(".js-slideshow__gallery-node").attr("data-nodeid")||g.closest(".js-post-sm").attr("data-nodeid");G('").appendTo("head");vBulletin.gallery.slideshow=Q.jcarousel({wrap:null,animation:"slow",easing:"swing",scroll:1,rtl:G("html").attr("dir")=="rtl",initCallback:function(u,o){if(o=="init"){var m=g.closest(".b-content-entry-panel__content--gallery").find(".js-photo-postdata input");if(m.length>0){var l={photos:[]};m.filter('[name="filedataid[]"]').each(function(){var v={title:JShtmlEncode(m.filter('[name="title_'+this.value+'"]').val()),url:pageData.baseurl+"/filedata/fetch?filedataid="+this.value,thumb:pageData.baseurl+"/filedata/fetch?thumb=1&filedataid="+this.value};l.photos.push(v)});setTimeout(function(){I(l,u)},10)}else{var q={nodeid:Y};if(vBulletin.media&&vBulletin.media.MEDIA_USERID){q.userid=vBulletin.media.MEDIA_USERID}if(U){q.channelid=U}var n=parseInt(G(".albumSlideShowPageNo").val());if(!isNaN(n)){q.pageno=n}var r=parseInt(G(".albumSlideShowPerPage").val());if(!isNaN(r)){q.perpage=r}var p=G(".media-tab .media-filter-overlay .filter-options input:checked").val();if(p){q.dateFilter=p}if(!isNaN(L)){q.startIndex=L}var t=q;if(Y>0){t.startIndex=""}var s=JSON.stringify(t);if(F[s]){I(F[s],u)}else{G.post(vBulletin.getAjaxBaseurl()+"/filedata/gallery",q,function(v){if(!v&&h){v={photos:[{title:"",url:h,thumb:""}]}}F[s]=v;I(v,u)},"json").complete(function(){window.vBulletin.loadingIndicator.hide()})}}}},itemVisibleInCallback:{onBeforeAnimation:function(q,o,n,p){if(p=="init"){return false}var s=N.data("image-data");if(s){var l=s.photos.length;if(n>0){while(n>l){n-=l}}else{while(n<=0){n+=l}}K(N,s.photos[n-1],n,true);var r=Math.floor(H/2);var m=n-r;m=Math.max(m,1);vBulletin.gallery.thumbnails.jcarousel("scroll",m,true);if(!N.data("thumbclick")){G("#slideshow-dialog .thumbnails .image-wrapper").addClass("dimmed");vBulletin.gallery.thumbnails.jcarousel("get",n).find(".image-wrapper").removeClass("dimmed")}L=n-1}}}});return false}function I(U,T){if(!U||!U.photos){openAlertDialog({title:vBulletin.phrase.get("gallery_slideshow"),message:vBulletin.phrase.get("no_photos_found_or_post_deleted"),iconType:"warning"});return }N.data("image-data",U);P(T,U,N);K(N,U.photos[0],1);if(U.photos.length>1){vBulletin.gallery.thumbnails.jcarousel("get",1).find(".image-wrapper").removeClass("dimmed")}var R=L;var Q=parseInt(G(".albumSlideShowPerPage").val());if(!isNaN(Q)){R=L%Q}if(R>0){var S=vBulletin.gallery.slideshow.jcarousel("scroll",R+1,false);if(typeof S!="undefined"){N.find(".slideshow-wrapper").css("visibility","hidden");window.setTimeout(function(){G(".thumbnails .image-wrapper",N).eq(R).trigger("click",[false]);N.find(".slideshow-wrapper").css("visibility","")},0)}}window.vBulletin.loadingIndicator.hide()}function P(R,T,Q){R.size(T.photos.length);if(T.photos.length>1){G("#slideshow-dialog .thumbnails").show();J(T)}else{G("#slideshow-dialog .thumbnails").hide();Q.dialog("option","height","auto")}var S=R.first||1;G.each(T.photos,function(V,U){R.add(S+V,'
                      {1}
                      '.format(U.url,U.htmltitle))})}function J(R){var Q=G("#slideshow-dialog .thumbnails .thumbnail-list");if(Q.length==0){Q=G("#slideshow-dialog .thumbnails").append(G("
                        ").addClass("thumbnail-list"))}vBulletin.gallery.thumbnails=Q.jcarousel({wrap:null,animation:"fast",easing:"swing",scroll:H,rtl:G("html").attr("dir")=="rtl",size:R.photos.length,initCallback:function(W,U){if(U=="init"){W.size(R.photos.length);G.each(R.photos,function(Z,Y){var X=(W.first||1)+Z;if(W.has(X)){return true}if(X>R.photos.length){return false}var a=G("").addClass("thumbnail").on("load",function(){}).attr({src:Y.thumb,alt:""}).appendTo(G("
                        ").addClass("image-wrapper dimmed"));W.add(X,a.parent().get(0))});var S=G("#slideshow-dialog .thumbnails .jcarousel-clip");var V=Math.min(W.size(),H)*90;var T=Math.min(E,V);S.css("width",T+"px");if(W.size()<=H){W.buttonNext.hide();W.buttonPrev.hide()}}},itemVisibleInCallback:{onBeforeAnimation:function(V,T,S,U){G("#slideshow-dialog .thumbnails").data("visible-range",{first:V.first,last:V.last})}}}).disableSelection()}function O(){if(M){var R=M;var Q=L;N.dialog("close");L=Q;A.call(R)}}function B(){G(document).off("click",".b-gallery-thumbnail-list__item").on("click",".b-gallery-thumbnail-list__item",A);N.addClass("js-no-responsive-resize");G(window).on("resize",G.debounce(300,O))}G(document).ready(B)})(jQuery);; - -// *************************** -// js.compressed/conversation_filter.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["invalid_request","invalid_search_syntax","invalid_server_response_please_try_again","unknown_error"]);(function(A){vBulletin.conversation=vBulletin.conversation||{};vBulletin.conversation.filter=function(K){var N=this;var E=null;var F=0;var J=false;var C=false;var I="conversation_filter";var O={context:document,autoCheck:false,checkInterval:15000,scrollToTop:null,customFilter:null,onContentLoad:null,closeOverlayOnScroll:true,pagination:null,allowHistory:false,tabParamAsQueryString:true,hash:""};if(K&&typeof K=="object"){A.extend(O,K)}var B=new vBulletin.history.instance(O.allowHistory);function H(){A(".toolbar-filter-overlay input[type=radio]",O.context).off("change."+I).on("change."+I,function(X,W,b){var R,U,S=A(this),d=A(this.form);if(!B.isEnabled()&&O.allowHistory){R=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(R,this.name,this.value,O.context,O.hash);return true}J=true;O.customFilter=null;if(!S.data("bypass-filter-display")){M(this)}U=S.closest(".conversation-toolbar-wrapper");if(A(".conversation-toolbar-wrapper",O.context).length>1){$toolbarWrappers.filter("."+(U.hasClass("top")?"bottom":"top")).find("input[name={0}][value={1}]".format(this.name,this.value)).prop("checked",true)}if(this.value=="conversations_on"){O.autoCheck=true;C=true;F=1}else{clearTimeout(F);C=(this.name=="filter_show")}A(".new-conversations-strip",O.context).hide();N.updatePageNumber(b||1);var T=A('.filtered-by .filter-text[data-filter-name="q"]',O.context);if(T.length){var Q=N.getSelectedFilters(d);Q.q=T.data("filter-value");N.setOption("customFilter",Q);N.forceApplyFilters()}else{N.applyFilters(false)}if(B.isEnabled()&&!W){var V=N.getSelectedFilters(d),c=this.name,P=this.value,a=A(".filtered-by",U),Z={from:"filter",page:1,tab:O.tabParamAsQueryString?"#"+U.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(U.closest(".ui-tabs"),false),filters:V,filtervalue:P,filtername:c};if(!a.data("reset")){R=vBulletin.makePaginatedUrl(location.href,1);R=vBulletin.makeFilterUrl(R,c,P,O.context)}else{R=location.pathname.replace(/\/page[0-9]+/,"");if(O.tabParamAsQueryString){var Y=vBulletin.parseQueryString(location.search);if(Y.tab){R+="?tab="+Y.tab}else{if(Y.view){R+="?view="+Y.view}}}}B.pushState(Z,document.title,R);a.data("reset",null)}});A(".new-conversations-strip",O.context).off("click."+I).on("click."+I,function(){A(this).hide();C=true;N.updatePageNumber(1);N.applyFilters(false,true)});A(".toolbar-filter",O.context).off("click."+I).on("click."+I,function(U,T,R){var S=A(this).closest(".conversation-toolbar-wrapper");var Q=(S.hasClass("bottom"))?"bottom":"top";if(typeof T=="undefined"){T="slow"}var V=A(".filter-wrapper",this).toggleClass("selected");A(".arrow .vb-icon",this).toggleClass("vb-icon-triangle-down-wide vb-icon-triangle-up-wide");A(".toolbar-filter-overlay",S).slideToggle(T,function(){var W=I+Q;if(A(this).is(":visible")){A("body").off("click."+W).on("click."+W,function(c){var a=".conversation-toolbar-wrapper."+Q;if(A(c.target).closest(".toolbar-filter-overlay").length==0&&A(c.target).closest(".toolbar-filter").length==0){A("body").off("click."+W);A(window).off("scroll."+W);var b=(A(c.target).closest(".toolbar-filter").length>0)?"fast":"slow";A(".conversation-toolbar-wrapper.{0} .conversation-toolbar .toolbar-filter".format(Q),O.context).triggerHandler("click."+I,[b])}});var Y=true;if(R!="scroll"){var X=A(".filtered-by",O.context);if(X.length==0||X.is(":hidden")){X=this}var Z={};Y=vBulletin.isScrolledIntoView(X,Z);if(!Y){A("html,body").animate({scrollTop:"+="+Math.abs(Z.bottom)},"fast",function(){setTimeout(function(){if(O.closeOverlayOnScroll){A(window).off("scroll."+W).on("scroll."+W,function(){A(".conversation-toolbar-wrapper.{0} .conversation-toolbar .toolbar-filter".format(Q),O.context).triggerHandler("click."+I,[0,"scroll"])})}},50)})}}if(Y){if(O.closeOverlayOnScroll){A(window).off("scroll."+W).on("scroll."+W,function(){A(".conversation-toolbar-wrapper.{0} .conversation-toolbar .toolbar-filter".format(Q),O.context).triggerHandler("click."+I,[0,"scroll"])})}}}else{A("body").off("click."+W);A(window).off("scroll."+W)}});if(S.hasClass("bottom")&&A(".arrow .vb-icon",this).hasClass("vb-icon-triangle-up-wide")){var P=A(".conversation-toolbar-wrapper.bottom .toolbar-filter-overlay",O.context);A("html, body").animate({scrollTop:P.offset().top+P.innerHeight()},500)}});A(".filtered-by",O.context).off("click."+I,".x").on("click."+I,".x",function(){var T=A(this),Q=T.closest(".filtered-by"),W=T.closest(".filter-text"),S=W.data("filter-name"),V=A(),R;Q.data("clicked",true);if(!B.isEnabled()&&O.allowHistory){var P;if(W.data("filter-type")=="text"&&W.data("filter-js-selector")){P=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(P,"q","",O.context,O.hash,true)}else{P=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(P,S,W.data("filter-value"),O.context,O.hash,true)}return false}V=A(".toolbar-filter-overlay .filter-options input[name={0}]".format(S),O.context).prop("checked",false).filter(".js-default-checked");N.updatePageNumber(1);if(W.data("filter-type")=="text"&&W.data("filter-js-selector")){A(W.data("filter-js-selector")).val("");R=N.getSelectedFilters(A("form.toolbar-filter-overlay",O.context));delete R[S];N.setOption("customFilter",R)}W.remove();var U=Q.find(".filter-text").length;if(U==0){Q.addClass("h-hide");Q.data("reset",true)}else{if(U==1){Q.find(".clear-all").addClass("h-hide")}}if(V.length==1){V.data("bypass-filter-display",true);V.trigger("click."+I);V.data("bypass-filter-display",null)}else{if(R){var P=vBulletin.makePaginatedUrl(location.href,1);P=vBulletin.makeFilterUrl(P,"q","",O.context);B.pushState({from:"filter",page:1,tab:O.tabParamAsQueryString?"#"+T.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(T.closest(".ui-tabs"),false),filters:R},document.title,P)}N.forceApplyFilters();if(R){N.setOption("customFilter",null)}}});A(".filtered-by",O.context).off("click."+I,".clear-all").on("click."+I,".clear-all",function(){var P=A(this).closest(".conversation-toolbar-wrapper");A(this).data("clicked",true);N.setOption("customFilter",null);N.resetFilters(false,false,P);return false});A(".conversation-toolbar .filter-wrapper",O.context).data("object-instance",N);A(".conversation-showmore",O.context).click(function(){var P=parseInt(A('form.toolbar-filter-overlay input[name="pagenum"]',O.context).val());C=false;N.updatePageNumber(P+1);N.applyFilters(false,true,true)});A(".conversation-toolbar .toolbar-search-form",O.context).off("submit.filtersearch").on("submit.filtersearch",function(){var P="q";$searchBox=A(this.elements[P]),searchKeyword=A.trim($searchBox.val()),$conversationToolbar=A(this).closest(".conversation-toolbar-wrapper"),Q;$searchBox.val(searchKeyword);if(!B.isEnabled()&&O.allowHistory){Q=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(Q,P,searchKeyword,$conversationToolbar);return false}var T=O.tabParamAsQueryString?"#"+A(this).closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(A(this).closest(".ui-tabs"),false);if(searchKeyword){var S=N.getSelectedFilters($conversationToolbar.find(".toolbar-filter-overlay")),U={};U[P]=searchKeyword;A.extend(S,U);N.setOption("customFilter",S);N.forceApplyFilters();N.displayCustomFilterText(this.elements[P]);if(B.isEnabled()){Q=vBulletin.makePaginatedUrl(location.href,1);Q=vBulletin.makeFilterUrl(Q,P,searchKeyword,$conversationToolbar);B.pushState({from:"filter",page:1,tab:T,filters:S},document.title,Q)}}else{var R=$conversationToolbar.find('.filter-text[data-filter-name="{0}"]'.format(P));if(R.length){var S=N.getSelectedFilters($conversationToolbar.find(".toolbar-filter-overlay"));N.setOption("customFilter",S);A(".x",R).trigger("click");if(B.isEnabled()){var Q=vBulletin.makePaginatedUrl(location.href,1);Q=vBulletin.makeFilterUrl(Q,P,searchKeyword,$conversationToolbar);B.pushState({from:"filter",page:1,tab:T,filters:S},document.title,Q)}}}return false})}function M(P,Q){vBulletin.conversation.displaySelectedFilterText(P,Q,O.context)}H();this.isFilterSelected=function(P){return A('.toolbar-filter-overlay input[value="'+P+'"]',O.context).is(":checked")};this.getSelectedFilters=function(P){return vBulletin.getSelectedFilters(P,false)};this.resetFilterForms=function(P){if(!P||(P instanceof A&&!P.length)){P=O.context}A(".toolbar-filter-overlay .js-default-checked",P).prop("checked",true);A(".toolbar-search-form .js-filter-search",P).val("").filter(".placeholder").focus().blur()};A(".toolbar-filter-overlay, .toolbar-search-form",O.context).trigger("reset");if(B.isEnabled()){var D=B.getState();if(!D||A.isEmptyObject(D.data)){var G=A(O.context).hasClass("ui-tabs-panel")?A(O.context).attr("id"):A(".conversation-toolbar-wrapper",O.context).closest(".ui-tabs-panel").attr("id"),L={from:"filter",page:Number(A(".pagenav-form .defaultpage",O.context).val())||1,tab:vBulletin.getSelectedTabHashOrPath(A(O.context).closest(".ui-tabs"),O.tabParamAsQueryString),filters:N.getSelectedFilters(A("form.toolbar-filter-overlay",O.context))};B.setDefaultState(L,document.title,location.href)}B.setStateChange(function(X,c,Y){var P=B.getState();if(P.data.from=="filter"||c=="pagination"||c=="tabs"){B.log(P.data,P.title,P.url);var S,Q;if(P.data.tab){S=O.tabParamAsQueryString?A(P.data.tab):A('.ui-tabs .ui-tabs-panel[data-url-path="'+P.data.tab+'"]')}Q=(S&&S.length&&S)||O.context;if(c=="pagination"){if(Y){var a=A(".filtered-by",Q),R=A(".toolbar-filter-overlay .filter-options-list",Q),b=false;A(".filter-text",a).filter('[data-filter-name!="q"]').remove();A(".clear-all",a).addClass("h-hide");R.find(".js-default-checked").prop("checked",true);A.each(Y,function(e,f){var d=A('input[name="{0}"][value="{1}"]'.format(e,f),R);if(d.length){d.prop("checked",true).trigger("change",[true,P.data.page]);b=true}});if(!b){R.first().data("bypass-filter-display",true).trigger("change",[true,P.data.page]).data("bypass-filter-display",null);a.addClass("h-hide")}}}else{var W=A(Q).closest(".ui-tabs"),T=O.tabParamAsQueryString?W.find('.ui-tabs-nav > li > a[href*="{0}"]'.format(P.data.tab)):W.find('.ui-tabs-nav > li > a[data-url-path="'+P.data.tab+'"]');if(!T.parent().hasClass("ui-tabs-active")){var V=T.parent().index();vBulletin.selectTabByIndex.call(W,V)}else{var U=N.getSelectedFilters(A(".toolbar-filter-overlay",Q)),Z=A(".conversation-toolbar .filter-wrapper",Q).data("object-instance")||N;if(!vBulletin.areJsonObjectsEqual(U,P.data.filters)){Z.setOption("context",Q);Z.updatePageNumber(P.data.page);Z.applyHistoryFilters(P.data)}}}}},"filter")}this.displayCustomFilterText=function(P,Q){M(P,(Q||A(P).val()))};this.isHistoryEnabled=function(){return B.isEnabled()};this.resetFilters=function(U,Q,T){if(!T||(T instanceof A&&!T.length)){T=O.context}var S=A(".filtered-by",T).addClass("h-hide"),R=location.pathname.replace(/\/page[0-9]+/,"");if(O.tabParamAsQueryString){var P=vBulletin.parseQueryString(location.search);if(P.tab){R+="?tab="+P.tab}else{if(P.view){R+="?view="+P.view}}}A(".clear-all",S).addClass("h-hide");A(".filter-text",S).remove();N.resetFilterForms(T);if(!U){if(B.isEnabled()){S.data("reset",true);N.updatePageNumber(1);var V=N.getSelectedFilters(A("form.toolbar-filter-overlay",T));if(Q){var W=A(".toolbar-search-form .js-filter-search",T).val("");delete V[W.attr("name")];N.setOption("customFilter",V)}N.forceApplyFilters();L={from:"filter",page:1,tab:O.tabParamAsQueryString?"#"+S.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(S.closest(".ui-tabs"),false),filters:V};B.pushState(L,document.title,R)}else{if(O.allowHistory){location.href=R}}}return N};this.applyHistoryFilters=function(R){if(R&&R.filters&&!A.isEmptyObject(R.filters)){var S=O.tabParamAsQueryString?A(R.tab):A('.ui-tabs .ui-tabs-panel[data-url-path="'+R.tab+'"]'),U=A(".toolbar-filter-overlay",S);if(typeof (N.lastFilters)!="undefined"){delete N.lastFilters}N.resetFilters(true,false,S);A.each(R.filters,function(V,X){var W=A('[name="'+V+'"]',U);if(W.attr("type")=="hidden"){W.val(X)}else{if(W.attr("type")=="radio"&&X!=R.filtervalue){W.filter('[value="'+X+'"]').prop("checked",true)}}});var Q=vBulletin.parseQueryString(location.href),T=true,P=function(){A(".toolbar-search-form .js-filter-search",S).val("").filter(".placeholder").focus().blur()};if(!A.isEmptyObject(Q)){A.each(Q,function(W,X){var V=A('.filter-options-list input[name="{0}"][value="{1}"]'.format(W,X),U);if(V.length){if(R.filtername==W&&R.filtervalue==X){T=false;V.prop("checked",true).trigger("change",[true])}else{M(V.get(0))}}else{V=A('.toolbar-search-form .search-container input[name="{0}"]'.format(W),S);if(V.length&&X){M(V.get(0),X);V.val(X)}else{P()}}})}else{P()}if(T){N.setOption("customFilter",R.filters);N.forceApplyFilters();N.setOption("customFilter",null)}}return N};this.forceApplyFilters=function(){if(typeof (N.lastFilters)!="undefined"){delete N.lastFilters}C=true;N.applyFilters(false,true);return N};this.applyFilters=function(T,V,P,U){var Z=A(".toolbar-filter-overlay",O.context);if(V){clearTimeout(F)}var Q={filters:(!O.customFilter)?N.getSelectedFilters(Z):O.customFilter,isAjaxTemplateRender:true,isAjaxTemplateRenderWithData:true};if(A.isEmptyObject(Q.filters)){return N}if(T){Q.filters["checkSince"]=E;Q.filters["pagenum"]=1}if(!U){var R=Z.find('input[name="result-id"]').val(0);if(R.length){Q.filters["result-id"]=0}}else{C=true}if(typeof (this.lastFilters)!="undefined"&&vBulletin.areJsonObjectsEqual(this.lastFilters.filters,Q.filters)&&!T){return N}this.lastFilters=Q;var W=A(".conversation-empty",O.context),S=A(".conversation-toolbar-wrapper",O.context);S.addClass("h-disabled");W.addClass("h-invisible");if(T){window.vBulletin.loadingIndicator.suppressNextAjaxIndicator()}var Y=vBulletin.normalizeAjaxUrl(Z.attr("action"))||(vBulletin.getAjaxBaseurl()+"/activity/get");var X=Z.closest(".conversation-toolbar-wrapper").find('form.pagenav-form input[name="article_display_columns"]');if(X.length==1){Q.article_display_columns=X.val()}A.ajax({type:"POST",url:Y,data:(Q),dataType:"json",success:function(a){var c=A(".conversation-list",O.context);W.addClass("h-hide");if(!a||a.error||a.errors){console.log(Y+" failed. result:"+JSON.stringify(a));c.addClass("h-hide");var d="unknown_error";if(!a){d="invalid_server_response_please_try_again"}else{if(a.error){d=a.error}else{if(a.errors){d=a.errors[0][0]}}}d=vBulletin.phrase.get(d);W.html((d||"").replace(//g," ")).removeClass("h-hide h-invisible");return }if(T){if(!J&&a.total>0&&!A("body").hasClass("edit-mode")){A(".new-conversations-strip span",O.context).html(a.total);A(".new-conversations-strip",O.context).fadeIn("slow")}if(A(".conversation-list li.list-item",O.context).length==0){W.removeClass("h-hide")}}else{var f=A(".conversation-showmore",O.context);A(".new-conversations-strip",O.context).hide();if(((a.total_with_sticky>0)||(a.total>0))&&a.template){if(a.resultId){var e=A('input[name="result-id"]',Z).val(a.resultId);if(e.length&&this.lastFilters){this.lastFilters.filters["result-id"]=a.resultId}if(O.pagination){O.pagination.updateResultId(a.resultId)}}if(P){c.append(a.template)}else{W.addClass("h-hide");c.html(a.template).removeClass("h-hide")}if((Q.filters["maxpages"]&&Q.filters["pagenum"]>=Q.filters["maxpages"])||(a.pageinfo&&(Q.filters["pagenum"]>=a.pageinfo.totalpages||a.pageinfo.showseemore===false))){f.addClass("h-hide")}else{f.removeClass("h-hide")}}else{if(!P){W.removeClass("h-hide");c.addClass("h-hide").empty()}}if(a.total_with_sticky==0){f.addClass("h-hide")}if(C&&O.scrollToTop){var b=(O.scrollToTop instanceof A)?O.scrollToTop:A(O.scrollToTop);if(b.length>0){A("body,html").animate({scrollTop:b.offset().top},"slow")}}E=a.lastDate;if(typeof O.onContentLoad=="function"){O.onContentLoad.apply(c.get(0),[a])}if(a.pageinfo){N.updatePageNumber(a.pageinfo.pagenumber||1);if(O.pagination&&typeof O.pagination.updatePageInfo=="function"){O.pagination.setOption("context",O.context);O.pagination.updatePageInfo(a.pageinfo,true)}}if(vBulletin.inlinemod&&typeof vBulletin.inlinemod.init=="function"&&A(".moderationmenu_container",O.context).length>0){vBulletin.inlinemod.init(O.context)}}if(J){J=false}},error:function(c,b,a){console.log(Y+" failed. error:"+a);if(a!=""){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}},complete:function(){S.removeClass("h-disabled");W.removeClass("h-invisible");if(!J&&O.autoCheck&&F){F=setTimeout(N.checkNewConversations,O.checkInterval)}}});return N};this.updatePageNumber=function(P){P=Number(P);if(P>0){A('form.toolbar-filter-overlay input[name="pagenum"]',O.context).val(P)}return N};this.checkNewConversations=function(){if(!A("body").hasClass("edit-mode")){console.log("Checking for new activity since "+E);N.applyFilters(true)}return N};this.toggleNewConversations=function(P){if(P){O.autoCheck=true;F=setTimeout(N.checkNewConversations,O.checkInterval)}else{O.autoCheck=false;clearTimeout(F)}return N};this.hideFilterOverlay=function(){A(".conversation-toolbar-wrapper .toolbar-filter-overlay",O.context).filter(":visible").each(function(){A(this).prev(".conversation-toolbar").find(".toolbar-filter").triggerHandler("click."+I,[0])});return N};this.getOption=function(P){return O[P]};this.setOption=function(P,Q){O[P]=Q;return N};if(O.autoCheck){E=pageData.current_server_datetime;F=setTimeout(N.checkNewConversations,O.checkInterval)}};vBulletin.conversation.displaySelectedFilterText=function(J,K,C){var L=A(J);if(L.data("bypass-filter-display")==1){return }C=C||L.closest(".conversation-toolbar-wrapper");var G=A(".filtered-by",C).removeClass("h-hide").find(".filter-text-wrapper").show(),B=A(".filter-text[data-filter-name={0}]".format(J.name),G),M='
                        {3}
                        ',E,F,I;if(J.type=="radio"){F=L.next("span").text();E=A(M.format(J.name,vBulletin.htmlEntities(J.value),L.closest(".filter-options").prev(".filter-header").html()+" - "+F,((J.name=="filter_new_topics"||J.name=="filter_depth"||(J.value.indexOf("_all")!=-1&&J.value!="time_all"))?(L.closest("li").find(".filter-header").html()||"")+" - ":"")+F))}else{if(J.type=="text"){K="""+JShtmlEncode(K)+""";E=A(M.format(J.name,vBulletin.htmlEntities(J.value),L.data("filter-name")+": "+K,K)).data("filter-type","text");I=L.attr("class").match(/js-.*/);if(I){E.data("filter-js-selector","."+I[0])}}}if(B.length>0){B.replaceWith(E)}else{var D=[],H=false;A(".toolbar-filter-overlay > ul > li",C).each(function(){D.push(A("input:first",this).attr("name"))});A(".filter-text",G).each(function(){var N=A(this);if(A.inArray(J.name,D)1){G.next(".clear-all").removeClass("h-hide")}}}})(jQuery);; - -// *************************** -// js.compressed/channel_conversation.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,[]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["closed","this_topic_is_closed"]);(function(A){var C=[".forum-channel-content-widget",".blog-channel-content-widget",".sg-channel-content-widget",".search-results-widget .topic-list-container"];if(!vBulletin.pageHasSelectors(C)){return false}var B={};vBulletin.conversation.editTopicTitle=function(G){var F=A(G.target),D=F.closest(".js-topic-item"),E=D.find(".js-topic-wrapper"),I=D.data("node-id"),H=D.data("can-edit-title");if(!H){return }if(B[I]){return }B[I]="edit";if(E.find(".js-loading-icon").length==0){A('').appendTo(E)}E.find(".js-loading-icon").show();vBulletin.AJAX({call:"/create-content/loadtitleedit",data:{nodeid:I,isAjaxTemplateRender:true},success:function(J){E.find(".js-topic-title").hide();E.find(".js-loading-icon").hide();E.find(".js-topic-title").after(J);var L=E.find(".js-topic-title-edit");L.data("original-title",L.val());var K=30;E.find(".js-prefix, .js-post-icon, .js-topic-prefix, .js-go-to-first-unread").each(function(){K+=A(this).outerWidth(true)});L.outerWidth(L.outerWidth()-K);E.find(".js-topic-title-edit-form").on("submit",vBulletin.conversation.saveTopicTitle);L.on("blur",vBulletin.conversation.saveTopicTitle);L.select().focus()}})};vBulletin.conversation.saveTopicTitle=function(G){G.preventDefault();var F=A(G.target).closest(".js-topic-wrapper"),D=F.find(".js-topic-title-edit-form"),I=D.find(".js-node-id").val(),H=D.find(".js-topic-title-edit").val();if(B[I]=="save"){return }B[I]="save";var J=F.find(".js-topic-title-edit"),E=J.data("original-title");if(E==H){F.find(".js-loading-icon").remove();F.find(".js-topic-title-edit-form").remove();F.find(".js-topic-title").show();B[I]=false}else{F.find(".js-loading-icon").appendTo(D).show();vBulletin.AJAX({call:"/create-content/savetitleedit",data:{nodeid:I,title:H},success:function(K){F.find(".js-loading-icon").remove();F.find(".js-topic-title-edit-form").remove();F.find(".js-topic-title").html(K.title).show();B[I]=false}})}};vBulletin.conversation.openOrCloseTopic=function(K){K.stopPropagation();var L=A(this),J=L.closest(".js-topic-item"),H=J.find(".js-topic-wrapper"),D=J.data("node-id"),G=J.hasClass("closed");if(H.find(".js-loading-icon").length==0){A('').appendTo(H)}var F=H.find(".js-loading-icon");F.show();var E;var I={nodeid:D};if(G){E=vBulletin.getAjaxBaseurl()+"/ajax/api/node/openNode"}else{E=vBulletin.getAjaxBaseurl()+"/ajax/api/node/closeNode"}vBulletin.AJAX({url:E,data:{nodeid:D},error_phrase:"error_open_close_topic",api_error:function(N,M){console.log("AJAX "+E+" on node "+D+" failed! (vBulletin.conversation.OpenOrCloseTopic)");var O=(A("#debug-information").length==1);if(O){console.dir(N)}else{console.dir(N[0])}F.hide()},success:function(V){console.log("AJAX "+E+" on node "+D+" success! (vBulletin.conversation.OpenOrCloseTopic)");var N=G;if(N){J.removeClass("closed")}else{J.addClass("closed")}var M=L.attr("title")||"",W=vBulletin.phrase.get("this_topic_is_closed");subStrIndex=M.indexOf(W);if(N&&subStrIndex>=0){var O=(M.slice(0,subStrIndex)+M.slice(subStrIndex+W.length)).trim();L.attr("title",O)}else{if(!N&&subStrIndex<0){L.attr("title",W+" "+M)}}var U=H.find(".js-prefix"),R="",T=[],Q=vBulletin.phrase.get("closed");if(U.length){R=U.text().trim();if(R.charAt(R.length-1)==":"){R=R.substring(0,R.length-1)}if(R.length>0){T=R.split(", ")}if(!N){T.push(Q)}else{if(T.length>0){for(var P=T.length-1;P>=0;P--){if(T[P]==Q){T.splice(P,1)}}}}}else{U=A('');var S=H.find(".go-to-first-unread");if(S.length){U.insertAfter(S)}else{U.prependTo(H)}if(!N){T.push(Q)}}U.text(T.join(", ")+": ");if(T.length==0){U.hide()}else{U.show()}F.hide()}})};A(document).ready(function(){vBulletin.conversation=vBulletin.conversation||{};var G=A(".channel-content-widget .channel-conversation-list-wrapper"),J=A("#activity-stream-tab",G);if(J.length==0){J=A("#article-tab",G)}var N=A("#recommended-tab",G),O=A("#subscribed-tab",G),e=A("#topic-tab",G),K=A("#media-tab",G),P=A(".conversation-list",J),h=A(".conversation-list",N),a=A(".conversation-list",O),f=A(".conversation-list",e),X=A(".conversation-list",G),H,U,c,Y,L,W,b,D,R=true,F,M=G.find(".widget-tabs-nav .ui-tabs-nav > li"),T=M.filter(".ui-tabs-active"),S=T.index(),k,E=M.parent().data("allow-history")=="1",I=new vBulletin.history.instance(E);if(S==-1){S=0;T=M.first()}k=T.find("> a").attr("href");var Q=function(l){var m=(G.offset().top+(G.outerHeight()-parseFloat(G.css("border-bottom-width")))-l.height());return m};var i=function(l){l=l||k;return M.filter('li:has(a[href*="'+l+'"])').first().index()};M.removeClass("ui-state-disabled");var Z=function(r,p,q,t,l){var n=A(".conversation-toolbar-wrapper.scrolltofixed-floating",r),o=new vBulletin.scrollToFixed({element:n,limit:Q(n)}),m=null,s;if(q){s=new vBulletin.pagination({context:r,allowHistory:E,onPageChanged:function(u,v){m.updatePageNumber(u);if(!v){m.applyFilters(false,true,false,true)}}})}m=new vBulletin.conversation.filter({context:r,autoCheck:t?A(".toolbar-filter-overlay input[type=radio][value=conversations_on]",r).is(":checked"):undefined,scrollToTop:p,pagination:s,allowHistory:E,onContentLoad:l});return{"$bar":n,"$floating":o,pagination:s,filter:m}};var V=function(l){vBulletin.truncatePostContent(l);vBulletin.conversation.processPostContent(l)};var g=function(o,n,l){var m=n.filter;if(n.pagination){n.pagination.setOption("context",o)}m.setOption("context",o);if(typeof m.lastFilters!="undefined"&&A(".conversation-empty:not(.h-hide)",l).length>0){delete m.lastFilters}};var j=function(q,o,p,s,m,n,t){var r=Z(q,o,p,s,function(){r.$floating.updateLimit(Q(r.$bar));if(n){V(n)}if(t){t()}});var l=r.filter;if(m){if(n){V(n)}l.lastFilters={filters:l.getSelectedFilters(A(".toolbar-filter-overlay",q))}}return r};var d=function(o,l,r){var q=(k==r);if(!(r=="#activity-stream-tab"||r=="#article-tab")){if(c){Y.toggleNewConversations(false)}}if(r!="#topic-tab"){if(H){U.toggleNewConversations(false)}}if(r=="#activity-stream-tab"||r=="#article-tab"){if(!c){c=j(J,G,true,true,q,P,null);Y=c.filter}else{g(J,c,l)}Y.applyFilters(false,true)}else{if(r=="#subscribed-tab"){if(!L){L=j(O,G,true,true,q,a,null);W=L.filter}else{g(O,L,l)}W.applyFilters(false,false)}else{if(r=="#topic-tab"){if(!H){H=j(e,G,true,true,q,null,function(){vBulletin.markreadcheck()});U=H.filter}else{g(e,H,l)}U.applyFilters(false,true)}else{if(r=="#media-tab"){if(!b){b=A(".conversation-toolbar-wrapper.scrolltofixed-floating",K);D=new vBulletin.scrollToFixed({element:b,limit:Q(b)});var n=new vBulletin.history.instance(E);if(n.isEnabled()){var p=n.getState();if(!p||A.isEmptyObject(p.data)){var m={from:"filter",page:1,tab:r,filters:vBulletin.getSelectedFilters(A("form.toolbar-filter-overlay",l))};n.setDefaultState(m,document.title,location.href)}n.setStateChange(function(v,w,t){var u=n.getState();if(u.data.from=="filter"){n.log(u.data,u.title,u.url);if(r!=u.data.tab){vBulletin.selectTabByIndex.call(A(o).closest(".ui-tabs-nav"),o.index())}else{var s=A('.media-filter-overlay input[name="filter_time"][value="{0}"]'.format(u.data.filters.filter_time),l).prop("checked",true);if(s.hasClass("js-default-checked")&&s.prop("defaultChecked")){A(".filtered-by .x",l).trigger("click")}else{s.trigger("change",[true])}}}},"filter")}if(k==r){R=false}}else{R=true}if(R&&A("#profileMediaDetailContainer .album-detail",l).length==0){if(!F){F=vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE)}loadGalleryById({nodeid:-2,channelid:pageData.channelid,pageno:1,dateFilter:A(".filter-options input[name=filter_time]:checked",l).val()||"time_lastweek",perpage:F},true,0,{complete:function(){A(".profile-toolbar .media-toolbar-filter",K).removeClass("h-hide");D.updateLimit(Q(b))}})}}}}}};vBulletin.tabify.call(G,{tabHistory:I,getTabIndexByHash:i,allowHistory:E,tabParamAsQueryString:true,hash:G.find(".js-module-top-anchor").attr("id"),tabOptions:{active:S,beforeActivate:function(n,o){if(Y){Y.hideFilterOverlay()}if(U){U.hideFilterOverlay()}if(W){W.hideFilterOverlay()}var m=G.find(".widget-tabs-panel .ui-tabs-panel:visible");var l=m.find(".list-item-body-wrapper.edit-post .edit-conversation-container");if(l.length>0){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:vBulletin.phrase.get("you_have_a_pending_edit_unsaved"),iconType:"warning",onAfterClose:function(){vBulletin.animateScrollTop(l.closest(".list-item").offset().top,{duration:"slow"})}});return false}},create:function(l,m){d(m.tab,m.panel,m.panel.selector)},activate:function(l,m){d(m.newTab,m.newPanel,m.newPanel.selector)}}});X.off("click",".list-item-poll .view-more-ctrl").on("click",".view-more-ctrl",function(m){var l=A(this).closest("form.poll");var n=l.find("ul.poll");A(this).addClass("h-hide");n.css("max-height","none").find("li.h-hide").slideDown(100,function(){l.find(".js-button-group").removeClass("h-hide").next(".view-less-ctrl").removeClass("h-hide");vBulletin.animateScrollTop(l.offset().top,{duration:"fast"})});return false});X.off("click",".list-item-poll .view-less-ctrl").on("click",".view-less-ctrl",function(m){var l=A(this).closest("form.poll");vBulletin.conversation.limitVisiblePollOptionsInAPost(l,3);l.find("ul.poll").css("max-height","").find("li.h-hide").slideUp(100);return false});X.off("click",".js-post__history").on("click",".js-post__history",vBulletin.conversation.showPostHistory);X.off("click",".js-post-control__ip-address").on("click",".js-post-control__ip-address",vBulletin.conversation.showIp);X.off("click",".js-post-control__edit").on("click",".js-post-control__edit",function(l){vBulletin.conversation.editPost.apply(this,[l,Y])});X.off("click",".js-post-control__vote").on("click",".js-post-control__vote",function(l){if(A(l.target).closest(".bubble-flyout").length==1){vBulletin.conversation.showWhoVoted.apply(l.target,[l])}else{vBulletin.conversation.votePost.apply(this,[l])}return false});X.off("click",".js-post-control__flag").on("click",".js-post-control__flag",vBulletin.conversation.flagPost);X.off("click",".js-post-control__comment").on("click",".js-post-control__comment",vBulletin.conversation.toggleCommentBox);X.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(l){vBulletin.conversation.postComment.apply(this,[l,function(){Y.updatePageNumber(1).applyFilters(false,true)}])});vBulletin.conversation.bindEditFormEventHandlers("all");A(document).off("dblclick",".js-cell-topic").on("dblclick",".js-cell-topic",vBulletin.conversation.editTopicTitle);A(document).off("dblclick",".js-open-close-topic").on("dblclick",".js-open-close-topic",vBulletin.conversation.openOrCloseTopic)})})(jQuery);; - -// *************************** -// js.compressed/link.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["attach_link","please_enter_link_url"]);(function(A){A(document).ready(function(){vBulletin.conversation.bindEditFormEventHandlers("link");A(".b-content-entry .b-content-entry-panel__content--link").each(function(){A("body").trigger("link_editform_onload",[A(this)])})})})(jQuery);; - -// *************************** -// js.compressed/media.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["saving"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["postminchars","commentminchars"]);var galleryData={mediaTypeFilter:false,currentMediaPage:Number($("#mediaCurrentPage").val())||1,currentGalleryPage:1,currentNodeId:0,currentUserId:0,profileMediaDetailContainer:false,currentDateFilter:"time_lastmonth"};var $mediaTab=$("#media-tab"),allowHistory,filterHistory,hash;window.vBulletin.media=window.vBulletin.media||{};(function(A){var B=["#media-tab"];if(!vBulletin.pageHasSelectors(B)){return false}window.vBulletin.media.calculatePhotosPerPage=function(D){D=D||50;var C=A("#profileMediaDetailContainer").is(":visible");if(!C){A("#profileMediaDetailContainer").removeClass("h-hide")}var E=Math.floor(A("#profileMediaDetailContainer").width()/128);if(!C){A("#profileMediaDetailContainer").addClass("h-hide")}return(D%E==0||D<=E)?D:D-(D%E)};A(document).ready(function(){A(document).off("click","#mediaList .albumLink").on("click","#mediaList .albumLink",loadGallery);var C=false;$mediaTab.off("click",".profile-media-createvideo, .profile-media-upload").on("click",".profile-media-createvideo, .profile-media-upload",function(E){var D=A(this).hasClass("profile-media-upload")?"gallery":"video";if(!C){C=A(E.target).closest(".ui-widget-content").find(".profileMediaEditContainer").dialog({modal:true,autoOpen:false,width:800,title:vBulletin.phrase.get("profile_media"),resizable:false,closeOnEscape:false,showCloseButton:false,dialogClass:"dialog-container dialog-box edit-media-upload-dialog js-profile-media",close:function(){A(document).data("gallery-container",null)}});vBulletin.upload.initializePhotoUpload(C)}C.off("dialogopen").on("dialogopen",function(F,G){C.find('.b-toolbar__item[data-panel="b-content-entry-panel__content--{0}"]:not(.b-toolbar__item--active)'.format(D)).trigger("click");vBulletin.ckeditor.initEditorComponents(C);A(document).data("gallery-container",A(this).find(".b-content-entry-panel__content--"+D))}).dialog("open")});$mediaTab.off("click","#profileMediaDetailContainer .more-gallery").on("click","#profileMediaDetailContainer .more-gallery",getMorePhotos);$mediaTab.off("click",".profile-media-backbtn").on("click",".profile-media-backbtn",function(E){A("#profileMediaDetailContainer").addClass("h-hide");A("#mediaPreviousPage").closest(".pagenav-controls-container").removeClass("h-hide");A("#profileMediaContainer").removeClass("h-hide");A(".media-tab .profile-toolbar .toolset-left > li").addClass("h-hide").has(".profile-media-upload, .profile-media-createvideo").removeClass("h-hide");galleryData.currentDateFilter=A(this).closest(".conversation-toolbar-wrapper").find(".toolbar-filter-overlay input[name=filter_time]:checked").val();A(".profile-toolbar .media-toolbar-filter").addClass("h-hide");A(this).closest(".conversation-toolbar-wrapper").find(".filtered-by").addClass("h-hide").find(".filter-text-wrapper").empty();var D={totalpages:Number(A("#mediaList").data("totalpages")),totalcount:Number(A("#mediaList").data("totalcount")),currentpage:galleryData.currentMediaPage};setPagination(D)});$mediaTab.off("change","#mediaCurrentPage").on("change","#mediaCurrentPage",goMediaPage);$mediaTab.off("click","#mediaPreviousPage, #mediaNextPage").on("click","#mediaPreviousPage, #mediaNextPage",goMediaPage);galleryData.profileMediaDetailContainer=A("#profileMediaDetailContainer").clone();A(document).off("afterSave",".js-album-detail .js-post__content-wrapper .js-content-entry form").on("afterSave",".js-album-detail .js-post__content-wrapper .js-content-entry form",function(E,D){loadGalleryById(galleryData.currentFilter);return false});A(document).off("afterCancel",".js-album-detail .js-post__content-wrapper .js-content-entry form").on("afterCancel",".js-album-detail .js-post__content-wrapper .js-content-entry form",function(D){loadMediaPage(galleryData.currentMediaPage);return true});A(document).off("afterSave",".js-profile-media .js-content-entry form").on("afterSave",".js-profile-media .js-content-entry form",function(G,F){var I=A(".b-toolbar__item--active",this).data("panel");if(I=="b-content-entry-panel__content--gallery"){var D=A("#mediaList"),H=Number(D.data("totalpages")),J=Number(D.data("totalcount")),E=(J%vBulletin.media.ALBUMS_PERPAGE)==0?H+1:H;if(F.alert){openAlertDialog({title:vBulletin.phrase.get("media"),message:vBulletin.phrase.get(F.alert),iconType:"alert"})}loadMediaPage(E)}else{loadMediaPage(1)}return false});if($mediaTab.length){allowHistory=$mediaTab.find(".conversation-toolbar-wrapper").data("allow-history")=="1";filterHistory=new vBulletin.history.instance(allowHistory);hash=$mediaTab.closest(".canvas-widget").find(".js-module-top-anchor").attr("id");$mediaTab.off("click",".media-toolbar-filter").on("click",".media-toolbar-filter",function(D){A(".filter-wrapper",this).toggleClass("selected");A(".arrow .vb-icon",this).toggleClass("vb-icon-triangle-down-wide vb-icon-triangle-up-wide");A(D.target).closest(".conversation-toolbar-wrapper").find(".toolbar-filter-overlay").slideToggle("slow",function(){var E="media_filter";if(A(this).is(":visible")){A("body").off("click."+E).on("click."+E,function(H){if(A(H.target).closest(".toolbar-filter-overlay").length==0&&A(H.target).closest(".toolbar-filter").length==0){A("body").off("click."+E);A(".media-toolbar-filter").trigger("click")}});var G={};var F=vBulletin.isScrolledIntoView(this,G);if(!F){A("html,body").animate({scrollTop:"+="+Math.abs(G.bottom)},"fast")}}else{A("body").off("click."+E)}})});A("form.media-filter-overlay",$mediaTab).trigger("reset");$mediaTab.off("change",".media-filter-overlay input[type=radio]").on("change",".media-filter-overlay input[type=radio]",function(K,I){var E;if(!filterHistory.isEnabled()&&allowHistory){E=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(E,this.name,this.value,H,hash);return true}galleryData.currentDateFilter=this.value;var F=fetchMediaFilter(A(K.target));var H=A(".media-tab");if(H.data("perpage")){F.perpage=H.data("perpage")}loadGalleryById(F,true,0,H.data("callbacks"));if(!A(this).data("bypass-filter-display")){vBulletin.conversation.displaySelectedFilterText(this,this.value)}if(filterHistory.isEnabled()&&!I){var J=vBulletin.getSelectedFilters(A("form.toolbar-filter-overlay",H)),N=this.name,D=this.value,M=A(".conversation-toolbar-wrapper .filtered-by",H),G=H.data("url-path")?H.data("url-path"):"#"+H.attr("id"),L={from:"filter",page:1,tab:G,filters:J,filtervalue:D,filtername:N};if(!M.data("reset")){E=vBulletin.makePaginatedUrl(location.href,1);E=vBulletin.makeFilterUrl(E,N,D,H)}else{E=location.pathname.replace(/\/page[0-9]+/,"")}filterHistory.pushState(L,document.title,E);M.data("reset",null)}});$mediaTab.off("click",".filtered-by .x").on("click",".filtered-by .x",function(F){var D=A(this).closest(".filtered-by"),H=A(this).closest(".filter-text"),E=H.data("filter-name");if(!filterHistory.isEnabled()&&allowHistory){location.href=vBulletin.makeFilterUrl(location.href,E,H.data("filter-value"),$mediaTab,hash);return false}$defaultSelectedFilter=A(".toolbar-filter-overlay .filter-options input[name={0}]".format(E),$mediaTab).prop("checked",false).filter(".js-default-checked");H.remove();var G=D.find(".filter-text").length;if(G==0){D.addClass("h-hide");D.data("reset",true)}else{if(G==1){D.find(".clear-all").addClass("h-hide")}}if($defaultSelectedFilter.length==1){$defaultSelectedFilter.data("bypass-filter-display",true);$defaultSelectedFilter.trigger("click");$defaultSelectedFilter.data("bypass-filter-display",null)}})}})})(jQuery);doMediaFilters=function(A){$(".profMediaFilterRow").removeClass("filterSelected");$(A.target).addClass("filterSelected");if($(A.target).hasClass("profMediaFilterAllTypes")){galleryData.mediaTypeFilter=false}else{if($(A.target).hasClass("profMediaFilterGallery")){galleryData.mediaTypeFilter="gallery"}else{if($(A.target).hasClass("profMediaFilterVideo")){galleryData.mediaTypeFilter="video"}}}loadMediaPage(1)};loadMediaPage=function(A){$("body").css("cursor","wait");var B=$(".js-profile-media-container",$mediaTab);$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/profile_media_content",data:({userid:B.data("user-id"),pageno:A,perpage:B.data("perpage")}),type:"POST",dataType:"json",success:function(C){if(C.errors){openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get(C.errors[0][0]),iconType:"error"});console.log("/ajax/render/profile_media_content failed, error: "+JSON.stringify(C))}else{console.log("/ajax/render/profile_media_content successful");$("#mediacontent").html(C);$("#profileMediaDetailContainer").empty();$("#mediacontent").removeClass("h-hide");$("#profileMediaContainer").removeClass("h-hide");$(".media-tab .profile-toolbar .toolset-left > li").addClass("h-hide").has(".profile-media-upload, .profile-media-createvideo").removeClass("h-hide");$("#mediaPreviousPage").closest("pagenav-controls").removeClass("h-hide");$("#profileMediaDetailContainer").addClass("h-hide");$("#profileMediaContainer").removeClass("h-hide");galleryData.currentMediaPage=A;var D={totalpages:Number($("#mediaList").data("totalpages")),totalcount:Number($("#mediaList").data("totalcount")),currentpage:A};setPagination(D);if(!vBulletin.isScrolledIntoView($("#profileTabs .profile-tabs-nav"))){$("html,body").animate({scrollTop:$("#profileTabs .profile-tabs-nav").offset().top},"slow")}}},error:function(E,D,C){console.log("/ajax/render/profile_media_content failed, error: "+C);console.log("response:"+E.responseText);console.log("status:"+D);console.log("code:"+E.status);openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})},complete:function(){$("body").css("cursor","auto")}})};goMediaPage=function(C){var B=this.id;if($("#profileMediaDetailContainer").is(":visible")){gotoGalleryPage(C);return false}if(B=="mediaCurrentPage"){var D=parseInt($("#mediaCurrentPage").val());if(D>0&&D<=parseInt($("#mediaPageCount").html())){loadMediaPage(D);pushHistoryState(D)}else{$("#mediaCurrentPage").val(galleryData.currentMediaPage)}}else{if(B=="mediaPreviousPage"){if(galleryData.currentMediaPage>1){var A=galleryData.currentMediaPage-1;loadMediaPage(A);pushHistoryState(A)}else{$("#mediaPreviousPage").addClass("h-disabled")}}else{if(B=="mediaNextPage"){if(galleryData.currentMediaPage li").filter('li:has(a[href*="#{0}"])'.format($mediaTab.attr("id")));if(C.hasClass("ui-tabs-active")){loadMediaPage(E.data.page)}else{var D=C.index();vBulletin.selectTabByIndex.call(B,D)}}},"media_filter")}};gotoGalleryPage=function(C){if(!galleryData.currentNodeId&&!galleryData.currentUserId){return false}var A=C.target.id;if(A=="mediaCurrentPage"){targetPage=parseInt($("#mediaCurrentPage").val());if(targetPage>0&&targetPage<=parseInt($("#mediaPageCount").html())){var B={nodeid:galleryData.currentNodeId,userid:galleryData.currentUserId,pageno:targetPage,perpage:vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE),datefilter:galleryData.currentDateFilter};loadGalleryById(B)}else{$("#mediaCurrentPage").val(galleryData.currentGalleryPage)}}else{if(A=="mediaPreviousPage"){if(galleryData.currentGalleryPage>1){var B={nodeid:galleryData.currentNodeId,userid:galleryData.currentUserId,pageno:galleryData.currentGalleryPage-1,perpage:vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE),datefilter:galleryData.currentDateFilter};loadGalleryById(B)}else{$("#mediaPreviousPage ").addClass("h-disabled")}}else{if(A=="mediaNextPage"){if(galleryData.currentGalleryPage1)?"removeClass":"addClass"]("h-hide");if(B.is(":visible")){$("#mediaPreviousPage")[(A.currentpage<=1)?"addClass":"removeClass"]("h-disabled");$("#mediaNextPage")[(A.currentpage>=A.totalpages)?"addClass":"removeClass"]("h-disabled");$("#mediaCurrentPage").val(A.currentpage);$("#mediaPageCount").text(A.totalpages)}};loadGalleryById=function(B,E,F,H){var C=$("#profileMediaDetailContainer"),D={nodeid:galleryData.currentNodeId,userid:galleryData.currentUserId,channelid:0,pageno:1,dateFilter:galleryData.currentDateFilter,albumid:0};B=$.extend({},D,B);if(!isNaN(B.nodeid)){$("body").css("cursor","wait");var I;if(B.nodeid==-1){I="profile_media_videolist"}else{I="profile_textphotodetail"}if(C.closest(".media-tab").length==0){$(".media-tab").append(galleryData.profileMediaDetailContainer)}$("#profileMediaContainer").closest(".tab").find("li.list-item-gallery").remove();var A=vBulletin.getAjaxBaseurl()+"/ajax/render/"+I;var G={nodeid:B.nodeid,userid:B.userid,channelid:B.channelid,pageno:B.pageno,albumid:B.albumid,viewMore:F};if(B.dateFilter){G.dateFilter=B.dateFilter}if(B.perpage){G.perpage=B.perpage}$.ajax({url:A,type:"POST",data:G,dataType:"json",success:function(J){if(J.errors){openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get(J.errors[0][0]),iconType:"error"});if(H&&typeof H.error=="function"){H.error()}}else{galleryData.currentNodeId=B.nodeid;galleryData.currentUserId=B.userid;galleryData.currentGalleryPage=B.pageno;if(F){$(".album-detail .photo-preview").append(J);$(".more-gallery",C)[(galleryData.currentGalleryPage<$(".album-detail").data("totalpages"))?"removeClass":"addClass"]("h-hide-imp")}else{C.html(J);C.addClass("list-item").attr("data-nodeid",B.nodeid);$("#profileMediaContainer").addClass("h-hide");$(".media-tab .profile-toolbar .toolset-left > li").removeClass("h-hide").has(".profile-media-upload, .profile-media-createvideo").addClass("h-hide");C.removeClass("h-hide");$("#mediaPreviousPage").closest(".pagenav-controls-container").addClass("h-hide");$(".profile-media-uploadphotos",C).click(loadPhotoUploader);if(B.perpage){$(".media-tab").data("perpage",B.perpage).data("callbacks",H)}}}if(B.nodeid==-1){var K={totalpages:Number($(".media-video-list",C).data("totalpages")),totalcount:Number($(".media-video-list",C).data("totalcount")),currentpage:galleryData.currentGalleryPage};setPagination(K)}if(!E){}$(".profile-toolbar .media-toolbar-filter").removeClass("h-hide");if(H&&typeof H.success=="function"){H.success()}},error:function(L,K,J){console.log("/ajax/render/{0} failed, error: {1}".format(I,J));openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"});if(H&&typeof H.error=="function"){H.error()}},complete:function(){$("body").css("cursor","auto");if(H&&typeof H.complete=="function"){H.complete()}}})}};loadPhotoUploader=function(C){$(document).data("gallery-container",$(this).closest(".album-detail"));var A=vBulletin.upload.getUploadedPhotosDlg(false);var B=A.data("nodeid");if(!B||isNaN(parseInt(B))){return }$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/media_addphotos",data:{nodeid:B},type:"POST",dataType:"json",success:function(D){if(D.errors){openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get(D.errors[0][0]),iconType:"warning",onAfterClose:function(){A.dialog("close")}})}else{A.html(D);vBulletin.upload.initializePhotoUpload(A.parent());A.find(".js-save-button").off("click").on("click",saveGalleryPhotos);A.find(".js-cancel-button").off("click").on("click",function(E){A.dialog("close")});vBulletin.upload.relocateLastInRowClass(A.find(".photo-item-wrapper"));if($(".photo-display .photo-item-wrapper:not(.h-hide)",A).length>0){vBulletin.upload.changeButtonText($(".b-button--upload .js-upload-label",A),vBulletin.phrase.get("upload_more"));$(".js-save-button",A).show()}else{$(".js-save-button",A).hide()}A.dialog("open");vBulletin.upload.adjustPhotoDialogForScrollbar(A)}},error:function(F,E,D){console.log("/ajax/render/media_addphotos failed, error: "+D);openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error",onAfterClose:function(){A.dialog("close")}})}})};loadGallery=function(B){var A=fetchMediaFilter($(this));A.pageno=1;A.perpage=vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE);galleryData.currentDateFilter=$(this).closest(".js-profile-media-container").find(".toolbar-filter-overlay input[name=filter_time]:checked").val();galleryData.currentFilter=A;loadGalleryById(A)};getMorePhotos=function(D){var C=$(".media-tab").data("perpage");var B=$(".media-tab").data("callbacks");var A=fetchMediaFilter($(this));A.pageno=galleryData.currentGalleryPage+1;if(C){A.perpage=C}loadGalleryById(A,false,1,B)};saveGalleryPhotos=function(D){var C=$(D.target).closest(".profile-media-photoupload-dialog"),A=$(D.target).closest("form");if(A.length>0){$(D.target).closest(".photo-display-container").find(".photo-item-wrapper:not(.h-hide)").each(function(E,G){var F=parseInt($(G).find(".filedataid").val());if(!isNaN(F)){A.append('');$('').val($(G).find("textarea").val()).appendTo(A)}});var B=$("button",A).prop("disabled",true);$.ajax({url:A.attr("action"),data:A.serializeArray(),type:"POST",success:function(E){if(E.errors){if(typeof (E.errors[0])=="undefined"){openAlertDialog({title:vBulletin.phrase.get("media"),message:vBulletin.phrase.get(E.errors),iconType:"error"})}else{openAlertDialog({title:vBulletin.phrase.get("media"),message:vBulletin.phrase.get(E.errors[0]),iconType:"error"})}}else{C.dialog("close");loadMediaPage(galleryData.currentMediaPage)}},error:function(G,F,E){console.log(A.attr("action")+" failed, error: "+E);openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})},complete:function(){B.prop("disabled",false)}})}else{C.dialog("close")}};fetchMediaFilter=function(A){var C;if($("#profileMediaContainer").is(":visible")){C=$("#profileMediaContainer")}else{if($("#profileMediaDetailContainer").is(":visible")){C=$("#profileMediaDetailContainer")}}var B={nodeid:parseInt(A.data("nodeid"),10)||parseInt(C.attr("data-nodeid"),10),userid:parseInt(C.data("userid"),10),channelid:parseInt(C.data("channelid"),10),dateFilter:galleryData.currentDateFilter,albumid:parseInt(A.data("albumid"),10)};if(isNaN(B.channelid)){B.channelid=0}if(isNaN(B.nodeid)){B.nodeid=0}if(B.nodeid>0){B.userid=0}else{if(isNaN(B.userid)){B.userid=0}}if(isNaN(B.albumid)){B.albumid=0}return B};; - -// *************************** -// js.compressed/sb_activity.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["blog_memberblogLabel","edit_conversation","forum","you_have_a_pending_edit_unsaved"]);(function(A){var B=[".forum-activity-stream-widget",".bloghome-widget",".search-widget"];if(!vBulletin.pageHasSelectors(B)){return false}A(document).ready(function(){vBulletin.conversation=vBulletin.conversation||{};var P=vBulletin.conversation.$activityStreamWidget=A(".activity-stream-widget"),D=vBulletin.conversation.$activityStreamTab=A("#activity-stream-tab");if(D.length==0){D=vBulletin.conversation.$activityStreamTab=A("#article-tab")}var K=vBulletin.conversation.$subscribedTab=A("#subscribed-tab"),L=vBulletin.conversation.$activityStreamList=A(".conversation-list",D),Y=vBulletin.conversation.$subscribedList=A(".conversation-list",K),E,U,a,W,i,V=A(".conversation-list",P),T,e;if(P.hasClass("forum-activity-stream-widget")||P.hasClass("bloghome-widget")){var H=P.find(".widget-tabs-nav .ui-tabs-nav > li"),R=H.filter(".ui-tabs-active"),Q=R.index(),h,b={},N=H.parent().data("allow-history")=="1",C=new vBulletin.history.instance(N),M=P.find(".js-module-top-anchor").attr("id");if(Q==-1){Q=0;R=H.first()}h=R.find("> a").attr("href");var O=function(j){var k=(P.offset().top+(P.outerHeight()-parseFloat(P.css("border-bottom-width")))-j.height());return k};var f=function(j){j=j||h;return H.filter('li:has(a[href*="'+j+'"])').first().index()};var X=function(q,n,p,o,s,j){var l=A(".conversation-toolbar-wrapper.scrolltofixed-floating",q),m=new vBulletin.scrollToFixed({element:l,limit:O(l)}),k=null,r;if(o){r=new vBulletin.pagination({context:q,allowHistory:p,onPageChanged:function(t,u){k.updatePageNumber(t);if(!u){k.applyFilters(false,true,false,true)}}})}k=new vBulletin.conversation.filter({context:q,autoCheck:s?A(".toolbar-filter-overlay input[type=radio][value=conversations_on]",q).is(":checked"):undefined,scrollToTop:n,pagination:r,allowHistory:p,onContentLoad:j});return{"$bar":l,"$floating":m,pagination:r,filter:k}};var S=function(j){vBulletin.truncatePostContent(j);vBulletin.conversation.processPostContent(j)};var d=function(m,l,j){var k=l.filter;if(l.pagination){l.pagination.setOption("context",m)}k.setOption("context",m);if(typeof k.lastFilters!="undefined"&&A(".conversation-empty:not(.h-hide)",j).length>0){delete k.lastFilters}};var g=function(p,m,o,n,r,k,l,s){var q=X(p,m,n,r,function(){q.$floating.updateLimit(O(q.$bar));if(l){S(l)}if(s){s()}});var j=q.filter;if(k){if(l){S(l)}j.lastFilters={filters:j.getSelectedFilters(A(".toolbar-filter-overlay",p))}}return q};var I=function(k){var j=A(".toolbar-pagenav",k);if(j.length>0){new vBulletin.pagination({context:k,allowHistory:b[k.id],onPageChanged:function(m,l){if(!l){var n=A(".js-button-filter.js-checked",k).data("filter-value");G(m,n,false,true)}}})}};var J=function(k,j){if(j){k.removeClass("h-disabled").attr("href",j.replace(/&/g,"&"))}else{k.addClass("h-disabled").removeAttr("href")}};var G=function(n,k,r,q,j,s){r=r||1;q=q||"show_all";A(".js-button-filters .js-button-filter",k).removeClass("js-checked").filter('[data-filter-value="{0}"]'.format(q)).addClass("js-checked");var m=vBulletin.makePaginatedUrl(location.href,r);if(!j){if(i.isEnabled()){m=vBulletin.makeFilterUrl(m,"filter_blogs",q,k);var l=i.getState(),p={from:"filter_blogs",page:r,tab:hash,filters:{filter_blogs:q}};i[(l&&l.data&&l.data.from&&l.data.from!="filter_blogs")?"setDefaultState":"pushState"](p,document.title,m)}else{if(b[panelId]){m=vBulletin.makeFilterUrl(m,"filter_blogs",q,k,M);location.href=m;return false}}}var o={tab:k.selector.replace("#",""),filter_blogs:q=="show_all"?undefined:q};vBulletin.AJAX({call:"/ajax/render/blogmember_tab",data:{from:r,my:q,noToolbar:s,page:o,blogChannelId:n.data("blog-channel-id")},error_phrase:"unable_to_contact_server_please_try_again",success:function(w){var u=A(w);if(u.filter(".conversation-toolbar-wrapper").length){A(k).html(w);I(k)}else{A(".blogmember-list",k).hide().replaceWith(u).show();var t=u.data("pagination");if(t&&typeof t=="object"&&!A.isEmptyObject(t)){A(".pagenav-form .js-pagenum",k).val(t.currentpage);A(".pagenav-form .pagetotal",k).text(t.totalpages);var v=A(".pagenav-form .arrow",k);J(v.filter("[rel=prev]"),t.prevurl);J(v.filter("[rel=next]"),t.nexturl)}A(".conversation-toolbar-wrapper",k).removeClass("h-hide")}}})};var c=function(p,m,j,n){var n=j.selector;panelId=j.id,isDefault=(h==n);if(typeof b[panelId]=="undefined"){b[panelId]=A(".conversation-toolbar-wrapper",j).data("allow-history")=="1"}if(W&&n!="#activity-stream-tab"&&n!="#article-tab"){W.toggleNewConversations(false)}if(U&&n=="#subscribed-tab"){U.toggleNewConversations(false)}if(n=="#memberblog-tab"){var l=false;if(!l){l=true;A(j).on("click",".js-button-filter",function(u,s){var t=A(this).data("filter-value");G(p,j,1,t,s,true)})}if(!i){i=vBulletin.history.instance(b[j.id]);if(i.isEnabled()){var k=i.getState();if(!k||A.isEmptyObject(k.data)){var q={from:"filter_blogs",page:Number(A(".pagenav-form .defaultpage",j).val())||1,tab:n,filters:{filter_blogs:A(".js-button-filter.js-checked",j).data("filter-value")}};i.setDefaultState(q,document.title,location.href)}i.setStateChange(function(w){var v=i.getState();if(v.data.from=="filter_blogs"){i.log(v.data,v.title,v.url);var s=p.tabs("option","selected"),t=p.find(".ui-tabs-nav > li").eq(s).find("a").attr("href");if(t!=v.data.tab){var u=f(v.data.tab);vBulletin.selectTabByIndex.call(p,u)}else{G(p,j,v.data.page,v.data.filters.filter_blogs,true,true)}}},"filter")}}if(h==n){I(j)}var o=A(".conversation-list",j);if(!o.hasClass("dataLoaded")){if(h==n&&!e){e=true;return false}A(".conversation-empty",j).addClass("h-hide");G(p,j)}return }else{if(n=="#activity-stream-tab"||n=="#article-tab"){if(!W){a=g(D,P,b[panelId],true,true,isDefault,L,null);W=a.filter}else{d(D,a,j)}W.applyFilters(false,true)}else{if(n=="#subscribed-tab"){if(!U){E=g(K,P,b[panelId],true,true,isDefault,Y,null);U=E.filter}else{d(K,E,j)}U.applyFilters(false,true)}else{if(n=="#forum-tab"){var r=A(j);if(r.hasClass("dataLoaded")){if(h==n){vBulletin.markreadcheck()}return false}else{if(h==n&&!T){T=true;return false}}A(".conversation-empty",j).addClass("h-hide");A.post(vBulletin.getAjaxBaseurl()+"/ajax/render/display_Forums_tab",function(s){r.html(s).addClass(function(){var t=A(".conversation-empty",this);if(t.length==0){return"dataLoaded"}else{t.removeClass("h-hide");return""}})},"json").error(function(u,t,s){console.log("/ajax/render/display_Forums_tab failed. Error: "+s);openAlertDialog({title:vBulletin.phrase.get("forum"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}).complete(function(){vBulletin.markreadcheck()})}}}}};H.removeClass("ui-state-disabled");vBulletin.tabify.call(P,{tabHistory:C,getTabIndexByHash:f,allowHistory:N,tabParamAsQueryString:true,hash:M,tabOptions:{active:Q,beforeActivate:function(l,m){if(W){W.hideFilterOverlay()}if(U){U.hideFilterOverlay()}var k=P.find(".widget-tabs-panel .ui-tabs-panel:visible");var j=k.find(".list-item-body-wrapper.edit-post .edit-conversation-container");if(j.length>0){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:vBulletin.phrase.get("you_have_a_pending_edit_unsaved"),iconType:"warning",onAfterClose:function(){vBulletin.animateScrollTop(j.closest(".list-item").offset().top,{duration:"slow"})}});return false}},create:function(j,k){c(A(this),k.tab,k.panel,k.panel.selector)},activate:function(j,k){c(A(this),k.newTab,k.newPanel,k.newPanel.selector)}}});var F=0;P.find(".ui-tabs-nav li").each(function(){F+=A(this).width()});var Z=P.find(".ui-tabs-nav").width();if(F>Z){P.find(".widget-tabs-nav, .module-title").height(P.find(".ui-tabs-nav").height())}}vBulletin.truncatePostContent(".search-widget");P.off("click",".list-item-poll .view-more-ctrl").on("click",".list-item-poll .view-more-ctrl",function(k){var j=A(this).closest("form.poll");var l=j.find("ul.poll");A(this).addClass("h-hide");l.css("max-height","none").find("li.h-hide").slideDown(100,function(){j.find(".js-button-group").removeClass("h-hide").next(".view-less-ctrl").removeClass("h-hide");vBulletin.animateScrollTop(j.offset().top,{duration:"fast"})});return false});P.off("click",".list-item-poll .view-less-ctrl").on("click",".list-item-poll .view-less-ctrl",function(k){var j=A(this).closest("form.poll");vBulletin.conversation.limitVisiblePollOptionsInAPost(j,3);j.find("ul.poll").css("max-height","").find("li.h-hide").slideUp(100);return false});V.off("click",".js-post-control__edit").on("click",".js-post-control__edit",function(j){vBulletin.conversation.editPost.apply(this,[j,W])});V.off("click",".js-post__history").on("click",".js-post__history",vBulletin.conversation.showPostHistory);V.off("click",".js-post-control__ip-address").on("click",".js-post-control__ip-address",vBulletin.conversation.showIp);V.off("click",".js-post-control__vote").on("click",".js-post-control__vote",function(j){if(A(j.target).closest(".bubble-flyout").length==1){vBulletin.conversation.showWhoVoted.apply(j.target,[j])}else{vBulletin.conversation.votePost.apply(this,[j])}return false});V.off("click",".js-post-control__flag").on("click",".js-post-control__flag",vBulletin.conversation.flagPost);V.off("click",".js-post-control__comment").on("click",".js-post-control__comment",vBulletin.conversation.toggleCommentBox);V.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(j){vBulletin.conversation.postComment.apply(this,[j,function(){W.updatePageNumber(1).applyFilters(false,true)}])});vBulletin.conversation.bindEditFormEventHandlers("all")})})(jQuery);; - -// *************************** -// js.compressed/hv.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -(function(A){window.vBulletin=window.vBulletin||{};vBulletin.hv=vBulletin.hv||{};vBulletin.hv.reset=function(B){var C;if($(".humanverify.humanverify_image").length>0){$(".humanverify.humanverify_image .refresh_imagereg").click();C=$(".humanverify.humanverify_image .imageregt")}else{if($(".humanverify.humanverify_recaptcha").length>0&&Recaptcha&&typeof Recaptcha.reload=="function"){Recaptcha.reload()}else{if($(".humanverify.humanverify_question").length>0){$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/humanverify",data:{action:"register"},type:"POST",dataType:"json",success:function(D){$(".humanverify.humanverify_question").replaceWith(D);if(B){$(".humanverify.humanverify_question .answer").focus()}}});C=$(".humanverify.humanverify_question .answer")}}}if(B&&C&&C.length>0){C.focus()}};vBulletin.hv.imagereg=vBulletin.hv.imagereg||{};vBulletin.hv.imagereg.init=function(B){if(typeof B=="undefined"||B.length==0){B=$(document)}$(".humanverify_image",B).each(function(){var C=$(this);$(".refresh_imagereg",C).off("click").on("click",C,vBulletin.hv.imagereg.fetch_image);$(".imagereg",C).off("click").on("click",C,vBulletin.hv.imagereg.fetch_image);$(".refresh_imagereg",C).removeClass("h-hide")})};vBulletin.hv.imagereg.fetch_image=function(C){var B=C.data;$(".progress_imagereg",B).removeClass("h-hide");$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/hv/generateToken",type:"POST",dataType:"json",success:function(D){if(!D.errors){var E=D.hash;$("input.hash",B).val(E);$(".imagereg",B).attr("src",pageData.baseurl+"/hv/image?hash="+E);$(".imageregt",B).val("")}},complete:function(){$(".progress_imagereg",B).addClass("h-hide")}});return false};vBulletin.hv.initHvForPostAction=function(B){if(!pageData.showhv_post||B.closest(".edit-post").length>0){return }$(".content-entry-box .humanverify").remove();vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/humanverify",data:{action:"post"},title_phrase:"error",error_phrase:"error_loading_humanverify_form",success:function(C){$(".content_entry_box_buttons",B).before(C);if($(".humanverify.humanverify_image",B).length>0){vBulletin.hv.imagereg.init(B)}}})};$(document).ready(function(){vBulletin.hv.imagereg.init();if(typeof (window.vBulletin.hv_script)!="undefined"&&typeof (window.vBulletin.delayedInit)!="undefined"&&window.vBulletin.delayedInit){$.getScript(window.vBulletin.hv_script,function(){reloadRecaptcha()})}})})(jQuery);; - diff --git "a/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/header-rollup-522.js.t\303\251l\303\251chargement" "b/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/header-rollup-522.js.t\303\251l\303\251chargement" deleted file mode 100644 index 9d00fef..0000000 --- "a/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/header-rollup-522.js.t\303\251l\303\251chargement" +++ /dev/null @@ -1,24 +0,0 @@ -// *************************** -// js.compressed/modernizr.min.js -// *************************** -/* Modernizr 2.6.1 (Custom Build) | MIT & BSD - * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexbox_legacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-hashchange-history-input-inputtypes-touch-shiv-mq-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-cookies-css_backgroundposition-shorthand-css_boxsizing-css_filters-css_lastchild-css_mediaqueries-css_overflow_scrolling-css_pointerevents-css_remunit-css_resize-css_scrollbars-css_subpixelfont-file_api-forms_fileinput-forms_placeholder-forms_validation-load - */ -;window.Modernizr=function(a,b,c){function C(a){j.cssText=a}function D(a,b){return C(n.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a){var e=a[d];if(!F(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:E(f,"function")?f.bind(d||b):f}return!1}function I(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return E(b,"string")||E(b,"undefined")?G(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),H(e,b,c))}function J(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),k.id=h,(l?k:m).innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},y=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return x("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},z=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=E(e[d],"function"),E(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),A={}.hasOwnProperty,B;!E(A,"undefined")&&!E(A.call,"undefined")?B=function(a,b){return A.call(a,b)}:B=function(a,b){return b in a&&E(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=v.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(v.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(v.call(arguments)))};return e}),r.flexbox=function(){return I("flexWrap")},r.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:x(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},r.hashchange=function(){return z("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return!!a.history&&!!history.pushState},r.rgba=function(){return C("background-color:rgba(150,255,150,.5)"),F(j.backgroundColor,"rgba")},r.hsla=function(){return C("background-color:hsla(120,40%,100%,.5)"),F(j.backgroundColor,"rgba")||F(j.backgroundColor,"hsla")},r.multiplebgs=function(){return C("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},r.backgroundsize=function(){return I("backgroundSize")},r.borderimage=function(){return I("borderImage")},r.borderradius=function(){return I("borderRadius")},r.boxshadow=function(){return I("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){return D("opacity:.55"),/^0.55$/.test(j.opacity)},r.cssanimations=function(){return I("animationName")},r.csscolumns=function(){return I("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return C((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),F(j.backgroundImage,"gradient")},r.cssreflections=function(){return I("boxReflect")},r.csstransforms=function(){return!!I("transform")},r.csstransforms3d=function(){var a=!!I("perspective");return a&&"webkitPerspective"in g.style&&x("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},r.csstransitions=function(){return I("transition")},r.fontface=function(){var a;return x('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},r.generatedcontent=function(){var a;return x(['#modernizr:after{content:"',l,'";visibility:hidden}'].join(""),function(b){a=b.offsetHeight>=1}),a};for(var K in r)B(r,K)&&(w=K.toLowerCase(),e[w]=r[K](),u.push((e[w]?"":"no-")+w));return e.input||J(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)B(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},C(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=y,e.hasEvent=z,e.testProp=function(a){return G([a])},e.testAllProps=I,e.testStyles=x,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+u.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f9)}),Modernizr.addTest("lastchild",function(){return Modernizr.testStyles("#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}",function(a){return a.lastChild.offsetWidth>a.firstChild.offsetWidth},2)}),Modernizr.addTest("boxsizing",function(){return Modernizr.testAllProps("boxSizing")&&(document.documentMode===undefined||document.documentMode>7)}),Modernizr.addTest("mediaqueries",Modernizr.mq("only all")),Modernizr.addTest("overflowscrolling",function(){return Modernizr.testAllProps("overflowScrolling")}),Modernizr.addTest("cssremunit",function(){var a=document.createElement("div");try{a.style.fontSize="3rem"}catch(b){}return/rem/.test(a.style.fontSize)}),Modernizr.addTest("subpixelfont",function(){var a,b="#modernizr{position: absolute; top: -10em; visibility:hidden; font: normal 10px arial;}#subpixel{float: left; font-size: 33.3333%;}";return Modernizr.testStyles(b,function(b){var c=b.firstChild;c.innerHTML="This is a text written in Arial",a=window.getComputedStyle?window.getComputedStyle(c,null).getPropertyValue("width")!=="44px":!1},1,["subpixel"]),a}),Modernizr.addTest("pointerevents",function(){var a=document.createElement("x"),b=document.documentElement,c=window.getComputedStyle,d;return"pointerEvents"in a.style?(a.style.pointerEvents="auto",a.style.pointerEvents="x",b.appendChild(a),d=c&&c(a,"").pointerEvents==="auto",b.removeChild(a),!!d):!1}),Modernizr.addTest("cssresize",Modernizr.testAllProps("resize")),Modernizr.addTest("cssscrollbar",function(){var a,b="#modernizr{overflow: scroll; width: 40px }#"+Modernizr._prefixes.join("scrollbar{width:0px} #modernizr::").split("#").slice(1).join("#")+"scrollbar{width:0px}";return Modernizr.testStyles(b,function(b){a="scrollWidth"in b&&b.scrollWidth==40}),a}),Modernizr.addTest("filereader",function(){return!!(window.File&&window.FileList&&window.FileReader)}),Modernizr.addTest("placeholder",function(){return"placeholder"in(Modernizr.input||document.createElement("input"))&&"placeholder"in(Modernizr.textarea||document.createElement("textarea"))}),Modernizr.addTest("fileinput",function(){var a=document.createElement("input");return a.type="file",!a.disabled}),function(a,b){b.formvalidationapi=!1,b.formvalidationmessage=!1,b.addTest("formvalidation",function(){var c=a.createElement("form");if("checkValidity"in c){var d=a.body,e=a.documentElement,f=!1,g=!1,h;return b.formvalidationapi=!0,c.onsubmit=function(a){window.opera||a.preventDefault(),a.stopPropagation()},c.innerHTML='',c.style.position="absolute",c.style.top="-99999em",d||(f=!0,d=a.createElement("body"),d.style.background="",e.appendChild(d)),d.appendChild(c),h=c.getElementsByTagName("input")[0],h.oninvalid=function(a){g=!0,a.preventDefault(),a.stopPropagation()},b.formvalidationmessage=!!h.validationMessage,c.getElementsByTagName("button")[0].click(),d.removeChild(c),f&&e.removeChild(d),g}return!1})}(document,window.Modernizr); -; - -// *************************** -// js.compressed/global-head.js -// *************************** -/*=======================================================================*\ -|| ###################################################################### || -|| # vBulletin 5.2.2 -|| # ------------------------------------------------------------------ # || -|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved. # || -|| # This file may not be redistributed in whole or significant part. # || -|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || -|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || -|| ###################################################################### || -\*========================================================================*/ -(function(){window.vBulletin=window.vBulletin||{};window.vBulletin.Responsive=window.vBulletin.Responsive||{};window.vBulletin.Responsive.Debounce=window.vBulletin.Responsive.Debounce||{};vBulletin.Responsive.Debounce.checkInitialBrowserSize=function(){if(!Modernizr){return }function A(C,D){C.className+=" "+D}function B(C,D){var E=new RegExp("\\b"+D+"\\b");C.className=C.className.replace(E,"")}if(Modernizr.mq("(max-width: 479px)")){A(document.body,"l-xsmall")}else{B(document.body,"l-xsmall")}if(Modernizr.mq("(max-width: 767px)")){A(document.body,"l-small")}else{B(document.body,"l-small")}if(Modernizr.mq("(min-width: 768px)")){A(document.body,"l-desktop")}else{B(document.body,"l-desktop")}}})();; - diff --git a/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/image.php b/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/image.php deleted file mode 100644 index d8e9bf667a268bf162bd6b50c28e5ccd9dd0feca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8197 zcmXAuWmuHo*M;dW2M`ct07>cY?gmLoi65PUNS8DyAkrn>-3>!`cL)g5-Tgnl?_3wm zhpFc|XP>p#x_6kWvJ5uHD-1X|IBYpt$@k#7|KA@P0{BnK&o=-E2OXA^6w`1^Jxp`g zCy;sBM=FUVg%%o0WJp&M4iOcV7!Jn>{M?FLRrMjD8^1?$j?1ut%u&@|HsYPqyfnNVOF!E4I3}Tw zlb07Kt+p6bmX&2?XP>O4K>1o(hRq6>r;_1wFki`}SGTi>CjpafGC7Tni@ThVfvOSw zXKJdhr&ny_jD;enqq{SnDWRZ%`FP#_{OACMLRS_|>10KMyuhcwsu4=5HGest&14G> za_QOl>RfMcZGCrjsAoW8sw1n-_|0~uDehcOL1C!YX3oVVvXcT`;cc;Yxz-~q8(T~Z zb#N#Z$bgX$D*WkwLWunNa&BN9y(G{>Q#?rTLwLDmn#31pnUXhaC;)Z_vMs524 zFJc4*Jp08lX#c3}c8m$k4Ssm=dP02l>Q&qGlP7yGG2P@R#DuJ@to5#tudnHq-r!CW zMhtEAM8HSYR91Fchl#yK-`DQ$>G|)!|KQ2=jf@;jOnxLJgv?MONTHMc5 z`J9nzt?lgIu$cswmpe#FA=7kW5&oxVJeDp*Al2B^BrPea-{2^=f7;mCI26xxets^& z70b-bOskwqzE&vqah~URdo)c!QBhG=_M=0eDTmE0BQ0${Scf6ADy0#KXWA3Wy%)#1{{Xjx2*nu`nPl!~kC z6(|VawEW!MPB~e@SXvbtffyaukH$fPfgP#su7``@Voz}^eI7j|tzYzl73&|S5O$$2 z3I6v$nHUig5?WVT&ykDO)zx*AE-WfKySxm7%F>Z?+u{jvkUyLav7n=)$H&L>@$vEA z&E;17tCMOAm5GtomKN2to}mPm^QgGAw3T9Q7L6|WPn-QOCStS0CMPFL_3HU~d0DfU z8=X;a>EvI--o1MVzWlSZGg$CVk+ZX{Ap$8T-5S|$x|1<`tg^B)7Q+@e5|`g?-UTSg zo8UevX=LJHFqm8{&BD@BG0y4V5mG7%M^VO-Z=^g`-?%wA{(M+8w*OIQw?tz}aJT!0 zFd*3H`pCe|jTbgi`(8_nre9q1$B!SJpK;D3I&n>m!4)ab+!=QTb8&G^pmz85u^2R6 z_?lM39kdq~hT*u$1f`^;pz(09v*RsxM8(9s7*5-v&G3Rv-9Fr&OI;7+-ergj2nf^) zkE`6I@Hphr4bIOe`nbampmQGO$w^6k_RGA}7T@+Jb0c_pBErL?Nwd*CPPGbxXjRgu zlgaY)@}yJmb;Vd1(-W$cm6Z=NZh!tH$bH{vx5RyyA?SVPARZD@CrS7D^Jkq>6H{|@ z6d#TnaL91p@LL`__eWDuwxA#lssG!o8v}mNE5`d9wQOlMg3H_OjABRI?{@xoeQ$ygQ? zU*G56Ug?P^<#fTM#6s`8i-F$0pIxZRCy~CK?dc42>!wo@?f{FxR zXfU`L?P8H~E5eDbMw{U(!ZlabYj*2tF{i1 zjj7Gmo6|o%mvU=FeG?NediOUrOuR?SOLm2knC6YdRWgJPNiaOZ)vBob!)v zPY-;Mxf*ekrAS@e1jY{mMbBVW3JU0KY;11akLSvvo+<2tPft%LTA7sO zi(KhF5k!B88Q9pI_NEK7@>l2Qi5ulo;V|9=SmWcMQ3d9@ns>oq6*x^cbIeZFMyjfQ z%fx}reUhejcHfp+$Yha9iVOmZ%FFxsEhQx-jg2!ygLx-KQBY8REMsTBge~=>^$->b z`=FwrKyG}OCnq;{c5cqcM2a6>K~pkla@k$1Elx^Gs;~dj41}fLfrXR!)$2xmVUG*T z(n4F-n1qDwqa$T|L3SeP8D2#T3k!A$hB*0JmWj6eBLNeXip~qFp{UAAwmhc(WO6FT z+Fil{ET!1QL`!RH`KTozAT?1w;_zbv0T>Jn3^3szn3eSv712Xm2P&c1BUm!1OBefd zQJW3PiQIOJh3fgC*xCjLN}u+L8*MpCOG{H#(0WQz8V7_@k(XmX^s%o7nIR$Xh;s{<8**>f1uQ*q=YUp@eh+ zp`mE(y{1Gj)BM6iHaE?dxrzBfQ;;gC7#x&G;5H?S*Aj7R=d@KYGc)VhoMPQCrg*~tkUA0z|Yj<}yNe0El=1RjaF z8AStFfd}|9i1qGtA-I0 zY={`QT~&>lv$L~_iHWLebV7nQIBAcMkC&z6##UCl^OdIGA|uU5k}uaf5xZO8w%aVV zc{i()0*eu`jCI!Hb<57p&CSc3NSpkrJM=}lQM)wzax{g++NdCrp578m`vWA*PQFGZ z=(o?kT>`T~w|ft|H#d2na+s1J~QRr_b))RKz7qiGS{Nn!Z3FoA3d$(A*VX1|2A zv{tv%jY`u#SVqJf0oRTtQv@qXB_-?@S^}y6%*`oxWwZ}K_u1$UOXhYOzc^T!T3T8H z4R>g0XkcJ>JHwZmkr9cpsW1*#_-5@ZuJFgF4>~$GUAQ94?Y`|bH8sC}`Q@+ISWSI$ zcK(l@b-WFX)CoQj#M zU?aD;wm{(lt$W^L@lE2gd6@>?1N$SNdp40R0}l@$*(vgL^9ShKdv*0Mhl^b1!^D5j zL9>ASj>f=P!+@ME6BS$|15Fh175*~;eL4vNR%3UO@|%W+#`Nqg`}5BMGpO$a+jdT3 zQWE$fAf7Q<1!rfUI?|1UdfEbEf7aIEtfJEKh=^p?S@Z(J1_uW6kkCa8hxLI zA5m}KvmzLGT5zRv+vz$wvbIn|5_w&A@TAlNAUEU&lcf0uk4C5W;`C+5N9n5iB`uc({JF1B=FG&AFg)yR(T3%irEhmw*K^1~QWG$zIvdM9!zro|m#Mt~bTII#8bj?0IY2P)s}6_?Y6 z-|b{ab#u)nRR9N>I3fWqCE8q;JfzHmp{ZAB+NY$dihaV45Tgg^Hhs9q=?3x%XqZWlW*q|_9BlrlwETDrOsfrXMSnzR7! zY^SPz!w>S3$@)b@V`Jw-q>WsYu?qGI_^)4= zT%rOy9g{zvi3GoMZL6voCRtDL;tKlmWpBGoTT_!qhadcL>vekBAdl=g0TGdUbeM!> zxibdpxxdD^*7fE7-1+s@Zhpq3%+YeAdW{^U z01XG{Xr`D*5!WQ}5}4S3{aau2A*PnasLjknui3R!M}|sOypOo4p+QngDy*1-NmM5{ zHy0$Om&qvhpz#WN8#Xxl^L;wo9H4w1-2qQ){5?DS&tk0&DJf~E=Qwl8-rk;6#LKXy zXfjgLp{a9`=UbJ({lLrllQQ{}D$%-t^<1j6L);UaBDy~Qjf;&G>FMdGr>9;*j!$n$Nfp{>gS!_N_$Vm@(D!a0&c~7{4BLH11~S6l z5hWo(%8c4^e6kP`5X$r$vlh{FHQqg6misb&s6sMS6cqHliX=M*3X@uHZEYQ@oFeRW zb+7;oS59v3?qakN1)VRWgpSVqRK7}*vTA`eDR5Ije)^)I&r83bdT$3E&r3V;q0q7P z@S~Mxht-x_kUW~|Fy-+Nm+GHEg^>&RZ>2c2b@GdSIa&^jjO^wQw49upayK`>yV%WF zPMZuf29Itezn~yYB9pXVU{S_EnrLuB+^5_4Wt8Z*wzlTD)&YM~qLBrTkdlguOkq)f zzpPksnk+G!2~rzhmJxQ?YKaou3u+4f&wGI^jO4&a%_JTEZubQuV_>lIoR0Ay`@+-X z{rcA}_`Y6FFUv#pT6sjGYRcU7ezA2t>NiS z-`@yW?{RZ+#kH5_&5PccH2{~YPU_fMf0mw+(e8ckS`#zKo}{=lFh1yyh`KWhRMd1c z?JX4p1LmhIPNtEYo0}6JApOcY4KC`3e{X1tE+ z!rp^aiT~{2;^@Q~NYXdx8l<$>dov8B*qTAqS$=3rAZN+eq8c}o0zW}N`YJpN)C997 zV`)Xi_r0z&T#>f6wygZ`Vs>erAF9o*?D}75iHiq}XM$b!J^!oZ=-XqP@}a>oQ?~ht4MVIIVM3iHn!CCg(V5MkL};KRPIMRmzVYRh2UdIAFqy9FzuIt zbo6}7lGoCDDKLqBqSS2fuXx@aT#bq@$nMv8>U(!Vf8!|g{q>8(+M72yegm`Y92`=( zoq2V2@#nwFG9ogH0z*Q+W+?c$99-d#09=l(LPw8u6uf!wual|+H664u2xF=c_hJRA3KqQs@^Hcsm00w9W zN&nuJ;4d#Pcc{>c@YpXG6c^*`+S+dR$E>cd0y#o-fDjNM?bf;(p9+fT>F9KnYYVxb znN1g{9oTz&dAaDtNOJ~KTN8jc-WrUHW{x15P2#YaUgQMDo4{fup3LR2 zDyUrF_x;V+1NCiCm>nf@Kg>X)j~)#tn(Yq5*Tlv^NB8HX1C-;Odthv=JU17)O7D?^ zg+)bjT@mJWz49g6KAd27f394!G)dqKb0oc#lvFAs0jR{_vmM%>$e1sqAz{Rl+j^#W z^o%pF7r_gxu8Jw#-=@|9mN4d@_Jy0{{*2J_Wutj5k@9Xbt7&%c@Ni{%nre|1QQX0q zud|t^EdqodcGuwy5hF=l(5km?Os%ZK9;9m1r{?GT&7x-Uqo=o}E583{Wkp|O?Ci|Z z?8i3Zz)jTur!OijA_Vt|)l~FXpww^Te}+)C7|5)%AltZn4w_o4+ddu@yt^tatE&;X zDGWES_wRo+Hu5cnR8+7MBQ8QhaG@xC`_DIhA{7N;$dE6;JZ|@mp5-5Pbqoy+tvP!8 z&De2qaqBMs^nNQYD+?xRJtgO^eR$f(HZ@?Zg9lKKEH z7OZaor@z(LcA37KjR^=5kbClh!9kPljjFo3*;*;IldCHfHT33zkrW=WWZ?R; z*&%g)9a}>Qnj*tvW4~KHdCbP5H@CO1cc(0X@%_}8dW&bQ{}l%)`?Lqvb{NnIGa z#so8W1?;^ZUQ=OVVOADGmBoaag$3>#{^^w!1DaT;w#nyjs^myWNFYR54q^cPR0BPx z+(_gq#7~>?#ezI1f_u-@bZL3{F@O}&`Wl^bDk}N00hT7WXIp_vFnMopZ+ZDaSP&+F zSbRPYH{;`~N}h^|ZcaX0rMf|b+!rtm42+_Z5=oQS?4PCjb96@Sc2=XDCW zZLX}G0JP-%dy<5_JjRb@Vgji&5nq5F*Ku%gfPlgCttVPVuNlRa;^uuam(6^} zREkhhQITbu|M7PbpNEFxVuqF+OSdz|C+S}bc-C99rFyc#_-{)9_Z^px1Q`X$8z5%d z%~KLgsJLXC$1N=_ud9Nibb*1C9Kn^AmzM|R3~~4Y;8Ep+mR9`FpOO}Lw0<;7 z`{534x50Ml5fPYemV+Rm6e**fiyUqa#ELweATGWT3z}J6EV^<=MMYhdx3Jg-torz3 z!1T(rkj&`)dk7KHHqcf26&_r0iV2035>>e%!d3zAtbZ?MH6=_2-lSX$d0tguUtV3A zJCJ2vw^#GD_x1D`Kjuz_<6w#(g3b*fQW0MwFamkj+rvp56W`04MuHcFqj2G29+!KX zA3l6gRvz7(DPDk}V_|8GEI@&kQ_}z)f>tS+fS4HV213Aae|;>&{~6(zky>I(O0n|K zxVX5YLUVI-fU%_6FY=U9c+-~V=gD`Ipl_)=wC09~hfhu%XO^QeUowV*Bl+{)=*o%^ z@CiGq`0KGM!fKvDchi5YY|P1lv~cU<4!`3e5lz5E&H} zbC7XRvS$a8@{=Mt6$?vLr5VurgYq(iW@&Sj$jHdh+Xx{%dAkh}gHC1@DY7dKLEop; z$GC(9BKYf>mvtRTVQ2!%R!(nzL`REu7%5eJS#}wj%C2^R? z?HP632Ye*oI3ac_YU)a*PcANs3JU7);s9sv*u1AQ_9R9k8 zVHAS%CecNxpCV&5B(RZ&|5S_$=f7WV+7;le)Nb3Jqx9q+uIlC$Cr1~Rh5Dm{$B&X!$r=}A{CPc}qB+JUd!NAPi%R{(U zfSoUfnPiJd9E42PQ$(ASm$#9E?f7>%>FbiZYcwW}BRb}P;;#c7uUz*qX!vkxUcY|r z*zBjElUkwa1LO;^9uP0)fJCUOR(#r$_i`>G1eJ3p$E?{1&XVVGYoBR;Wu+6SXi0~x z?$#m1hzigF;8xC0PbX@^(({Y3;K|S3GB*~gEr44q;xQC(J@^QXPf8+zKq#kWO5#m- zy@8PHw!Y#pkDN6?X)>sSa#>GXa? zSEjG8512%Uz~;|7+Od)k)h@L{(F=ET;DG-6_3OW(c>f$VAQUCFwOpY#pbsT7$^dxo zO%4tekHad#M1JVLAWmv(DwqIB+ls}Fa?;!_TbP;oX{7YVFo}oh>j+YOil)xsYy99c z3St_IeuJO&s>X*J%NL%!6D0Esp94Al--;2L7&kUI7caJ&4M3>Uo&k*Nck%xYqGeBa zx1h%bS~qfZv4Mg@M0R%eVkH>lG22rlJd5dNs)p{wLc3ubwzk(NCj~`C;`1T`)h%QY zVq&+AZuE44enJKJG%QYj{ipd#YU0&r}guMgUUprGJRKmH~t^z~U(L10h){rv&4!G#KI zd=|@81s2G5wPgWRnVlZlH2}!~a!Clbi~tpf7{5*Gjz&byP;9j~x0Pp_|`e4otb$_&7*{9a!6x;Zhfb;33XliT-8nV$a>BlUzq-5xaroH}9uXXtS`a=>IQ&Qv+e|3dLAG39UoVI^ z1X=HRcNd(7EUTdN`Ys0p9ZoPm6%!M)va+IF?CtBjzrVK`Jh@N#H@tKQ$nk|_PLyK?go2}wx2^xfrt{?++Ru{M4k zc(48Ht*YlU^9V5-7}Mg;$mb;cK&g3UVH>6Z*QBcK?3kgK{+m%x&&^f8twF&eKG__= zf3s*R3Vu_#q_lKF^Dh9|MG~f1m|()K)8@tZ7*bn%8A-z7ViO5Z@kn4T#+)#9>h0v@ yl;M4qR5rp!Ol53k0W<}~1Q7J+f{7u|$W9V^>CbR?U%_}EPEJZ$vP}GA!2bY1fEy_Q diff --git "a/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/jquery.min.js.t\303\251l\303\251chargement" "b/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/jquery.min.js.t\303\251l\303\251chargement" deleted file mode 100644 index fad9ab1..0000000 --- "a/Default Keybinds - HCS Voice Packs/Default Keybinds - HCS Voice Packs 170101_files/jquery.min.js.t\303\251l\303\251chargement" +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){ -return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*\s*$/g,ia={option:[1,""],thead:[1,"","
                        "],col:[2,"","
                        "],tr:[2,"","
                        "],td:[3,"","
                        "],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("