/*!
 * jQuery Extensions
 *
 * This pack includes: 
 * 	    JQuery.Cookie -- http://plugins.jquery.com/project/Cookie
 * 	    JQuery.Collapser -- http://www.aakashweb.com/jquery-plugins/collapser/
 * 	    JQuery.ImageTick -- http://boedesign.com/blog/2008/06/08/imagetick-for-jquery/
 * 	    JQuery.Truncate Width -- http://www.adamcoulombe.info/lab/jquery/width-truncate/
 *      JQuery.truncatable -- http://theodin.co.uk/blog/development/truncatable-jquery-plugin.html
 *      jQuery.replaceText -- http://benalman.com/projects/jquery-replacetext-plugin/
 *      jQuery Expander Plugin v1.3 -- http://www.gnu.org/licenses/gpl.html
 * 	    JQuery.Rule Plugin -- http://flesler.blogspot.com 
 *		jQuery.Appear Plugin -- http://code.google.com/p/jquery-appear/
 *
 */
 
/**
///----------------------------------- JQuery.Cookie Plugin ---------------------------------------
/**
 * jQuery Cookie plugin
 * Copyright (c) 2010 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
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Create multiple cookies at once stored in an object, with optional parameters affecting them all.
 *
 * @example $.cookie({ 'the_cookie' : 'the_value' });
 * @desc Set/delete multiple cookies at once.
 * @example $.cookie({ 'the_cookie' : 'the_value' }, { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Set/delete multiple cookies with options.
 *
 * @param Object name An object with multiple cookie name-value pairs.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the names and values of all cookies for the page.
 *
 * @example $.cookie();
 * @desc Get all the cookies for the page
 *
 * @return an object with the name-value pairs of all available cookies.
 * @type Object
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
(function($){
    $.fn.cookie = function(key, value, options) {

    // key and at least value given, set cookie...
    if (arguments.length > 1 && String(value) !== "[object Object]") {
        options = jQuery.extend({}, options);

        if (value === null || value === undefined) {
            options.expires = -1;
        }

        if (typeof options.expires === 'number') {
            var days = options.expires, t = options.expires = new Date();
            t.setDate(t.getDate() + days);
        }

        value = String(value);

        return (document.cookie = [
            encodeURIComponent(key), '=',
            options.raw ? value : encodeURIComponent(value),
            options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
            options.path ? '; path=' + options.path : '',
            options.domain ? '; domain=' + options.domain : '',
            options.secure ? '; secure' : ''
        ].join(''));
    }

    // key and possibly options given, get cookie...
    options = value || {};
    var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
    return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
};
})(jQuery);
///----------------------------------- END JQuery.Cookie Plugin ---------------------------------------


/// ------------------------------------  JQuery.Collapser Plugin  ------------------------------------
/* 
 * jQuery - Collapser - Plugin v1.0 * http://www.aakashweb.com/ * Copyright 2010, Aakash Chakravarthy * Released under the MIT License.
 */

