/**
* Provide the HTML to create the modal dialog.
*/
Drupal.theme.prototype.coheractioModal = function () {
  var html = ''

  html += '<div id="ctools-modal" class="popups-box">';
  html += '  <div class="ctools-modal-content coheractio-modal-content">';
  html += '    <table cellpadding="0" cellspacing="0" id="ctools-face-table">';
  html += '      <tr>';
  html += '        <td class="popups-tl popups-border"></td>';
  html += '        <td class="popups-t popups-border"></td>';
  html += '        <td class="popups-tr popups-border"></td>';
  html += '      </tr>';
  html += '      <tr>';
  html += '        <td class="popups-cl popups-border"></td>';
  html += '        <td class="popups-c" valign="top">';
  html += '          <div class="popups-container">';
  html += '            <div class="modal-header popups-title">';
  html += '              <span id="modal-title" class="modal-title"></span>';
  html += '              <span class="popups-close"><a class="close" href="#">' + Drupal.CTools.Modal.currentSettings.closeText + '</a></span>';
  html += '              <div class="clear-block"></div>';
  html += '            </div>';
  html += '            <div class="modal-scroll"><div id="modal-content" class="modal-content popups-body"></div></div>';
  if (Drupal.CTools.Modal.currentSettings.bottomClose) {
    html += '            <div class="popups-close popups-close-bottom"><a class="close" href="#">' + Drupal.CTools.Modal.currentSettings.closeTextBottom + '</a></div>';
  }
  html += '            <div class="popups-buttons"></div>'; //Maybe someday add the option for some specific buttons.
  html += '            <div class="popups-footer"></div>'; //Maybe someday add some footer.
  html += '          </div>';
  html += '        </td>';
  html += '        <td class="popups-cr popups-border"></td>';
  html += '      </tr>';
  html += '      <tr>';
  html += '        <td class="popups-bl popups-border"></td>';
  html += '        <td class="popups-b popups-border"></td>';
  html += '        <td class="popups-br popups-border"></td>';
  html += '      </tr>';
  html += '    </table>';
  html += '  </div>';
  html += '</div>';

  return html;

}
;
(function($) {

  /*
   * Equal height div : adapted from http://www.cssnewbie.com/equal-height-columns-with-jquery/
  */
  
  $.fn.equalHeight = function(group) {
    var tallest = 0;
    group.each(function() {
      var thisHeight = $(this).height();
      if(thisHeight > tallest) {
        tallest = thisHeight;
      }
    });
    group.height(tallest);
  };

  /*
   * 	Character Count Plugin - jQuery plugin
   * 	Dynamic character count for text areas and input fields
   *	written by Alen Grakalic	
   *	http://cssglobe.com/post/7161/jquery-plugin-simplest-twitterlike-dynamic-character-count-for-textareas
   *
   *	Copyright (c) 2009 Alen Grakalic (http://cssglobe.com)
   *	Dual licensed under the MIT (MIT-LICENSE.txt)
   *	and GPL (GPL-LICENSE.txt) licenses.
   *
   *	Built for jQuery library
   *	http://jquery.com
   *
   */

	$.fn.charCount = function(options){
	  
		// default configuration properties
		var defaults = {	
			allowed: 140,		
			warning: 25,
			css: 'counter',
			counterElement: 'span',
			cssWarning: 'warning',
			cssExceeded: 'exceeded',
			counterText: ''
		};
			
		var options = $.extend(defaults, options);
		
		function calculate(obj){
			var count = $(obj).val().length;
			var available = options.allowed - count;
			if(available <= options.warning && available >= 0){
				$(obj).next().addClass(options.cssWarning);
			} else {
				$(obj).next().removeClass(options.cssWarning);
			}
			if(available < 0){
				$(obj).next().addClass(options.cssExceeded);
			} else {
				$(obj).next().removeClass(options.cssExceeded);
			}
			$(obj).next().html(options.counterText + available);
		};
				
		this.each(function() {  			
			$(this).after('<'+ options.counterElement +' class="' + options.css + '">'+ options.counterText +'</'+ options.counterElement +'>');
			calculate(this);
			$(this).keyup(function(){calculate(this)});
			$(this).change(function(){calculate(this)});
      $(this).addClass('charCount-processed');
		});
	  
	};
  
  /*
   * label2value
   * jquery based script for using form labels as text field values
   * more info on http://cssglobe.com/post/1500/using-labels- 
   *
   * Copyright (c) 2008 Alen Grakalic (cssglobe.com)
   * Dual licensed under the MIT (MIT-LICENSE.txt)
   * and GPL (GPL-LICENSE.txt) licenses.
   * With custom from Coheractio
   */
  $.fn.label2value = function(){	

    var inactive = "inactive";
    var active = "active";
    var focused = "focused";
    
    this.find("label").each(function(){	
    if (document.getElementById($(this).attr("for"))) {
      obj = document.getElementById($(this).attr("for"));
      // Change input type does not work for IE below 8
      if($.browser.msie && parseInt($.browser.version) <= 8 && ($(obj).attr("type") == "password")) {
        return true;
      }

      if(($(obj).attr("type") == "text") || (obj.tagName.toLowerCase() == "textarea") || ($(obj).attr("type") == "password")){			
        $(obj).addClass(inactive);	
        //var text = $(this).text();
        var text = jQuery.trim($(this).text()); // Clean ajax white space
        $(this).text(text); // Clean ajax white space
        $(this).css("display","none");		      
        if ($(obj).val()  == '') { // Prevent clearing form field in case of validation error
          $(obj).val(text);
        };
        if ($(obj).attr('type') == 'password' && $(obj).val() == text ) {
          obj.setAttribute("type","text");
          obj.setAttribute("custom_attr","password"); // Custom attribute
        }
        // Focus
        $(obj).focus(function(){	
          $(this).addClass(focused);
          $(this).removeClass(inactive);
          $(this).removeClass(active);								  
          if($(this).val() == text) $(this).val("");
          if ($(this).attr('custom_attr') == 'password') {
            obj.setAttribute("type","password");
          }
        });	
        // Blur
        $(obj).blur(function(){	
          $(this).removeClass(focused);													 
          if($(this).val() == "") {
            $(this).val(text);
            $(this).addClass(inactive);
            if ($(this).attr('custom_attr') == 'password') {
              obj.setAttribute("type","text");
            }          
          } else {
            $(this).addClass(active);		
          };				
        });
        // Submit 
        var form = $(this).closest('form');
        form.submit(function() {
          if($(obj).val() == text) {
            $(obj).val(""); // Prévent validating labels as input
          };
        });
      };
    };    
    });		
  };  

})(jQuery);




