/* Default Functions */ function gE(Id) { // getElement shortcut return document.getElementById(Id); } function OkCancel() { // confirmation var msg = (arguments[0]) ? arguments[0] : 'Are you sure?'; if (confirm(msg)) return true; return false; } function compareNumbers(a,b) { // sort numerical array - descending return b-a; } function strReplace(source,input,output) { // string replace var temp = source.split(input); return temp.join(output); } /* jQuery onReady */ $(document).ready(function () { /* jQuery Plugin - Delay */ jQuery.fn.delay = function(time,fx) { this.each(function() { setTimeout(fx,time); }); return this; }; /* jQuery Plugin - Key Press */ jQuery.fn.key = function(key,func) { $(this).keypress(function(event) { if (event.keyCode == key) { eval(func); } }); }; /* Button blur */ $('a, button').click(function() { this.blur(); }); /* Itz Flags */ $('.itz_flags').cycle({ fx: 'all', sync: 1, random: 1, timeout: 7000, loop: 1 }); $('.itz_flags').hover(function() { var flag_txt = $(this).children().children('.itz_flags_txt'); flag_txt.css('opacity', '0').css('display', 'block'); flag_txt.animate({opacity: '1'}, 500); }, function() { var flag_txt = $(this).children().children('.itz_flags_txt'); flag_txt.css('opacity', '0').css('display', 'none'); }); $('.itz_banners').cycle({ fx: 'all', sync: 1, random: 1, timeout: 4000 }); /* Banner Stats */ $('.banner_stats').click(function() { var target = this.href; var ref = location.href; $('#loadbox').load('/scripts/Stats.php', { url: target, ref: ref }, function(results) { //alert(results); }); }); });