(function($){
    $.fn.collapser= function(options, beforeCallback, afterCallback) {
        
        var defaults = {
            target: 'next',
			targetOnly: null,
            effect: 'slide',
			changeText: true,
			expandHtml: 'Expand',
			collapseHtml: 'Collapse',
			expandClass: '',
			collapseClass:''
        };
        
        var options = $.extend(defaults, options);
		
		var expHtml,collHtml, effectShow, effectHide;
		
		if(options.effect == 'slide'){
			effectShow = 'slideDown';
			effectHide = 'slideUp';
		}else{
			effectShow = 'fadeIn';
			effectHide = 'fadeOut';
		}
		
		if(options.changeText == true){
			expHtml = options.expandHtml;
			collHtml = options.collapseHtml;
		}
		
		function callBeforeCallback(obj){
			if(beforeCallback !== undefined){
				beforeCallback.apply(obj);
			}
		}
		
		function callAfterCallback(obj){
			if(afterCallback !== undefined){
				afterCallback.apply(obj);
			}
		}
		
		function hideElement(obj, method){
			callBeforeCallback(obj);
			if(method == 1){
				obj[options.target](options.targetOnly)[effectHide]();
				obj.html(expHtml);
				obj.removeClass(options.collapseClass);
				obj.addClass(options.expandClass);
			}else{
				$(document).find(options.target)[effectHide]();
				obj.html(expHtml);
				obj.removeClass(options.collapseClass);
				obj.addClass(options.expandClass);
			}
			callAfterCallback(obj);
		}
		
		function showElement(obj, method){
			callBeforeCallback(obj)
			if(method == 1){
				obj[options.target](options.targetOnly)[effectShow]();
				obj.html(collHtml);
				obj.removeClass(options.expandClass);
				obj.addClass(options.collapseClass);
			}else{
				$(document).find(options.target)[effectShow]();
				obj.html(collHtml);
				obj.removeClass(options.expandClass);
				obj.addClass(options.collapseClass);
			}
			callAfterCallback(obj);
		}
		
		function toggleElement(obj, method){
			if(method == 1){
				if(obj[options.target](options.targetOnly).is(':visible')){
					hideElement(obj, 1);
				}else{
					showElement(obj, 1);
				}
			}else{
				if($(document).find(options.target).is(':visible')){
					hideElement(obj, 2);
				}else{
					showElement(obj, 2);
				}
			}
		}
		
		return this.each(function(){
		   
		   if($.fn[options.target] && $(this)[options.target]()){
				$(this).toggle(function(){		
					toggleElement($(this), 1);
				},function(){
					toggleElement($(this), 1);
				});	
				
		   }else{
			   
			   $(this).toggle(function(){
					toggleElement($(this), 2);
				},function(){
					toggleElement($(this), 2);
				});
		   }
		   
		   // Initialize  
		   if($.fn[options.target] && $(this)[options.target]()){
				if($(this)[options.target]().is(':hidden')){
					$(this).html(expHtml);
					$(this).removeClass(options.collapseClass);
					$(this).addClass(options.expandClass);
				}else{
					$(this).html(collHtml);
					$(this).removeClass(options.expandClass);
					$(this).addClass(options.collapseClass);
				}
			}else{
				if($(document).find(options.target).is(':hidden')){
					$(this).html(expHtml);
				}else{
					$(this).html(collHtml);
				}
			}
		   
        });
    };
    
})(jQuery);

/// ------------------------------------  END JQuery.Collapser Plugin  ------------------------------------------------

/// ------------------------------------  JQuery.ImageTick Plugin  ------------------------------------------------
/*
* imageTick for jQuery
* http://boedesign.com/blog/2008/06/08/imagetick-for-jquery/
*
* Copyright (c) 2010 Jordan Boesch
* Dual licensed under the MIT and GPL licenses.
*
* Date: September 28, 2010
* Version: 2.1
*/