;
/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Â© 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Â© 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */;
/*
 * jQuery Color Animations v@VERSION
 * http://jquery.org/
 *
 * Copyright 2011 John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Date: @DATE
 */

(function( jQuery, undefined ){
	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color outlineColor".split(" "),

		// plusequals test for += 100 -= 100
		rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
		// a set of RE's that can match strings and generate color tuples.
		stringParsers = [{
				re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
				parse: function( execResult ) {
					return [
						execResult[ 1 ],
						execResult[ 2 ],
						execResult[ 3 ],
						execResult[ 4 ]
					];
				}
			}, {
				re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
				parse: function( execResult ) {
					return [
						2.55 * execResult[1],
						2.55 * execResult[2],
						2.55 * execResult[3],
						execResult[ 4 ]
					];
				}
			}, {
				re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,
				parse: function( execResult ) {
					return [
						parseInt( execResult[ 1 ], 16 ),
						parseInt( execResult[ 2 ], 16 ),
						parseInt( execResult[ 3 ], 16 )
					];
				}
			}, {
				re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,
				parse: function( execResult ) {
					return [
						parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
						parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
						parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
					];
				}
			}, {
				re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
				space: "hsla",
				parse: function( execResult ) {
					return [
						execResult[1],
						execResult[2] / 100,
						execResult[3] / 100,
						execResult[4]
					];
				}
			}],

		// jQuery.Color( )
		color = jQuery.Color = function( color, green, blue, alpha ) {
			return new jQuery.Color.fn.parse( color, green, blue, alpha );
		},
		spaces = {
			rgba: {
				cache: "_rgba",
				props: {
					red: {
						idx: 0,
						type: "byte",
						empty: true
					},
					green: {
						idx: 1,
						type: "byte",
						empty: true
					},
					blue: {
						idx: 2,
						type: "byte",
						empty: true
					},
					alpha: {
						idx: 3,
						type: "percent",
						def: 1
					}
				}
			},
			hsla: {
				cache: "_hsla",
				props: {
					hue: {
						idx: 0,
						type: "degrees",
						empty: true
					},
					saturation: {
						idx: 1,
						type: "percent",
						empty: true
					},
					lightness: {
						idx: 2,
						type: "percent",
						empty: true
					}
				}
			}
		},
		propTypes = {
			"byte": {
				floor: true,
				min: 0,
				max: 255
			},
			"percent": {
				min: 0,
				max: 1
			},
			"degrees": {
				mod: 360,
				floor: true
			}
		},
		rgbaspace = spaces.rgba.props,
		support = color.support = {},

		// colors = jQuery.Color.names
		colors,

		// local aliases of functions called often
		each = jQuery.each;

	spaces.hsla.props.alpha = rgbaspace.alpha;

	function clamp( value, prop, alwaysAllowEmpty ) {
		var type = propTypes[ prop.type ] || {},
			allowEmpty = prop.empty || alwaysAllowEmpty;

		if ( allowEmpty && value == null ) {
			return null;
		}
		if ( prop.def && value == null ) {
			return prop.def;
		}
		if ( type.floor ) {
			value = ~~value;
		} else {
			value = parseFloat( value );
		}
		if ( value == null || isNaN( value ) ) {
			return prop.def;
		}
		if ( type.mod ) {
			value = value % type.mod;
			// -10 -> 350
			return value < 0 ? type.mod + value : value;
		}

		// for now all property types without mod have min and max
		return type.min > value ? type.min : type.max < value ? type.max : value;
	}

	color.fn = color.prototype = {
		constructor: color,
		parse: function( red, green, blue, alpha ) {
			if ( red === undefined ) {
				this._rgba = [ null, null, null, null ];
				return this;
			}
			if ( red instanceof jQuery || red.nodeType ) {
				red = red instanceof jQuery ? red.css( green ) : jQuery( red ).css( green );
				green = undefined;
			}

			var inst = this,
				type = jQuery.type( red ),
				rgba = this._rgba = [],
				source;

			// more than 1 argument specified - assume ( red, green, blue, alpha )
			if ( green !== undefined ) {
				red = [ red, green, blue, alpha ];
				type = "array";
			}

			if ( type === "string" ) {
				red = red.toLowerCase();
				each( stringParsers, function( i, parser ) {
					var match = parser.re.exec( red ),
						values = match && parser.parse( match ),
						parsed,
						spaceName = parser.space || "rgba",
						cache = spaces[ spaceName ].cache;


					if ( values ) {
						parsed = inst[ spaceName ]( values );

						// if this was an rgba parse the assignment might happen twice
						// oh well....
						inst[ cache ] = parsed[ cache ];
						rgba = inst._rgba = parsed._rgba;

						// exit each( stringParsers ) here because we matched
						return false;
					}
				});

				// Found a stringParser that handled it
				if ( rgba.length !== 0 ) {

					// if this came from a parsed string, force "transparent" when alpha is 0
					// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
					if ( Math.max.apply( Math, rgba ) === 0 ) {
						jQuery.extend( rgba, colors.transparent );
					}
					return this;
				}

				// named colors / default - filter back through parse function
				red = colors[ red ] || colors._default;
				return this.parse( red );
			}

			if ( type === "array" ) {
				each( rgbaspace, function( key, prop ) {
					rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
				});
				return this;
			}

			if ( type === "object" ) {
				if ( red instanceof color ) {
					each( spaces, function( spaceName, space ) {
						if ( red[ space.cache ] ) {
							inst[ space.cache ] = red[ space.cache ].slice();
						}
					});
				} else {
					each( spaces, function( spaceName, space ) {
						each( space.props, function( key, prop ) {
							var cache = space.cache;

							// if the cache doesn't exist, and we know how to convert
							if ( !inst[ cache ] && space.to ) {

								// if the value was null, we don't need to copy it
								// if the key was alpha, we don't need to copy it either
								if ( red[ key ] == null || key === "alpha") {
									return;
								}
								inst[ cache ] = space.to( inst._rgba );
							}

							// this is the only case where we allow nulls for ALL properties.
							// call clamp with alwaysAllowEmpty
							inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
						});
					});
				}
				return this;
			}
		},
		is: function( compare ) {
			var is = color( compare ),
				same = true,
				myself = this;

			each( spaces, function( _, space ) {
				var isCache = is[ space.cache ],
					localCache;
				if (isCache) {
					localCache = myself[ space.cache ] || space.to && space.to( myself._rgba ) || [];
					each( space.props, function( _, prop ) {
						if ( isCache[ prop.idx ] != null ) {
							same = ( isCache[ prop.idx ] == localCache[ prop.idx ] );
							return same;
						}
					});
				}
				return same;
			});
			return same;
		},
		_space: function() {
			var used = [],
				inst = this;
			each( spaces, function( spaceName, space ) {
				if ( inst[ space.cache ] ) {
					used.push( spaceName );
				}
			});
			return used.pop();
		},
		transition: function( other, distance ) {
			var end = color( other ),
				spaceName = end._space(),
				space = spaces[ spaceName ],
				start = this[ space.cache ] || space.to( this._rgba ),
				result = start.slice();

			end = end[ space.cache ];
			each( space.props, function( key, prop ) {
				var index = prop.idx,
					startValue = start[ index ],
					endValue = end[ index ],
					type = propTypes[ prop.type ] || {};

				// if null, don't override start value
				if ( endValue === null ) {
					return;
				}
				// if null - use end
				if ( startValue === null ) {
					result[ index ] = endValue;
				} else {
					if ( type.mod ) {
						if ( endValue - startValue > type.mod / 2 ) {
							startValue += type.mod;
						} else if ( startValue - endValue > type.mod / 2 ) {
							startValue -= type.mod;
						}
					}
					result[ prop.idx ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
				}
			});
			return this[ spaceName ]( result );
		},
		blend: function( opaque ) {
			// if we are already opaque - return ourself
			if ( this._rgba[ 3 ] === 1 ) {
				return this;
			}

			var rgb = this._rgba.slice(),
				a = rgb.pop(),
				blend = color( opaque )._rgba;

			return color( jQuery.map( rgb, function( v, i ) {
				return ( 1 - a ) * blend[ i ] + a * v;
			}));
		},
		toRgbaString: function() {
			var prefix = "rgba(",
				rgba = jQuery.map( this._rgba, function( v, i ) {
					return v == null ? ( i > 2 ? 1 : 0 ) : v;
				});

			if ( rgba[ 3 ] === 1 ) {
				rgba.pop();
				prefix = "rgb(";
			}

			return prefix + rgba.join(",") + ")";
		},
		toHslaString: function() {
			var prefix = "hsla(",
				hsla = jQuery.map( this.hsla(), function( v, i ) {
					if ( v == null ) {
						v = i > 2 ? 1 : 0;
					}

					// catch 1 and 2
					if ( i && i < 3 ) {
						v = Math.round( v * 100 ) + "%";
					}
					return v;
				});

			if ( hsla[ 3 ] == 1 ) {
				hsla.pop();
				prefix = "hsl(";
			}
			return prefix + hsla.join(",") + ")";
		},
		toHexString: function( includeAlpha ) {
			var rgba = this._rgba.slice(),
				alpha = rgba.pop();

			if ( includeAlpha ) {
				rgba.push( ~~( alpha * 255 ) );
			}

			return "#" + jQuery.map( rgba, function( v, i ) {

				// default to 0 when nulls exist
				v = ( v || 0 ).toString( 16 );
				return v.length == 1 ? "0" + v : v;
			}).join("");
		},
		toString: function() {
			return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
		}
	};
	color.fn.parse.prototype = color.fn;

	// hsla conversions adapted from:
	// http://www.google.com/codesearch/p#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/inspector/front-end/Color.js&d=7&l=193

	function hue2rgb( p, q, h ) {
		h = ( h + 1 ) % 1;
		if ( h * 6 < 1 ) {
			return p + (q - p) * 6 * h;
		}
		if ( h * 2 < 1) {
			return q;
		}
		if ( h * 3 < 2 ) {
			return p + (q - p) * ((2/3) - h) * 6;
		}
		return p;
	}

	spaces.hsla.to = function ( rgba ) {
		if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
			return [ null, null, null, rgba[ 3 ] ];
		}
		var r = rgba[ 0 ] / 255,
			g = rgba[ 1 ] / 255,
			b = rgba[ 2 ] / 255,
			a = rgba[ 3 ],
			max = Math.max( r, g, b ),
			min = Math.min( r, g, b ),
			diff = max - min,
			add = max + min,
			l = add * 0.5,
			h, s;

		if ( min === max ) {
			h = 0;
		} else if ( r === max ) {
			h = ( 60 * ( g - b ) / diff ) + 360;
		} else if ( g === max ) {
			h = ( 60 * ( b - r ) / diff ) + 120;
		} else {
			h = ( 60 * ( r - g ) / diff ) + 240;
		}

		if ( l === 0 || l === 1 ) {
			s = l;
		} else if ( l <= 0.5 ) {
			s = diff / add;
		} else {
			s = diff / ( 2 - add );
		}
		return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
	};

	spaces.hsla.from = function ( hsla ) {
		if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
			return [ null, null, null, hsla[ 3 ] ];
		}
		var h = hsla[ 0 ] / 360,
			s = hsla[ 1 ],
			l = hsla[ 2 ],
			a = hsla[ 3 ],
			q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
			p = 2 * l - q,
			r, g, b;

		return [
			Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
			Math.round( hue2rgb( p, q, h ) * 255 ),
			Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
			a
		];
	};


	each( spaces, function( spaceName, space ) {
		var props = space.props,
			cache = space.cache,
			to = space.to,
			from = space.from;

		// makes rgba() and hsla()
		color.fn[ spaceName ] = function( value ) {

			// generate a cache for this space if it doesn't exist
			if ( to && !this[ cache ] ) {
				this[ cache ] = to( this._rgba );
			}
			if ( value === undefined ) {
				return this[ cache ].slice();
			}

			var type = jQuery.type( value ),
				arr = ( type === "array" || type === "object" ) ? value : arguments,
				local = this[ cache ].slice(),
				ret;

			each( props, function( key, prop ) {
				var val = arr[ type === "object" ? key : prop.idx ];
				if ( val == null ) {
					val = local[ prop.idx ];
				}
				local[ prop.idx ] = clamp( val, prop );
			});

			if ( from ) {
				ret = color( from( local ) );
				ret[ cache ] = local;
				return ret;
			} else {
				return color( local );
			}
		};

		// makes red() green() blue() alpha() hue() saturation() lightness()
		each( props, function( key, prop ) {
			// alpha is included in more than one space
			if ( color.fn[ key ] ) {
				return;
			}
			color.fn[ key ] = function( value ) {
				var vtype = jQuery.type( value ),
					fn = ( key === 'alpha' ? ( this._hsla ? 'hsla' : 'rgba' ) : spaceName ),
					local = this[ fn ](),
					cur = local[ prop.idx ],
					match;

				if ( vtype === "undefined" ) {
					return cur;
				}

				if ( vtype === "function" ) {
					value = value.call( this, cur );
					vtype = jQuery.type( value );
				}
				if ( value == null && prop.empty ) {
					return this;
				}
				if ( vtype === "string" ) {
					match = rplusequals.exec( value );
					if ( match ) {
						value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
					}
				}
				local[ prop.idx ] = value;
				return this[ fn ]( local );
			};
		});
	});

	// add .fx.step functions
	each( stepHooks, function( i, hook ) {
		jQuery.cssHooks[ hook ] = {
			set: function( elem, value ) {
				value = color( value );
				if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
					var backgroundColor,
						curElem = hook === "backgroundColor" ? elem.parentNode : elem;
					do {
						backgroundColor = jQuery.curCSS( curElem, "backgroundColor" );
					} while (
						( backgroundColor === "" || backgroundColor === "transparent" ) &&
						( curElem = curElem.parentNode ) &&
						curElem.style
					);

					value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
						backgroundColor :
						"_default" );
				}

				value = value.toRgbaString();

				elem.style[ hook ] = value;
			}
		};
		jQuery.fx.step[ hook ] = function( fx ) {
			if ( !fx.colorInit ) {
				fx.start = color( fx.elem, hook );
				fx.end = color( fx.end );
				fx.colorInit = true;
			}
			jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
		};
	});

	// detect rgba support
	jQuery(function() {
		var div = document.createElement( "div" ),
			div_style = div.style;

		div_style.cssText = "background-color:rgba(1,1,1,.5)";
		support.rgba = div_style.backgroundColor.indexOf( "rgba" ) > -1;
	});

	// Some named colors to work with
	// From Interface by Stefan Petre
	// http://interface.eyecon.ro/
	colors = jQuery.Color.names = {
		aqua: "#00ffff",
		azure: "#f0ffff",
		beige: "#f5f5dc",
		black: "#000000",
		blue: "#0000ff",
		brown: "#a52a2a",
		cyan: "#00ffff",
		darkblue: "#00008b",
		darkcyan: "#008b8b",
		darkgrey: "#a9a9a9",
		darkgreen: "#006400",
		darkkhaki: "#bdb76b",
		darkmagenta: "#8b008b",
		darkolivegreen: "#556b2f",
		darkorange: "#ff8c00",
		darkorchid: "#9932cc",
		darkred: "#8b0000",
		darksalmon: "#e9967a",
		darkviolet: "#9400d3",
		fuchsia: "#ff00ff",
		gold: "#ffd700",
		green: "#008000",
		indigo: "#4b0082",
		khaki: "#f0e68c",
		lightblue: "#add8e6",
		lightcyan: "#e0ffff",
		lightgreen: "#90ee90",
		lightgrey: "#d3d3d3",
		lightpink: "#ffb6c1",
		lightyellow: "#ffffe0",
		lime: "#00ff00",
		magenta: "#ff00ff",
		maroon: "#800000",
		navy: "#000080",
		olive: "#808000",
		orange: "#ffa500",
		pink: "#ffc0cb",
		purple: "#800080",
		violet: "#800080",
		red: "#ff0000",
		silver: "#c0c0c0",
		white: "#ffffff",
		yellow: "#ffff00",
		transparent: [ null, null, null, 0 ],
		_default: "#ffffff"
	};
})( jQuery );
;
// Common js

