(function($) {$.fn.tab = function() {var wrapper = $(this).attr('id');var tabPanel = [];var tabContainer = [];$('#' + wrapper + ' > ul li a').each(function () {tabPanel.push(this);tabContainer.push($(this.hash)[0]);if(window.location.hash != this.hash) {$(this.hash).addClass('tab-hidden');}if(window.location.hash == this.hash) {$(this).parent().addClass('tab-selected');}});if(!window.location.hash) {$(tabContainer[0]).removeClass('tab-hidden');$(tabPanel[0]).parent().addClass('tab-selected');}$(tabPanel).click(function(e) {$(tabContainer).addClass('tab-hidden');$(this.hash).removeClass('tab-hidden');$(tabPanel).parent().removeClass('tab-selected');$(this).parent().addClass('tab-selected');e.preventDefault();});return this;};})(jQuery);if(typeof jQuery().tab != 'undefined') {$(document).ready(function(){$('#tabnav').tab();});}(function($) {var nanoboxOverlay, nanoboxWrapper, config, max_x, max_y;var opened = false;$.fn.nanobox = function(con) {var stdConfig = {'maxsize' : 75,'tip' : '<big>\u2717</big>'};config = jQuery.extend({}, stdConfig, con);max_x = Math.round($(window).width() * (config.maxsize / 100));max_y = Math.round($(window).height() * (config.maxsize / 100));$(this).unbind('click.nb').bind('click.nb', function(e) {e.preventDefault();if(opened === true) {return false;}opened = true;$.nanobox($(this));return false;});return this;};$.nanobox = function(elem) {$.nanobox.elem = elem;$.nanobox.open();$.nanobox.centerWrapper();$.nanobox.preloadIMG();nanoboxWrapper.one('click', function() {$.nanobox.close();});$(window).bind('keydown.nb', function(e) {if(e.keyCode == 27) {$.nanobox.close();}});$(window).bind('resize.nb', function() {$.nanobox.centerWrapper();});};$.nanobox.open = function() {if(typeof nanoboxOverlay == 'undefined') {nanoboxOverlay = $('<div id="nanobox_overlay" />');$('body').prepend(nanoboxOverlay);} else {nanoboxOverlay.show();}if(typeof nanoboxWrapper == 'undefined') {nanoboxWrapper = $('<div id="nanobox" class="loading" />');$('body').prepend(nanoboxWrapper);} else {nanoboxWrapper.addClass('loading').show();}};$.nanobox.close = function() {nanoboxWrapper.hide(0, nanoboxOverlay.fadeOut(250));nanoboxWrapper.empty();$(window).unbind('keydown.nb');$(window).unbind('resize.nb');delete imgObj;opened = false;};$.nanobox.centerWrapper = function() {var center_x = Math.round(($(window).width() - nanoboxWrapper.outerWidth()) / 2);var center_y = Math.round(($(window).height() - nanoboxWrapper.outerHeight()) / 2);nanoboxWrapper.css({'left' : center_x + 'px', 'top' : center_y + 'px'});};$.nanobox.preloadIMG = function() {imgObj = new Image();$(imgObj).load(function() {$.nanobox.resizeIMG();});imgObj.src = this.elem.attr('href');};$.nanobox.resizeIMG = function() {nanoboxWrapper.hide();var ratio = Math.min(max_x / imgObj.width, max_y / imgObj.height, 1);imgObj.width = Math.round(imgObj.width * ratio);imgObj.height = Math.round(imgObj.height * ratio);nanoboxWrapper.removeClass('loading').html(imgObj).wrapInner('<div>').append('<div class="fl">' + this.elem.attr('title') + '</div><div class="fr">' + config.tip + '</div>');$.nanobox.centerWrapper();nanoboxWrapper.fadeIn(250);};})(jQuery);$(document).ready(function() {$('.nanobox').each(function() {$(this).nanobox();});});(function($) {$.fn.grbox = function() {$(this).find('div.fr').unbind('click.grbox').bind('click.grbox', function(e) {e.preventDefault();$.fn.grbox.close();return false;});return this;};$.fn.grbox.close = function() {$('#grbox').fadeOut(500, function() {$('#grbox').empty().remove();$.cookie('grbox', 'hidden', {'expires': 14, 'path' : '/'});});return true;};})(jQuery);if(typeof jQuery().grbox != 'undefined') {$(document).ready(function(){$('#grbox').grbox();});}jQuery.cookie = function(name, value, options) {    if (typeof value != 'undefined') {         options = options || {};        if (value === null) {            value = '';            options.expires = -1;        }        var expires = '';        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {            var date;            if (typeof options.expires == 'number') {                date = new Date();                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));            } else {                date = options.expires;            }            expires = '; expires=' + date.toUTCString();         }                                var path = options.path ? '; path=' + (options.path) : '';        var domain = options.domain ? '; domain=' + (options.domain) : '';        var secure = options.secure ? '; secure' : '';        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');    } else {         var cookieValue = null;        if (document.cookie && document.cookie != '') {            var cookies = document.cookie.split(';');            for (var i = 0; i < cookies.length; i++) {                var cookie = jQuery.trim(cookies[i]);                                if (cookie.substring(0, name.length + 1) == (name + '=')) {                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));                    break;                }            }        }        return cookieValue;    }};