(function($){
	
    // Global setters
    $.imageTick = {
        logging: false
    };
    
    /*
    * Init the imageTick function.  We can do 1 of 2 things with this.  We can
    * either initialize it and turn those nasty checkboxes/radios into something
    * awesome... or we can put disabled attributes on certain elements
    *
    * @param options {Object/String} An object of options to pass in, this can be a string of "disabled" as well
    * @param disable {Boolean} If we did pass a 'disabled' string as a first param, we need to say whether we're disabling or enabling (true/false)
    */
    $.fn.imageTick = function(options, disable) {

        var defaults = {	
            tick_image_path: "",
            no_tick_image_path: "",
            image_tick_class: "ticks_" + Math.floor(Math.random() * 999999),
            img_html: '<img src="%s1" alt="no_tick" class="%s2" id="tick_img_%s3" />',
            custom_button: false,
            custom_button_selected_class: 'selected'
        };
        	
        var opt = $.extend({}, defaults, options);
        
        // Private options
        opt._tick_img_id_format = 'tick_img_%s';
        opt._valid_types = ['checkbox', 'radio'];
        
        // Quick logging
        function log(){
            $.imageTick.logging && console && console.log && console.log.apply(console, arguments);
        }
        
        // If we aren't initializing anything, we're just disabling and re-enabling 
        // certain input checkboxes/radios
        if(options === 'disabled'){
            
            if(this.selector.indexOf('#') == -1){
                log('COULD NOT DISABLE "' + this.selector + '": You need to specify the id of the <input> when calling disabled true/false.');
                return;
            }
            
            var $img_id = $('#' + opt._tick_img_id_format.replace('%s', this[0].id));
            
            if(disable){
                $(this).attr('disabled', 'disabled');
                method_type = 'add';
            }
            else {
                $(this).removeAttr('disabled');
                method_type = 'remove';
            }
            
            $img_id[method_type + 'Class']('disabled');
            return;
             
        }
		
        /*
        * When we click on the image, we need to compare images to see if we're
        * on a checked state or a non-checked state, IE needs this cause it handles
        * image paths as absolute urls. Here we just strip off the file name and use that.
        *
        * @param e {DOMElement} The DOM element of the image we just clicked on
        */
        function imagePathsAreEqual(e){
            
            var current_img_src = e.src.split('/').pop();
            var no_tick_path = opt.no_tick_image_path.split('/').pop();
        	
            return current_img_src == no_tick_path;
            
        }
		
        /*
        * When the user clicks on the radio/checkbox image, they are taken to this function to
        * determine what to do with the cooresponding labels and inputs. If we're using a custom
        * button, we need to do things a little differently here.
        *
        * @param using_custom_button {Boolean} Are we using a custom button or default image
        * @param type {String} Is it a 'checkbox' or a 'radio'
        * @param $input_id {jQuery Object} The id of the real <input>
        */
        function handleClickType(using_custom_button, type, $input_id){
            
            if(using_custom_button){
                
                if(type == 'radio'){
                    $("." + opt.image_tick_class).removeClass(opt.custom_button_selected_class);
                }
                $(this).toggleClass(opt.custom_button_selected_class);
                
            }
            else {
                
                if(type == 'checkbox'){
                    var img_src = (imagePathsAreEqual(this)) ? opt.tick_image_path : opt.no_tick_image_path;
                }
                else {
                    $("." + opt.image_tick_class).attr('src', opt.no_tick_image_path);
                    var img_src = opt.tick_image_path;
                }

                this.src = img_src;
                
            }
		  
        }
		
        // Loop through each one of our elements
        this.each(function(){
			
            var $obj = $(this);
            var type = $obj[0].type; // radio or checkbox
			
            if($.inArray(type, opt._valid_types) == -1){
                return;
            }
			
            var id = $obj[0].id;
            var $input_id = $('#' + id);
            var $label = $("label[for='" + id + "']");
            var img_id_format = opt._tick_img_id_format.replace('%s', id);
            var using_custom_btn = $.isFunction(opt.custom_button);
            var img_html = '';
            
            // Custom button
            if(using_custom_btn){
                img_html = $(opt.custom_button($label)).attr('id', img_id_format.replace('%s', id)).addClass(opt.image_tick_class);
            }
            else {
                img_html = opt.img_html.replace('%s1', opt.no_tick_image_path).replace('%s2', opt.image_tick_class).replace('%s3', id);
            }
			
            $obj.before(img_html).hide();
            var $img_id = $('#' + img_id_format);
            
            // Give any disabled inputs a disabled class on the img/custom button
            if($input_id[0].disabled){
                $img_id.addClass('disabled');
            }
			
            // If something has a checked state when the page was loaded
            if($obj[0].checked){
                // Make sure it's an image we're dealing with
                if($img_id[0].src){
                    $img_id[0].src = opt.tick_image_path;
                }
                // Dealing with custom buttons
                else {
                    $img_id.addClass(opt.custom_button_selected_class);
                }
            }
            
            // Delegate the click off to a function that will determine what to do with
            // it based on if it's a checkbox or a radio button
            $img_id.click(function(e){
                // Check each time we click on an element, it might change!
                if($input_id[0].disabled){
                    return;
                }
                $input_id.trigger("click");
                handleClickType.call(this, using_custom_btn, type, $input_id);
            });
			
            // Handle clicks for the labels
            if($label.length){
                $label.click(function(e){
                    e.preventDefault();	
                    $img_id.trigger('click');
                });
            }
			
        });
    };
	
})(jQuery);

/// ------------------------------------  END JQuery.ImageTick Plugin  ------------------------------------------------

/// ------------------------------------  JQuery.Truncate Width Plugin  ------------------------------------------------
(function($){
 $.fn.extend({
 
 	widthTruncate: function(options) {
		var defaults = {
			width: 'auto',
			after: '...'
		};
		
	  var options = $.extend(defaults, options);
	  
	  return this.each(function() {
	  if(options.width=='auto'){ truncateWidth=$(this).width()-8; }else{ truncateWidth = options.width}
			 if($(this).width()>truncateWidth){		 
			 var smaller_text = $(this).text();
			 $(this).html('<span id="truncateWrapper" style="display:inline;">'+options.after+'</div>');
			 		i=1;
			         while ($('#truncateWrapper').width() < truncateWidth) {
						$('#truncateWrapper').html(smaller_text.substr(0, i) + options.after);
						i++;
					}
					$(this).html($('#truncateWrapper').html());
			}
		
	  });
	  
	}

 });
})(jQuery);