(function($) {
  Drupal.behaviors.coheractio = {
    attach: function (context, settings) {
      
      // Hide +1 for IE7 and below not supported
      if($.browser.msie && $.browser.version <= 7){
        $('.region-sidebar-second #block-coheractio-contextual-tools .tools-links ul li ul.tools-share li:eq(1)').hide();
      };
     
      // equalHeight bottom blocks
      if ($('body').hasClass('front')){
        var equalHeightblocks = 
          $('.front .three-3x33 .block-content .content-column,'+
            '.front .three-3x33 .region-three-33-first .block-content .view,'+
            '.front .three-3x33 .region-three-33-third .block-content .view');
        equalHeightblocks.equalHeight(equalHeightblocks);
        equalHeightblocks.find('a.link-more').parent().addClass('link-more-bottom');
      };
      
      // Display label into input field
      $("#modalContent .view-modal-search").label2value();
      
      // Tools menu hovering
      $("#block-coheractio-contextual-tools ul li.level-1").focus(function (){$(this).hover()});
      $("#block-coheractio-contextual-tools ul li.level-1").hover(
        function () {
          $(this).find('a.level-1').addClass('over');
          $(this).find('ul').show();
        }, 
        function () {
          // Don't use regular hover to make +1 form display
          //$(this).find('a.level-1').removeClass('over');
          //$(this).find('ul').hide();
        }
      );
      // Hide submenu
      $("#block-coheractio-contextual-tools ul li.level-1").mouseleave(function(){
        $(this).find('a.level-1').removeClass('over');
        $(this).find('ul').hide();
      });
      
      // highlight offer block on hover
      var tcell = $('table.offer-table td');
      var tcell_img = $('img').closest('td');
      var timg = $('table.offer-table td img');
      var ttitle = $('table.offer-table td p.offer-title a');
      tcell.hover(
        function () {
          tdhref = $(this).find('p.offer-title a').attr('href');
          if (typeof tdhref != 'undefined'){
            var tdcell_img_td = tcell_img.find('a[href="'+tdhref+'"]').closest('td');
            var tdcell_img_img = tcell_img.find('a[href="'+tdhref+'"] img');
            tdcell_img_img.attr('src', tdcell_img_img.attr('src').replace('.png','_hover.png'));
            $(this).stop().animate({ backgroundColor: "#F0F0F0" }, 750);
            tdcell_img_td.stop().animate({ backgroundColor: "#F0F0F0" }, 750);
            $(this).find('p.offer-title a').stop().animate({ backgroundColor: "#F0F0F0" }, 750);
            
          }else{
            tdhref = $(this).find('a').attr('href');
            var tdcell_img_img = tcell_img.find('a[href="'+tdhref+'"] img');
            tdcell_img_img.attr('src', tdcell_img_img.attr('src').replace('.png','_hover.png'));
            $(this).stop().animate({ backgroundColor: "#F0F0F0" }, 750);
            tcell.find('p.offer-title a[href="'+tdhref+'"]').closest('td').stop().animate({ backgroundColor: "#F0F0F0" }, 750);
            tcell.find('p.offer-title a[href="'+tdhref+'"]').stop().animate({ backgroundColor: "#F0F0F0" }, 750);
          }
        }, 
        function () {
          tdhref = $(this).find('p.offer-title a').attr('href');
          if (typeof tdhref != 'undefined'){
            var tdcell_img_td = tcell_img.find('a[href="'+tdhref+'"]').closest('td');
            var tdcell_img_img = tcell_img.find('a[href="'+tdhref+'"] img');
            tdcell_img_img.attr('src', tdcell_img_img.attr('src').replace('_hover.png','.png'));
            $(this).stop().animate({ backgroundColor: "#FFF" }, 350);
            tdcell_img_td.stop().animate({ backgroundColor: "#FFF" }, 350);
            $(this).find('p.offer-title a').stop().animate({ backgroundColor: "#FFF" }, 350);
            
          }else{
            tdhref = $(this).find('a').attr('href');
            var tdcell_img_img = tcell_img.find('a[href="'+tdhref+'"] img');
            tdcell_img_img.attr('src', tdcell_img_img.attr('src').replace('_hover.png','.png'));
            $(this).stop().animate({ backgroundColor: "#FFF" }, 350);
            tcell.find('p.offer-title a[href="'+tdhref+'"]').closest('td').stop().animate({ backgroundColor: "#FFF" }, 350);
            tcell.find('p.offer-title a[href="'+tdhref+'"]').stop().animate({ backgroundColor: "#FFF" }, 350);
          }          
        }
      );
    
      // Portfolio quicksand
      $projectList = $('ul#project-list');
      $projectListClone = $projectList.clone(); 
      
      $('ul#keyword-list li:not(.first) a').removeClass('active'); // By default active class is added - current page
      $('ul#keyword-list a').click(function(e) {
        e.preventDefault();
        $filterClass = $(this).attr('class');
        $('ul#keyword-list li').removeClass('selected');
        $('ul#keyword-list a').removeClass('active');
        $(this).stop().delay(1000).addClass('active');
        $(this).parent().addClass('selected');
     
        if($filterClass == 'all'){
            $filters = $projectListClone.find('li');
        } else {
            $filters = $projectListClone.find('li[data-type~='+ $filterClass +']');
        }
        $projectList.quicksand($filters, {
          duration: 1000,
          easing: 'easeInOutQuad'
        });
      });
      
      // Trigger portfolio quicksand if there is an anchor in url
      var tid = window.location.hash.substring(1);
      $('ul#keyword-list li [data-value='+tid+']').trigger('click');
      //$.scrollTo( 0 );
      
      // Jquery cycle home page carousel
      // Callback functions
      function onBefore(currElement, nextElement, opts) {
        //if(!$.browser.msie){ // IE doesn't like combining effect
          //opts.animOut.opacity = 0; // Fade previous slide
        //}
        //$(this).find('.slide-caption').hide();
        // Avoid sliding when displaying the initial slide (ugly on Chrome)
        // currElement and nextElement are identical only on initial slide
        if ( currElement != nextElement ) { 
          //$(this).find('.slide-caption').animate({ left: '-=400',},500); 
          //$(this).find('.slide-caption').animate({ left: '+=1500',},1); 
          $(this).find('.slide-caption').animate({ left: '+=300'},1).animate({ left: '-=300'},1000)
        }     
      };
      function onAfter(currElement, nextElement, opts) {
        //var index = opts.currSlide;
        //$('#prev')[index == 0 ? 'hide' : 'show']();
        //$('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
        //$(this).find('.slide-caption').fadeIn(500);
        if ( currElement != nextElement ) {
          //$(this).find('.slide-caption').animate({ left: '+=400',},500); 
          //$(this).find('.slide-caption').animate({ left: '-=1500',},500); 
          //$(this).find('.slide-caption').animate({ left: '-=400'},500); 
        }
        $('.slider-pager-link').blur();
      };
      
      // Trigger slideshow
      if ($('#homepage-slider').length > 0 && !($('body').hasClass('slider-processed'))) {
        $('#homepage-slider').cycle({
          fx: 'uncover',
          easing:'easeInOutQuad',
          //delay:    -1000, // In order to fade previous slide
          //pager: '#slider-pager',
          next: '#slider-pager-next', 
          prev: '#slider-pager-prev',
          speed:800,
          timeout: 10000,
          pause:1,
          pauseOnPagerHover: 1,
          before : onBefore,
          after: onAfter,
          cleartype:1
        });
        $('body').addClass('slider-processed');        
      };
      
      // Adjust slider navigation
      /*
      $(window).resize(function() {
        var w_window = $(window).width();
        var w_slider = 963;
        if (w_window < 1070){
          $('#slider-pager').addClass('small');
          $('#slider-pager a#slider-pager-prev.slider-pager-link').css({ 'left': 0});
          $('#slider-pager a#slider-pager-next.slider-pager-link').css({ 'right':0});  
        }else{
          $('#slider-pager').removeClass('small');
          $('#slider-pager a#slider-pager-prev.slider-pager-link').css({ 'left': -((w_window - w_slider)/2 + 3)+'px'});
          $('#slider-pager a#slider-pager-next.slider-pager-link').css({ 'right': -((w_window - w_slider)/2 + 2)+'px'});          
        }

      });
      $(window).trigger('resize');
      */
      
      // Galleria slideshow 
      
      // Wrap content image before triggering galleria
      var content_img = $('div.img-galleria img');
      content_img.each(function(index) {
        var src_style = $(this).attr('src');
        var src_original = src_style.replace("styles/square_thumbnail/public", "");
        $(this).attr('src', src_style);
        $(this).wrap('<div class="article-galleria-img-small">');
        //$(this).wrap('<a href="'+src_original+'" rel="'+src_original+'">');
        $(this).wrap('<a>');
        $(this).parent('a').attr('href', src_original).attr('rel', src_original);
      });
   
      var galleria_element = $('.article-galleria-img-small, .article-type-project .field-name-field-project-img .field-items');
      
      // Avoid triggering several times when ajax loading page
      if (galleria_element.length > 0 && !($('body').hasClass('article-img-galleria-processed'))) {
        // Load the folio theme
        Galleria.loadTheme('/sites/all/libraries/galleria/themes/folio/galleria.folio.min.js');

        // Set up width
        if (galleria_element.hasClass('article-galleria-img-small')) var galleria_width = 210;
        if (galleria_element.hasClass('field-items')) var galleria_width = 480;
             
        /*
        switch($(this)){
          case $('.article-galleria-img-small'):
            var galleria_width = 220;
            console.log('img');
            break;
          case $('.article-type-project .field-name-field-project-img .field-items'):
            var galleria_width = 480;
            break;
          default:
            var galleria_width = 480;
          }
        */
        // Initialize Galleria
        galleria_element.galleria({
            width: galleria_width,
            transition:'slide',
            fullscreenCrop:false,
            showImagenav:true,
            idleMode:false,
            maxScaleRatio:1, // Prevent upscale
            imageCrop:false,
            //imagePosition:'center top',
            imagePosition:'center center',
            showCounter:false,
            initialTransition:'fade',
            easing:'galleriaOut',
            lightbox: true,
            _toggleInfo:false, // Show info box all the time - classic theme
            thumbFit:true,
            
            // Add custom title so it is always displayed
            extend: function(options) {
              // trigger when thumbnail is loaded
              this.bind('thumbnail', function(e) {
                var title_text = ($(e.thumbTarget).parent().find('.galleria-plus span').html() != null) ?
                  $(e.thumbTarget).parent().find('.galleria-plus span').html() : 'Zoomer';
                $(e.thumbTarget).parent().append(
                  '<div class="galleria-custom-title"><span>' + title_text + '</span></div>'
                );
                $(e.thumbTarget).parent().find('.galleria-plus span').remove();
              });
              
              this.bind('fullscreen_enter', function(e) {
                $('div.img-galleria .galleria-thumbnails').css({'display':'none'});
                $('#content-column').css({'z-index':'100'});
                $('.region-sidebar-second').css({'position':'relative'});
              });
              
              this.bind('fullscreen_exit', function(e) {
                $('div.img-galleria .galleria-thumbnails').css({'display':'block'});
                $('#content-column').css({'z-index':'1'});
                //$(this._target).parent( $('div.img-galleria')).css({'z-index':'100'});
              });
              
            }
            
        });

        $('body').addClass('article-img-galleria-processed');
      }
    
      // FB Async load and event binding
      window.fbAsyncInit = function() {
        FB.init({
          xfbml      : true  // parse XFBML
        });
        FB.Event.subscribe('edge.create',
          function(response) {
          $('.tools-share.level-2').addClass('test').show();
             // alert('You liked the URL: ' + response);
          }
        );
      };
        
      // Load the SDK Asynchronously
      (function(d){
         var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
         js = d.createElement('script'); js.id = id; js.async = true;
         js.src = '//connect.facebook.net/en_US/all.js';
         d.getElementsByTagName('head')[0].appendChild(js);
       }(document));
    
      // FB End
    
    } 
  };
})(jQuery);

