2017-01-22 22:43:18 +00:00
$ ( document ) . ready ( function ( ) {
var interval = 15000 ;
var autoRefresh = setTimeout ( function ( ) {
refresh ( ) ;
} ,
interval ) ;
var refresh = function ( ) {
2017-05-13 09:30:53 +00:00
$ . getJSON ( "https://mcapi.ca/query/play.totalfreedom.me:26865/extensive" , function ( json ) {
2017-01-22 22:43:18 +00:00
if ( json . status !== true ) {
$ ( "#online" ) . html ( '<span style="color: firebrick; font-weight: bolder;"> Server is Offline</span><br/><small style="font-size: .5em;">Check out our <a href="status">Associated Servers</a>!</small>' ) ;
$ ( ".button" ) . hide ( ) ;
} else {
$ ( "#online" ) . html ( 'TotalFreedom has <font color="green">' + json . players . online + '</font> players online!<br/>' ) ;
2017-02-08 15:00:42 +00:00
$ ( "#players-online" ) . html ( json . players . online + ' Online Players!' ) ;
2017-01-22 22:43:18 +00:00
$ ( '.button' ) . show ( ) ;
}
} ) ;
autoRefresh ;
}
refresh ( ) ;
} ) ;
2017-05-13 09:30:53 +00:00
// $(document).ready(function() {
// $('.brand-logo').typed({
// strings: [''],
// typeSpeed: -1000
// });
// });
2017-01-22 22:43:18 +00:00
$ ( document ) . ready ( function ( ) {
$ ( ".one" ) . click ( function ( ) {
$ ( ".a" ) . fadeToggle ( 300 ) ;
2017-03-04 20:56:17 +00:00
$ ( ".one i" ) . toggleClass ( "fa-chevron-right" ) ;
$ ( ".one i" ) . toggleClass ( "fa-chevron-down" ) ;
2017-01-22 22:43:18 +00:00
} ) ;
$ ( ".two" ) . click ( function ( ) {
$ ( ".b" ) . fadeToggle ( 300 ) ;
$ ( ".two i" ) . toggleClass ( "fa-chevron-right" ) ;
$ ( ".two i" ) . toggleClass ( "fa-chevron-down" ) ;
} ) ;
$ ( ".three" ) . click ( function ( ) {
$ ( ".c" ) . fadeToggle ( 300 ) ;
$ ( ".three i" ) . toggleClass ( "fa-chevron-right" ) ;
$ ( ".three i" ) . toggleClass ( "fa-chevron-down" ) ;
} ) ;
$ ( ".four" ) . click ( function ( ) {
$ ( ".d" ) . fadeToggle ( 300 ) ;
$ ( ".four i" ) . toggleClass ( "fa-chevron-right" ) ;
2017-03-04 20:56:17 +00:00
$ ( ".four i" ) . toggleClass ( "fa-chevron-down" ) ;
2017-01-22 22:43:18 +00:00
} ) ;
$ ( ".five" ) . click ( function ( ) {
$ ( ".e" ) . fadeToggle ( 300 ) ;
$ ( ".five i" ) . toggleClass ( "fa-chevron-right" ) ;
$ ( ".five i" ) . toggleClass ( "fa-chevron-down" ) ;
} ) ;
$ ( ".six" ) . click ( function ( ) {
$ ( ".f" ) . fadeToggle ( 300 ) ;
$ ( ".six i" ) . toggleClass ( "fa-chevron-right" ) ;
$ ( ".six i" ) . toggleClass ( "fa-chevron-down" ) ;
} ) ;
$ ( ".seven" ) . click ( function ( ) {
$ ( ".g" ) . fadeToggle ( 300 ) ;
$ ( ".seven i" ) . toggleClass ( "fa-chevron-right" ) ;
$ ( ".seven i" ) . toggleClass ( "fa-chevron-down" ) ;
} ) ;
$ ( ".eight" ) . click ( function ( ) {
$ ( ".h" ) . fadeToggle ( 300 ) ;
$ ( ".eight i" ) . toggleClass ( "fa-chevron-right" ) ;
$ ( ".eight i" ) . toggleClass ( "fa-chevron-down" ) ;
} ) ;
$ ( ".nine" ) . click ( function ( ) {
$ ( ".i" ) . fadeToggle ( 300 ) ;
$ ( ".nine i" ) . toggleClass ( "fa-chevron-right" ) ;
$ ( ".nine i" ) . toggleClass ( "fa-chevron-down" ) ;
} ) ;
} ) ;
$ ( document ) . ready ( function ( ) {
$ ( "#top" ) . click ( function ( ) {
$ ( 'html, body' ) . animate ( {
scrollTop : $ ( "html, body" ) . offset ( ) . top
} , 1000 ) ;
} ) ;
$ ( "#rules" ) . click ( function ( ) {
$ ( 'html, body' ) . animate ( {
scrollTop : $ ( "#rules-sec" ) . offset ( ) . top
} , 1000 ) ;
} ) ;
$ ( "#staff" ) . click ( function ( ) {
$ ( 'html, body' ) . animate ( {
scrollTop : $ ( "#staff-sec" ) . offset ( ) . top
} , 1000 ) ;
} ) ;
$ ( "#brand-top" ) . click ( function ( ) {
$ ( 'html, body' ) . animate ( {
scrollTop : $ ( "html, body" ) . offset ( ) . top
} , 1000 ) ;
} ) ;
} ) ;
var ypos , cover1 , cover2 , cover3 ;
function parallax ( ) {
ypos = window . pageYOffset ;
cover1 = document . getElementById ( 'header' ) ;
cover1 . style . top = ypos * . 4 + 'px' ;
} ;
window . addEventListener ( 'scroll' , parallax ) ;