/// ------------------------------------  END JQuery.Truncate Width Plugin  ------------------------------------------------

/// ------------------------------------  JQuery.truncatable Plugin  ------------------------------------------------
/*
 * truncatable 1.2 - jQuery lightwieght text truncation plugin
 * Copyright (c) 2009 Philip Beel (http://www.theodin.co.uk/) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 
 * Truncatable is a lightweight truncation plugin for jQuery. Designed for users who want to be able to hide and expand text on a page.
 * Revision: $Id: jquery.truncatable.js 2009-08-20 $
 */

(function($){$.fn.truncatable=function(options){var defaults={limit:100,more:'...',less:false,hideText:'[read less]'};var options=$.extend(defaults,options);return this.each(function(num){var stringLength=$(this).html().length;if(stringLength>defaults.limit){var splitText=$(this).html().substr(defaults.limit);var splitPoint=splitText.substr(0,1);var whiteSpace=new RegExp(/^\s+$/);for(var newLimit=defaults.limit;newLimit<stringLength;newLimit++){var newSplitText=$(this).html().substr(0,newLimit);var newHiddenText=$(this).html().substr(newLimit);var newSplitPoint=newSplitText.slice(-1);if(whiteSpace.test(newSplitPoint)){var hiddenText='<span class="hiddenText_'+num+'" style="display:none">'+newHiddenText+'</span>';var setNewLimit=(newLimit-1);var trunkLink=$('<a>').attr('class','more_'+num+'');$(this).html($(this).html().substr(0,setNewLimit)).append('<a class="more_'+num+'">'+defaults.more+'<a/> '+hiddenText);$('a.more_'+num).bind('click',function(){$('span.hiddenText_'+num).show();$('a.more_'+num).hide();if(defaults.less==true){$('span.hiddenText_'+num).append('<a class="hide_'+num+'" href="" title="'+defaults.hideText+'">'+defaults.hideText+'</a>');$('a.hide_'+num).bind('click',function(){$('.hiddenText_'+num).hide();$('.more_'+num).show();$('.hide_'+num).empty();return false})}});newLimit=stringLength}}}})}})(jQuery);

/// ------------------------------------  END JQuery.truncatable Plugin  ------------------------------------------------

/// ------------------------------------  JQuery.replaceText Plugin  ------------------------------------------------
/*
 * jQuery replaceText - v1.1 - 11/21/2009
 * http://benalman.com/projects/jquery-replacetext-plugin/
 * Copyright (c) 2009 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/
 */
(function($){$.fn.replaceText=function(b,a,c){return this.each(function(){var f=this.firstChild,g,e,d=[];if(f){do{if(f.nodeType===3){g=f.nodeValue;e=g.replace(b,a);if(e!==g){if(!c&&/</.test(e)){$(f).before(e);d.push(f)}else{f.nodeValue=e}}}}while(f=f.nextSibling)}d.length&&$(d).remove()})}})(jQuery);

/// ------------------------------------  END JQuery.replaceText Plugin  ------------------------------------------------

/// ------------------------------------  JQuery.Expander Plugin  ------------------------------------------------
/*!
 * jQuery Expander Plugin v1.3 * http://www.gnu.org/licenses/gpl.html
 * Date: Sat Sep 17 00:37:34 2011 EDT * Requires: jQuery v1.3+
 * Copyright 2011, Karl Swedberg * Dual licensed under the MIT and GPL licenses (just like jQuery): * http://www.opensource.org/licenses/mit-license.php 
 * The Expander Plugin hides (collapses) a portion of an element's content and adds a "read more" link so that the text can be viewed by the user if he or she wishes. By default, the expanded content is followed by a "read less" link that the user can click to re-collapse it. Expanded content can also be re-collapsed after a specified period of time.
*/