;
window.___jsl=window.___jsl||{};
window.___jsl.h=window.___jsl.h||'m;\/_\/apps-static\/_\/js\/widget\/__features__\/rt=j\/ver=7iD2MS0XT5o.fr.\/sv=1\/am=!btQqDgonkFGIHk0RyA\/d=1\/';
window.___jsl.l=[];
window.___gpq=[];
window.gapi=window.gapi||{};
window.gapi.plusone=window.gapi.plusone||(function(){
  function f(n){return function(){window.___gpq.push(n,arguments)}}
  return{go:f('go'),render:f('render')}})();
function __bsld(){var p=window.gapi.plusone=window.googleapisv0.plusone;var f;while(f=window.___gpq.shift()){
  p[f]&&p[f].apply(p,window.___gpq.shift())}
p=window.gapi.plus=window.googleapisv0.plus;while(f=window.___gbq.shift()){
  p[f]&&p[f].apply(p,window.___gbq.shift())}
}
window.___gbq=[];
window.gapi.plus=window.gapi.plus||(function(){
  function f(n){return function(){window.___gbq.push(n,arguments)}}
  return{go:f('go'),render:f('render')}})();
window.__GOOGLEAPIS=window.__GOOGLEAPIS||{};
window.__GOOGLEAPIS.iframes=window.__GOOGLEAPIS.iframes||{};
window.__GOOGLEAPIS.iframes.plus=window.__GOOGLEAPIS.iframes.plus||{url:':socialhost:/u/:session_index:/_/pages/badge'};window['___jsl'] = window['___jsl'] || {};window['___jsl']['uc'] = 'https:\/\/apis.google.com\/js\/plusone.js';window['___jsl']['u'] = 'https:\/\/apis.google.com\/js\/plusone.js';window['___jsl']['f'] = ['plusone-unsupported'];window['___jsl']['ms'] = 'https://plus.google.com';(window['___jsl']['ci'] = (window['___jsl']['ci'] || [])).push({"isPlusUser":false});var gapi=window.gapi||{};gapi.client=window.gapi&&window.gapi.client||{};
window.gapi=window.gapi||{};
(function(){var A=void 0,B=void 0,C="___jsl",U="h",D="l",V="m",E="ms",W="ci",X="cu",Y="c",Z="cm",$="o",n="p",o="q",F="lc",G="Q",s="I",t="il",u="_",v="https://ssl.gstatic.com",aa="/webclient/js",ba="/webclient/jsx/",H="https://apis.google.com",I=".js",ca="gcjs-3p",da=/^(https?:)?\/\/([^/:@]*)(:[0-9]+)?(\/[\w.,:!=/-]*)(\?[^#]*)?(#.*)?$/,J=/^[?#]([^&]*&)*jsh=([^&]*)/,K="d",p="r",ea="f",q="m",L="n",fa="sync",ga="callback",ha="config",ia="_ci",w="nodep",M="gapi.load: ",N=function(a,b){A&&A(a,b);throw M+
a+(b&&" "+b);},O=function(a){B&&B(a);var b=window.console;b&&b.warn(M+a)},ja=function(a,b,c){a=a[U];if(b=b&&J.exec(b)||c&&J.exec(c))try{a=decodeURIComponent(b[2])}catch(d){O("Invalid hint "+b[2])}return a},P=function(a){a.sort();for(var b=0;b<a.length;)!a[b]||b&&a[b]==a[b-1]?a.splice(b,1):++b},Q=function(a,b){for(var c={},d=0;d<b.length;d++)c[b[d]]=!0;for(d=0;d<a.length;d++)if(!c.hasOwnProperty(a[d]))return!1;return!0},ka=function(a){if("loading"!=document.readyState)return!1;if("undefined"!=typeof window.___gapisync)return window.___gapisync;
if(a&&(a=a[fa],"undefined"!=typeof a))return a;for(var a=document.getElementsByTagName("meta"),b=0,c;c=a[b];++b)if("generator"==c.getAttribute("name")&&"blogger"==c.getAttribute("content"))return!0;return!1},R=function(a,b){if(ka(a))document.write('<script src="'+encodeURI(b)+'"><\/script>');else{var c=b,d=document.createElement("script");d.setAttribute("src",c);d.async=!0;c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(d,c)}},S=function(a,b,c,d,e,f){var g=c.shift(),h;h=g==
p?v:g==q?d[E]||H:(h=c.shift())&&h.replace(/\/+$/,"");var j;g==p?(j=c.shift(),j=(j.indexOf(ba)?aa+"/":"")+j):j=c.shift();var i=g==K,k=i&&c.shift()||ca,c=i&&c.shift();if(g==K)f=b,b=j,e=k,a="/"+a.join(":")+(f.length?"!"+f.join(":"):"")+I+"?container="+e+"&c=2&jsload=0",b&&(a+="&r="+b),"d"==c&&(a+="&debug=1");else if(g==p||g==ea)f=b,b=j,a=(b.indexOf("/")?"/":"")+b+"/"+a.join("__")+(f.length?"--"+f.join("__"):"")+I;else if(g==q||g==L)b=j,a=a.join(",").replace(/\./g,"_").replace(/-/g,"_"),a=b.replace("__features__",
a),a=e[w]?a.replace("/d=1/","/d=0/"):a,f&&(a.match(/\/$/)||(a+="/"),a+="cb=gapi."+encodeURIComponent(f));else return O("Unknown hint type "+g),"";if(!h)return"";h+=a;a=h;f=d;if(b=d=da.exec(a))if(b=!/\.\.|\/\//.test(d[4]))b:if(b=a,d=d[2],g==p)b=b.substr(0,v.length)==v;else if(g==q)d=f[E]||H,b=b.substr(0,d.length)==d;else{g=f[V];if(d&&g){g=g.split(",");f=0;for(b=g.length;f<b;++f)if(e=g[f],c=d.lastIndexOf(e),(0==c||"."==e.charAt(0)||"."==d.charAt(c-1))&&d.length-e.length==c){b=!0;break b}}b=!1}b||N("Invalid URI",
a);return h},x=function(a,b,c){c&&(a[b]=a[b]||[]).push(c)},y=function(a){a[o]&&0<a[o].length&&(window.gapi.load||T).apply(null,a[o].shift())},r=function(a){if(a)try{a()}catch(b){return b}return null},m=window.gapi,la=function(){if(m[u])return m[u];var a;if((a=Object.create)&&/\[native code\]/.test(a))a=a(null);else{a={};for(var b in a)a[b]=void 0}return m[u]=a},ma=function(a,b,c,d,e){var f=e[G]=e[G]||[],g=e[F]=e[F]||{};f.push([a,b,d]);m[c]=function(b){m[c]=void 0;if(!g[a]){g[a]=b;for(var b=f,d=g,
i=e,k;b[0]&&d[b[0][0]];){var l=b.shift();z(l[2],i);d[l[0]].call(window,la());d[l[0]]=!0;(l=r(l[1]))&&!k&&(k=l)}i[n]=void 0;y(i);if(k)throw k;}}},z=function(a,b){var c=a[ia];x(b,W,c);c=a[ha];m.config?m.config.update(c):x(b,X,c)},na=function(a){a[s]||(a[s]=0);return"loaded"+a[s]++},T=function(a,b){var c,d={};"function"!==typeof b?(d=b||{},c=d[ga]):c=b;var e=window[C]=window[C]||{},f=ja(e,window.location.search,window.location.hash),g=f&&!!f.match(/\/gapi\/|ms=gapi/);if(e[n])x(e,o,[a,b]);else{f||N("No hint present",
"");var h=f.split(";"),j=h[0]==q||h[0]==L,f=[],i=[];e[t]&&"function"===typeof e[t]?(f=e[t](a),d[w]=1):(f=a.split(":"),d[w]||P(f),i=e[D]=e[D]||[],P(i));if(g){if(!Q(f,i)&&(g=na(e),h=S(f,i,h,e,d,g))){e[n]=f;ma(h,c,g,d,e);i.push.apply(i,f);R(d,h);return}z(d,e);if(c)var k=r(c)}else{z(d,e);if(!Q(f,i)){var l=j?Z:Y;if(h=S(f,i,h,e,d,null)){e[n]=f;e[$]=1;e[l]=function(){e[n]=void 0;e[l]=void 0;var a=r(c);y(e);if(a)throw a;};i.push.apply(i,f);R(d,h);return}}k=r(c)}y(e);if(k)throw k;}};gapi.loader={load:T}})();
gapi.load=gapi.loader.load;
(window.gapi=window.gapi||{}).load=window.___jsl&&window.___jsl.il&&window.gapi.load||gapi.load;
gapi.load('plusone-unsupported', {'callback': window['__bsld']  });;
if(!window.console){window.console={}
}if(typeof window.console.log!=="function"){window.console.log=function(){}
}if(typeof window.console.warn!=="function"){window.console.warn=function(){}
}(function(){var N={"bootstrapInit":+new Date()},p=document,l=(/^https?:\/\/.*?linkedin.*?\/in\.js.*?$/),b=(/async=true/),B=(/^https:\/\//),H=(/\/\*((?:.|[\s])*?)\*\//m),D=(/\r/g),j=(/[\s]/g),g=(/^[\s]*(.*?)[\s]*:[\s]*(.*)[\s]*$/),y=(/^[\s]+|[\s]+$/g),A=(/suppress(Warnings|_warnings):true/gi),d=(/^api(Key|_key)$/gi),k="\n",E=",",n="",G="@",R="&",o="extensions",U="on",v="onDOMReady",X="onOnce",V="script",J="https://www.linkedin.com/uas/js/userspace?v=0.0.1200-RC1.17936-1337",h="https://platform.linkedin.com/js/secureAnonymousFramework?v=0.0.1200-RC1.17936-1337",F="http://platform.linkedin.com/js/nonSecureAnonymousFramework?v=0.0.1200-RC1.17936-1337",z=p.getElementsByTagName("head")[0],t=p.getElementsByTagName(V),a=[],M={},c=false,Y,m,S,r,I,C,W;
if(window.IN&&IN.ENV&&IN.ENV.js){if(!IN.ENV.js.suppressWarnings){console.warn("duplicate in.js loaded, any parameters will be ignored")
}return
}window.IN=window.IN||{};
IN.ENV={};
IN.ENV.js={};
IN.ENV.js.extensions={};
statsQueue=IN.ENV.statsQueue=[];
statsQueue.push(N);
Y=IN.ENV.evtQueue=[];
IN.Event={on:function(){Y.push({type:U,args:arguments})
},onDOMReady:function(){Y.push({type:v,args:arguments})
},onOnce:function(){Y.push({type:X,args:arguments})
}};
IN.$extensions=function(ab){var ae,i,aa,ad,ac=IN.ENV.js.extensions;
ae=ab.split(E);
for(var Z=0,e=ae.length;
Z<e;
Z++){i=Q(ae[Z],G,2);
aa=i[0].replace(y,n);
ad=i[1];
if(!ac[aa]){ac[aa]={src:(ad)?ad.replace(y,n):n,loaded:false}
}}};
function Q(ab,Z,e){var ac=ab.split(Z);
if(!e){return ac
}if(ac.length<e){return ac
}var aa=ac.splice(0,e-1);
var i=ac.join(Z);
aa.push(i);
return aa
}function u(e,i){if(e==o){IN.$extensions(i);
return null
}if(d.test(e)){i=i.replace(j,n)
}if(i==""){return null
}return i
}function K(e,i){i=u(e,i);
if(i){e=e.replace(/_([a-z])/gi,function(){return arguments[1].toUpperCase()
});
IN.ENV.js[e]=i;
a.push(encodeURIComponent(e)+"="+encodeURIComponent(i))
}}m="";
for(P=0,q=t.length;
P<q;
P++){var f=t[P];
if(!l.test(f.src)){continue
}if(b.test(f.src)){c=true
}try{m=f.innerHTML.replace(y,n)
}catch(x){try{m=f.text.replace(y,n)
}catch(w){}}}m=m.replace(H,"$1").replace(y,n).replace(D,n);
W=A.test(m.replace(j,n));
for(var P=0,O=m.split(k),q=O.length;
P<q;
P++){var s=O[P];
if(!s||s.replace(j,n).length<=0){continue
}try{S=s.match(g);
r=S[1].replace(y,n);
I=S[2].replace(y,n)
}catch(T){if(!W){console.warn("script tag contents must be key/value pairs separated by a colon. Source: "+T)
}continue
}K(r,I)
}IN.ENV.js.secure=(B.test(document.location.href))?1:0;
a.push("secure="+encodeURIComponent(IN.ENV.js.secure));
IN.init=function L(e){var Z;
e=e||{};
for(var i in e){if(e.hasOwnProperty(i)){K(i,e[i])
}}C=p.createElement(V);
C.src=(IN.ENV.js.apiKey)?J+R+a.join(R):(IN.ENV.js.secure)?h:F;
z.appendChild(C);
statsQueue.push({"userspaceRequested":+new Date()})
};
statsQueue.push({"bootstrapLoaded":+new Date()});
if(!c){IN.init()
}})();
;

