function checkCollapseState(){"use strict";if($.cookie("GeneValidator_adv_params_status")){var G=$.cookie("GeneValidator_adv_params_status");if("open"===G){var T=document.getElementById("adv_params_btn");T.innerHTML='  Hide Advanced Parameters',$("#adv_params").addClass("in")}}}function keepFooterFixedToBottom(){"use strict";$("#mainbody").css({"margin-bottom":$("#footer").height()+15+"px"}),$(window).resize(function(){$("#mainbody").css({"margin-bottom":$("#footer").height()+15+"px"})})}function addSeqValidation(){"use strict";jQuery.validator.addMethod("checkInputType",function(G,T){var A=[];if(">"===G.charAt(0)){for(var e=G.split(">"),C=1;C  Show Advanced Parameters'===G.innerHTML?(G.innerHTML='  Hide Advanced Parameters',$("#adv_params").collapse("show"),$.cookie("GeneValidator_adv_params_status","open")):(G.innerHTML='  Show Advanced Parameters',$("#adv_params").collapse("hide"),$.cookie("GeneValidator_adv_params_status","closed"))}function examplarSequence(G){"use strict";var T=">Insulin\nATGGCTCTCTGGATCCGGTCGCTGCCTCTCCTGGCCCTTCTTGCTCTTTCTGGCCCTGGGATCAGCCACGCAGCTGCCAACCAGCACCTCTGTGGCTCCCACTTGGTTGAGGCTCTCTACCTGGTGTGTGGGGAGCGGGGTTTCTTCTACTCCCCCAAAACACGGCGGGACGTTGAGCAGCCTCTAGTGAACGGTCCCCTGCATGGCGAGGTGGGAGAGCTGCCGTTCCAGCATGAGGAATACCAGAAAGTCAAGCGAGGCATCGTTGAGCAATGCTGTGAAAACCCGTGCTCCCTCTACCAACTGGAAAACTACTGCAACTAG\n>Insulin (with a duplication)\nATGGCTCTCTGGATCCGGTCGCTGCCTCTCCTGGCCCTTCTTGCTCTTTCTGGCCCTGGGATCAGCCACGCAGCTGCCAACCAGCACCTCTGTGGCTCCCACTTGGTTGAGGCTCTCTACCTGGTGTGTGGGGAGCGGGGTTTCTTCTACTCCCCCAAAACACGGCGGGACGTTGAGCAGCCTCTAGTGAACGGTCCCCTGCATGGCGAGGTGGGAGAGCTGCCGTTCCAGCATGAGGAATACCAGACAGCACCTCTGTGGC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VRTCNKATDVAQVRDQLNFHIDASQLSEIRQKYDQVIGLLNYTNLSQYNVQQNSETNTIVVQNPWVMVPTVQEPWYRWAIKPSESQRQSEIDVLLDEVSQPSCTLDNDKILTFDNQLYNVQLGKCKHVLLTTYPQDSHNRRNYIPESSKVAVLAKDTDNDSRNVYVWLGNLEIELKKVGNDLKVAINGQNVEIPEKGHQESNGNEIIFEIVQLPDGSLSVISEKYGITVIFDGKHVRLYANGATYRNAIRGLCGNYDSRRDNDFLTPKNCLLTKPEEFAATYAMTNENCQGPAPENKRKAEGAMCIEVPEQQQMNVISDREAGRMMTEGGNWGYHQSNRKKEHGQDSKRGHGHKKYNQKDSQEGGSNESQYRKKHNIVYRTRVVEMDDKICFTTTPVPGCLQDTRPVERVPKKYDLYCLSKNNESMDLKRRVEEGAKPDFTQKPVNKIQNFQIPVSCSAA";"dna"===G?document.getElementById("seq").value=T:"protein"===G&&(document.getElementById("seq").value=A)}function checkType(G,T,A,e){"use strict";void 0===T&&(T=.9),void 0===A&&(A=1e4),void 0===e&&(e=1);var C=G.slice(e-1,A),t=C.replace(/N/gi,""),a=t.length,n=(t.match(/[ACG]/gi)||[]).length/a,r=(t.match(/[T]/gi)||[]).length/a,V=(t.match(/[U]/gi)||[]).length/a,s=C.replace(/X/gi,""),S=s.length,i=(C.match(/[ARNDCQEGHILKMFPSTWYV\*]/gi)||[]).length/S;return n+r>=T||n+V>=T?r>=V?"dna":V>=r?"rna":"dna":i>=T?"protein":void 0}$(document).ready(function(){"use strict";checkCollapseState(),keepFooterFixedToBottom(),addSeqValidation(),inputValidation(),$(document).bind("keydown",function(G){G.ctrlKey&&13===G.keyCode&&$("#input").trigger("submit")})});