(function(c){c.expander={version:"1.3",defaults:{slicePoint:100,preserveWords:true,widow:4,expandText:"read more",expandPrefix:"&hellip; ",summaryClass:"summary",detailClass:"details",moreClass:"read-more",lessClass:"read-less",collapseTimer:0,expandEffect:"fadeIn",expandSpeed:250,collapseEffect:"fadeOut",collapseSpeed:200,userCollapse:true,userCollapseText:"read less",userCollapsePrefix:" ",onSlice:null,beforeExpand:null,afterExpand:null,onCollapse:null}};c.fn.expander=function(F){function G(a,e){var g=
"span",h=a.summary;if(e){g="div";h=h.replace(/(<\/[^>]+>)\s*$/,a.moreLabel+"$1");h='<div class="'+a.summaryClass+'">'+h+"</div>"}else h+=a.moreLabel;return[h,"<",g+' class="'+a.detailClass+'"',">",a.details,"</"+g+">"].join("")}function H(a){var e='<span class="'+a.moreClass+'">'+a.expandPrefix;e+='<a href="#">'+a.expandText+"</a></span>";return e}function u(a,e){if(a.lastIndexOf("<")>a.lastIndexOf(">"))a=a.slice(0,a.lastIndexOf("<"));if(e)a=a.replace(I,"");return a}function v(a,e){e.stop(true,true)[a.collapseEffect](a.collapseSpeed,
function(){e.prev("span."+a.moreClass).show().length||e.parent().children("div."+a.summaryClass).show().find("span."+a.moreClass).show()})}function J(a,e,g){if(a.collapseTimer)w=setTimeout(function(){v(a,e);c.isFunction(a.onCollapse)&&a.onCollapse.call(g,false)},a.collapseTimer)}var x=c.extend({},c.expander.defaults,F),K=/^<(?:area|br|col|embed|hr|img|input|link|meta|param).*>$/i,I=/(&(?:[^;]+;)?|\w+)$/,L=/<\/?(\w+)[^>]*>/g,y=/<(\w+)[^>]*>/g,z=/<\/(\w+)>/g,M=/^<[^>]+>.?/,w;this.each(function(){var a,
e,g,h,l,k,n,t,A=[],r=[],o={},p=this,f=c(this),B=c([]),b=c.meta?c.extend({},x,f.data()):x;k=!!f.find("."+b.detailClass).length;var q=!!f.find("*").filter(function(){return/^block|table|list/.test(c(this).css("display"))}).length,s=(q?"div":"span")+"."+b.detailClass,C="span."+b.moreClass,N=b.expandSpeed||0,m=c.trim(f.html());c.trim(f.text());var d=m.slice(0,b.slicePoint);if(!c.data(this,"expander")){c.data(this,"expander",true);c.each(["onSlice","beforeExpand","afterExpand","onCollapse"],function(i,
j){o[j]=c.isFunction(b[j])});d=u(d);for(summTagless=d.replace(L,"").length;summTagless<b.slicePoint;){newChar=m.charAt(d.length);if(newChar=="<")newChar=m.slice(d.length).match(M)[0];d+=newChar;summTagless++}d=u(d,b.preserveWords);h=d.match(y)||[];l=d.match(z)||[];g=[];c.each(h,function(i,j){K.test(j)||g.push(j)});h=g;e=l.length;for(a=0;a<e;a++)l[a]=l[a].replace(z,"$1");c.each(h,function(i,j){var D=j.replace(y,"$1"),E=c.inArray(D,l);if(E===-1){A.push(j);r.push("</"+D+">")}else l.splice(E,1)});r.reverse();
if(k){a=f.find(s).remove().html();d=f.html();m=d+a;k=""}else{a=m.slice(d.length);if(a.split(/\s+/).length<b.widow&&!k)return;k=r.pop()||"";d+=r.join("");a=A.join("")+a}b.moreLabel=f.find(C).length?"":H(b);if(q)a=m;d+=k;b.summary=d;b.details=a;b.lastCloseTag=k;if(o.onSlice)b=(g=b.onSlice.call(p,b))&&g.details?g:b;q=G(b,q);f.html(q);n=f.find(s);t=f.find(C);n.hide();t.find("a").unbind("click.expander").bind("click.expander",function(i){i.preventDefault();t.hide();B.hide();o.beforeExpand&&b.beforeExpand.call(p);
n.stop(false,true)[b.expandEffect](N,function(){n.css({zoom:""});o.afterExpand&&b.afterExpand.call(p);J(b,n,p)})});B=f.find("div."+b.summaryClass);b.userCollapse&&!f.find("span."+b.lessClass).length&&f.find(s).append('<span class="'+b.lessClass+'">'+b.userCollapsePrefix+'<a href="#">'+b.userCollapseText+"</a></span>");f.find("span."+b.lessClass+" a").unbind("click.expander").bind("click.expander",function(i){i.preventDefault();clearTimeout(w);i=c(this).closest(s);v(b,i);o.onCollapse&&b.onCollapse.call(p,
true)})}});return this};c.fn.expander.defaults=c.expander.defaults})(jQuery);
/// ------------------------------------  END JQuery.Expander Plugin  ------------------------------------------------

