/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
*/
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});

/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
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;}};

/*
 * fancyCollapses 1.01 - jSnippet by Jorge Lainfiesta
 * Copyright 2010 Audentio Design
 * http://audentio.com/
 *
 */
 if(!jQuery('body').is('.cp-page')) {

expandables = null; //Destroy MyBB's default collapses

var expandables = { //Create an empty function so there's no error when MyBB tries to init its collapses
	init: function(){}
};

(function($){ //Start auto-calling function
   
   //Declare the string we'll use for the plugin
   var fancyCollapsesName = "fancyCollapses", fancyCollapses_cookie = fancyCollapsesName+"_collapsed_elmnts", sepR="|", sepM=",",
   fancyWrap0 = "<tr><td style='padding: 0; margin: 0; width: 100%'><div><table width='100%' border='0'";
   
   if(jQuery.cookie){ //If jQuery cookie plugin is active, we load cookies and hide the collapsed elements
		jQuery(document).ready(function(){
	          var coll_onLoad = $.cookie(fancyCollapses_cookie); //Get cookie
	          if (coll_onLoad!="" && coll_onLoad!=null){ //If it's something
	            var w= coll_onLoad.split(sepR); //Separate cookie to process each stored element
	            for(i=0; i<w.length; i++){
	               var bit = w[i].split(sepM) //Split element into its body, its collapser and wether it's a MyBB collapse or not
	               if(typeof bit[0]!="undefined"&&bit[0]!=""){ 
	                  if(bit[2]=="m"){ //If it's MyBB, change the collapse image for collapse_collapsed
	                      var collapser_img = $(bit[1]).attr("src");
	                      if(typeof collapser_img!="undefined"){
	                         collapser_img = collapser_img.replace("collapse", "collapse_collapsed");
	                         $(bit[1]).attr("src", collapser_img);
	                         $(bit[1]).css("cursor", "pointer");
	                         
	                         //Process MyBB's table so it slides smoothly; we just wrap the content into a div inside the current table and apply the cellpadding and cellspacing from the parent table.
	                         var fancyCollapses_body = $(bit[0]);
	                         var cellpadding = fancyCollapses_body.closest("table").attr("cellpadding");
	                         var cellspacing = fancyCollapses_body.closest("table").attr("cellspacing");
	                         fancyCollapses_body.closest("table").attr("cellspacing", "0")
	                         fancyCollapses_body.addClass("fancyCollapses_modded").wrapInner(fancyWrap0+"cellspacing='"+cellspacing+"' cellpadding='"+cellpadding+"'>'");
	                           fancyCollapses_body.children().children().children().hide();
	                      }
	                   }else {        
	                       $(bit[0]).hide();
	                   }
	                   $(bit[1]).addClass("fancyCollapses_collapser_collapsed");
	                   $(bit[0]).addClass("fancyCollapses_collapsed");
	               }
	            } 
	     }})
	}

   $.fn.fancyCollapses = function(options) {
     var opts = $.extend({}, $.fn.fancyCollapses.defaults, options);
     return this.each(function(){
        
      /*Cookies handling*/
      function addColl (body, collapser, mn){
                var list=$.cookie(fancyCollapses_cookie);
                if(list==null){
                    list="";
                }
                var line=list+sepR+body+sepM+collapser+sepM+mn;
                $.cookie(fancyCollapses_cookie, line);
      }
      function removeColl (body, collapser, mn){
                var list=$.cookie(fancyCollapses_cookie);
                var que = sepR+body+sepM+collapser+sepM+mn;
                list = list.replace(que, "");
                $.cookie(fancyCollapses_cookie, list)
      }
        
        var $this = $(this);
        var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
        var tblid="", tbtn="", fancyCollapses_body, fancyCollapses_btn, storeCookie=false;
        tblid = $this.attr("id");
        if(o.collapser) {
           tbtn = o.collapser;
        }
        if(tblid=="") {
           if(!o.collapser) {
              var err = new Error();
              err.name = 'fancyCollapses error';
              err.message = 'No collapser specified';
              throw(err);
           }
           fancyCollapses_body = $this;
        }else {
            storeCookie = true;
            tblid="#"+tblid;
            fancyCollapses_body = $(tblid);
            if(o.isTable){
               tbtn = tblid.replace("_e", "_img")
               if(!fancyCollapses_body.hasClass("fancyCollapses_modded")){
                  var cellpadding = fancyCollapses_body.closest("table").attr("cellpadding");
                  var cellspacing = fancyCollapses_body.closest("table").attr("cellspacing");
                  fancyCollapses_body.closest("table").attr("cellspacing", "0")
                  fancyCollapses_body.wrapInner("<tr><td style='padding: 0; margin: 0; width: 100%'><div><table width='100%' border='0' cellspacing='"+cellspacing+"' cellpadding='"+cellpadding+"'></table></div></td></tr>");
               }
               fancyCollapses_body = $(tblid).children().children().children();
            }else {
               if(!o.collapser) {
                 tbtn = tblid+"_btn";;
               }
            }
        }
        fancyCollapses_btn = $(tbtn);
        fancyCollapses_btn.css("cursor", "pointer");
        fancyCollapses_body.width("100%");
        fancyCollapses_btn.click(function(){
            if(!fancyCollapses_btn.hasClass("fancyCollapses_collapser_collapsed")){
               fancyCollapses_body.slideUp(o.speed, o.easing);
                if(o.isTable){
                   var collapser_img = fancyCollapses_btn.attr("src");
                   collapser_img = collapser_img.replace("collapse", "collapse_collapsed");
                   fancyCollapses_btn.attr("src", collapser_img);
                }
                fancyCollapses_btn.addClass("fancyCollapses_collapser_collapsed");
                fancyCollapses_body.addClass("fancyCollapses_collapsed");
                if(storeCookie){
                    if(jQuery.cookie){
						var type = "n";
	                    if(o.isTable){
	                       type = "m";
	                    }
	                    addColl(tblid, tbtn, type);
				  	}
                 }
            }else{
               fancyCollapses_body.slideDown(o.speed, o.easing)
                if(o.isTable){
                   var collapser_img = fancyCollapses_btn.attr("src");
                   collapser_img = collapser_img.replace("_collapsed", "");
                   fancyCollapses_btn.attr("src", collapser_img)
                }
                fancyCollapses_btn.removeClass("fancyCollapses_collapser_collapsed");
                fancyCollapses_body.removeClass("fancyCollapses_collapsed");
                if(storeCookie){
                   if(jQuery.cookie){
					var type = "n";
	                   if(o.isTable){
	                      type = "m";
	                   }
	                   removeColl(tblid, tbtn, type);
				   }
                }
            }
        })
   });
};
   $.fn.fancyCollapses.defaults = {
        easing: "linear",
        speed: "normal",
        collapser: "",
        isTable: true
   };
})(jQuery);
}