/// ------------------------------------  JQuery.Rule Plugin  ------------------------------------------------
/*
 * jQuery.Rule - Css Rules manipulation, the jQuery way.
 * Copyright (c) 2007-2011 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL. * Date: 02/7/2011 * @author Ariel Flesler * @version 1.0.2
 * This plugin allows quick creation/manipulation of CSS Rules, in a "jQuery-way". It includes features like chaining, iteration using each, selectors with context. Many functions are available, like slice, pushStack, not, add, remove, append, css, and some more. As far as it has been tested, the plugin should perform well in most browsers, some specials methods still need some more testing. Feedback is much appreciated.
 */
(function(f){var c=f('<style rel="alternate stylesheet" type="text/css" />').appendTo("head")[0],k=c.sheet?"sheet":"styleSheet",i=c[k],m=i.rules?"rules":"cssRules",g=i.deleteRule?"deleteRule":"removeRule",d=i.ownerNode?"ownerNode":"owningElement",e=/^([^{]+)\{([^}]*)\}/m,l=/([^:]+):([^;}]+)/;i.disabled=true;var j=f.rule=function(n,o){if(!(this instanceof j)){return new j(n,o)}this.sheets=j.sheets(o);if(n&&e.test(n)){n=j.clean(n)}if(typeof n=="object"&&!n.exec){b(this,n.get?n.get():n.splice?n:[n])}else{b(this,this.sheets.cssRules().get());if(n){return this.filter(n)}}return this};f.extend(j,{sheets:function(p){var n=p;if(typeof n!="object"){n=f.makeArray(document.styleSheets)}n=f(n).not(i);if(typeof p=="string"){n=n.ownerNode().filter(p).sheet()}return n},rule:function(n){if(n.selectorText){return["",n.selectorText,n.style.cssText]}return e.exec(n)},appendTo:function(q,n,o){switch(typeof n){case"string":n=this.sheets(n);case"object":if(n[0]){n=n[0]}if(n[k]){n=n[k]}if(n[m]){break}default:if(typeof q=="object"){return q}n=i}var t;if(!o&&(t=this.parent(q))){q=this.remove(q,t)}var s=this.rule(q);if(n.addRule){n.addRule(s[1],s[2]||";")}else{if(n.insertRule){n.insertRule(s[1]+"{"+s[2]+"}",n[m].length)}}return n[m][n[m].length-1]},remove:function(o,q){q=q||this.parent(o);if(q!=i){var n=q?f.inArray(o,q[m]):-1;if(n!=-1){o=this.appendTo(o,0,true);q[g](n)}}return o},clean:function(n){return f.map(n.split("}"),function(o){if(o){return j.appendTo(o+"}")}})},parent:function(o){if(typeof o=="string"||!f.browser.msie){return o.parentStyleSheet}var n;this.sheets().each(function(){if(f.inArray(o,this[m])!=-1){n=this;return false}});return n},outerText:function(n){return !n||!n.selectorText?"":[n.selectorText+"{","\t"+n.style.cssText,"}"].join("\n").toLowerCase()},text:function(o,n){if(n!==undefined){o.style.cssText=n}return !o?"":o.style.cssText.toLowerCase()}});j.fn=j.prototype={pushStack:function(n,p){var o=j(n,p||this.sheets);o.prevObject=this;return o},end:function(){return this.prevObject||j(0,[])},filter:function(n){var p;if(!n){n=/./}if(n.split){p=f.trim(n).toLowerCase().split(/\s*,\s*/);n=function(){var o=this.selectorText||"";return !!f.grep(o.toLowerCase().split(/\s*,\s*/),function(q){return f.inArray(q,p)!=-1}).length}}else{if(n.exec){p=n;n=function(){return p.test(this.selectorText)}}}return this.pushStack(f.grep(this,function(q,o){return n.call(q,o)}))},add:function(n,o){return this.pushStack(f.merge(this.get(),j(n,o)))},is:function(n){return !!(n&&this.filter(n).length)},not:function(p,o){p=j(p,o);return this.filter(function(){return f.inArray(this,p)==-1})},append:function(n){var p=this,o;f.each(n.split(/\s*;\s*/),function(r,q){if((o=l.exec(q))){p.css(o[1],o[2])}});return this},text:function(n){return !arguments.length?j.text(this[0]):this.each(function(){j.text(this,n)})},outerText:function(){return j.outerText(this[0])}};f.each({ownerNode:d,sheet:k,cssRules:m},function(n,o){var p=o==m;f.fn[n]=function(){return this.map(function(){return p?f.makeArray(this[o]):this[o]})}});f.fn.cssText=function(){return this.filter("link,style").eq(0).sheet().cssRules().map(function(){return j.outerText(this)}).get().join("\n")};f.each("remove,appendTo,parent".split(","),function(n,o){j.fn[o]=function(){var p=f.makeArray(arguments),q=this;p.unshift(0);return this.each(function(r){p[0]=this;q[r]=j[o].apply(j,p)||q[r]})}});f.each(("each,index,get,size,eq,slice,map,attr,andSelf,css,show,hide,toggle,queue,dequeue,stop,animate,fadeIn,fadeOut,fadeTo").split(","),function(n,o){j.fn[o]=f.fn[o]});function b(o,n){o.length=0;Array.prototype.push.apply(o,n)}var h=f.curCSS;f.curCSS=function(o,n){return("selectorText" in o)?o.style[n]||f.prop(o,n=="opacity"?1:0,"curCSS",0,n):h.apply(this,arguments)};j.cache={};var a=function(n){return function(p){var o=p.selectorText;if(o){arguments[0]=j.cache[o]=j.cache[o]||{}}return n.apply(f,arguments)}};f.data=a(f.data);f.removeData=a(f.removeData);f(window).unload(function(){f(i).cssRules().remove()})})(jQuery);
/// ------------------------------------  END JQuery.Rule Plugin  ------------------------------------------------


/// ------------------------------------  JQuery.Appear Plugin  ------------------------------------------------
/*
 * jQuery.appear
 * http://code.google.com/p/jquery-appear/
 * Copyright (c) 2009 Michael Hixson
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
*/
(function($){$.fn.appear=function(f,o){var s=$.extend({one:true},o);return this.each(function(){var t=$(this);t.appeared=false;if(!f){t.trigger('appear',s.data);return;}var w=$(window);var c=function(){if(!t.is(':visible')){t.appeared=false;return;}var a=w.scrollLeft();var b=w.scrollTop();var o=t.offset();var x=o.left;var y=o.top;if(y+t.height()>=b&&y<=b+w.height()&&x+t.width()>=a&&x<=a+w.width()){if(!t.appeared)t.trigger('appear',s.data);}else{t.appeared=false;}};var m=function(){t.appeared=true;if(s.one){w.unbind('scroll',c);var i=$.inArray(c,$.fn.appear.checks);if(i>=0)$.fn.appear.checks.splice(i,1);}f.apply(this,arguments);};if(s.one)t.one('appear',s.data,m);else t.bind('appear',s.data,m);w.scroll(c);$.fn.appear.checks.push(c);(c)();});};$.extend($.fn.appear,{checks:[],timeout:null,checkAll:function(){var l=$.fn.appear.checks.length;if(l>0)while(l--)($.fn.appear.checks[l])();},run:function(){if($.fn.appear.timeout)clearTimeout($.fn.appear.timeout);$.fn.appear.timeout=setTimeout($.fn.appear.checkAll,20);}});$.each(['append','prepend','after','before','attr','removeAttr','addClass','removeClass','toggleClass','remove','css','show','hide'],function(i,n){var u=$.fn[n];if(u){$.fn[n]=function(){var r=u.apply(this,arguments);$.fn.appear.run();return r;}}});})(jQuery);
/// ------------------------------------  END JQuery.Rule Plugin  ------------------------------------------------
