/*
	[ plugins.min.js ]

	1. setAllToMaxHeight (Set All To Max Height)
	2. Cookie
	2. QueryLoader
	3. jQuery UI
	4. jQuery Easing
	5. jQuery Coda-Slider
	6. Galleria
	7. jCarousel
	8. Columnizer
	9. jPlayer
	10. Flowplayer
*/

// Set All To Max Height
$.fn.setAllToMaxHeight=function(){return this.height(Math.max.apply(this,$.map(this,function(e){return $(e).height()})));}

// Is FontFace Supported
Font={isFontFaceSupported:function(){if(!(!0))return true;var doc=document,b=doc.body,st=doc.createElement('style'),spn=doc.createElement('span'),wid,nwid;st.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}";spn.setAttribute('style','font-family:monospace;position:absolute;top:-9999px;left:-9999px;visibility:hidden');spn.innerHTML='........';spn.id='fonttest';b.appendChild(st);b.appendChild(spn);wid=spn.offsetWidth;spn.style.fontFamily='testfont,monospace';nwid=spn.offsetWidth;b.removeChild(st);b.removeChild(spn);return(isFontFaceSupported=function(){return wid!==nwid;})();},loaded:typeof Cufon==='function',load:function(callback){$.getScript('/wordpress/wp-content/themes/gsp.1/assets/javascript/cufon.js',function(){Font.loaded=true;callback();});},place:function(elem){if(Font.isFontFaceSupported)return;function _place(){if(typeof elem==='string')Cufon.replace(elem);else for(var i in elem){Cufon.replace(elem);}
Cufon.refresh();}
if(!Font.loaded)Font.load(_place);else _place();},refresh:function(){if(Font.isFontFaceSupported)return;Cufon.refresh();}};

// Cookie plugin by Klaus Hartl (stilbuero.de)
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;}};

// QueryLoad 1.0 <http://www.gayadesign.com/diy/queryloader-preload-your-website-in-style/>
var QueryLoader={overlay:"",loadBar:"",preloader:"",items:new Array(),doneStatus:0,doneNow:0,waitForIt:false,selectorPreload:"body",ieLoadFixTime:2000,ieTimeout:"",init:function(){if(navigator.userAgent.match(/MSIE (\d+(?:\.\d+)+(?:b\d*)?)/)=="MSIE 6.0,6.0"){return false;}
if(QueryLoader.waitForIt){$(document).ready(function(){QueryLoader.spawnLoader();QueryLoader.getImages(QueryLoader.selectorPreload);});}else if(QueryLoader.selectorPreload=="body"){QueryLoader.spawnLoader();QueryLoader.getImages(QueryLoader.selectorPreload);QueryLoader.createPreloading();}else{$(document).ready(function(){QueryLoader.spawnLoader();QueryLoader.getImages(QueryLoader.selectorPreload);QueryLoader.createPreloading();});}
if(jQuery.browser.msie)QueryLoader.ieTimeout=setTimeout("QueryLoader.ieLoadFix()",QueryLoader.ieLoadFixTime);},ieLoadFix:function(){var ie=navigator.userAgent.match(/MSIE (\d+(?:\.\d+)+(?:b\d*)?)/);if(ie[0].match("MSIE")){while((100/QueryLoader.doneStatus)*QueryLoader.doneNow<100){QueryLoader.imgCallback();}}},imgCallback:function(){QueryLoader.doneNow++;QueryLoader.animateLoader();},getImages:function(selector){var everything=$(selector).find("*:not(script)").each(function(){var url="";if($(this).css("background-image")!="none"){var url=$(this).css("background-image");}else if(typeof($(this).attr("src"))!="undefined"&&$(this).attr("tagName").toLowerCase()=="img"){var url=$(this).attr("src");}
url=url.replace("url(\"","");url=url.replace("url(","");url=url.replace("\")","");url=url.replace(")","");if(url.length>0){QueryLoader.items.push(url);}});},createPreloading:function(){QueryLoader.preloader=$("<div></div>").appendTo(QueryLoader.selectorPreload);$(QueryLoader.preloader).css({height:"0px",width:"0px",overflow:"hidden"});var length=QueryLoader.items.length;QueryLoader.doneStatus=length;for(var i=0;i<length;i++){var imgLoad=$("<img></img>");$(imgLoad).attr("src",QueryLoader.items[i]);$(imgLoad).unbind("load");$(imgLoad).bind("load",function(){QueryLoader.imgCallback();});$(imgLoad).appendTo($(QueryLoader.preloader));}},spawnLoader:function(){if(QueryLoader.selectorPreload=="body"){var height=$(window).height();var width=$(window).width();var position="fixed";}else{var height=$(QueryLoader.selectorPreload).outerHeight();var width=$(QueryLoader.selectorPreload).outerWidth();var position="absolute";}
var left=$(QueryLoader.selectorPreload).offset()['left'];var top=$(QueryLoader.selectorPreload).offset()['top'];QueryLoader.overlay=$('div.QOverlay');QueryLoader.overlay.css({position:position,top:top,left:left,width:width+"px",height:height+"px"});},animateLoader:function(){var perc=(100/QueryLoader.doneStatus)*QueryLoader.doneNow;if(perc>99){QueryLoader.doneLoad();}else{}},doneLoad:function(){clearTimeout(QueryLoader.ieTimeout);if(QueryLoader.selectorPreload=="body"){var height=$(window).height();}else{var height=$(QueryLoader.selectorPreload).outerHeight();}
QueryLoader.overlay.fadeOut('slow',function(){$(this).remove();});$(QueryLoader.preloader).remove();}}

// jQuery UI 1.8rc2 <http://jqueryui.com>
;jQuery.ui||(function($){var isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.8rc2",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b);},hasScroll:function(el,a){if($(el).css('overflow')=='hidden'){return false;}
var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(el[scroll]>0){return true;}
el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};$.fn.extend({_focus:$.fn.focus,focus:function(delay,fn){return typeof delay==='number'?this.each(function(){var elem=this;setTimeout(function(){$(elem).focus();(fn&&fn.call(elem));},delay);}):this._focus.apply(this,arguments);},enableSelection:function(){return this.attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},disableSelection:function(){return this.attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css('position')))||(/absolute/).test(this.css('position'))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1))&&(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}
return(/fixed/).test(this.css('position'))||!scrollParent.length?$(document):scrollParent;},zIndex:function(zIndex){if(zIndex!==undefined){return this.css('zIndex',zIndex);}
if(this.length){var elem=$(this[0]),position,value;while(elem.length&&elem[0]!==document){position=elem.css('position');if(position=='absolute'||position=='relative'||position=='fixed')
{value=parseInt(elem.css('zIndex'));if(!isNaN(value)&&value!=0){return value;}}
elem=elem.parent();}}
return 0;}});$.extend($.expr[':'],{data:function(elem,i,match){return!!$.data(elem,match[3]);},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,'tabindex');return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:'a'==nodeName||'area'==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)['area'==nodeName?'parents':'closest'](':hidden').length;},tabbable:function(element){var tabIndex=$.attr(element,'tabindex');return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(':focusable');}});})(jQuery);(function($){var _remove=$.fn.remove;$.fn.remove=function(selector,keepData){return this.each(function(){if(!keepData){if(!selector||$.filter(selector,[this]).length){$("*",this).add(this).each(function(){$(this).triggerHandler("remove");});}}
return _remove.call($(this),selector,keepData);});};$.widget=function(name,base,prototype){var namespace=name.split(".")[0],fullName;name=name.split(".")[1];fullName=namespace+"-"+name;if(!prototype){prototype=base;base=$.Widget;}
$.expr[":"][fullName]=function(elem){return!!$.data(elem,name);};$[namespace]=$[namespace]||{};$[namespace][name]=function(options,element){if(arguments.length){this._createWidget(options,element);}};var basePrototype=new base();basePrototype.options=$.extend({},basePrototype.options);$[namespace][name].prototype=$.extend(true,basePrototype,{namespace:namespace,widgetName:name,widgetEventPrefix:$[namespace][name].prototype.widgetEventPrefix||name,widgetBaseClass:fullName},prototype);$.widget.bridge(name,$[namespace][name]);};$.widget.bridge=function(name,object){$.fn[name]=function(options){var isMethodCall=typeof options==="string",args=Array.prototype.slice.call(arguments,1),returnValue=this;options=!isMethodCall&&args.length?$.extend.apply(null,[true,options].concat(args)):options;if(isMethodCall&&options.substring(0,1)==="_"){return returnValue;}
if(isMethodCall){this.each(function(){var instance=$.data(this,name),methodValue=instance&&$.isFunction(instance[options])?instance[options].apply(instance,args):instance;if(methodValue!==instance&&methodValue!==undefined){returnValue=methodValue;return false;}});}else{this.each(function(){var instance=$.data(this,name);if(instance){if(options){instance.option(options);}
instance._init();}else{$.data(this,name,new object(options,this));}});}
return returnValue;};};$.Widget=function(options,element){if(arguments.length){this._createWidget(options,element);}};$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(options,element){this.element=$(element).data(this.widgetName,this);this.options=$.extend(true,{},this.options,$.metadata&&$.metadata.get(element)[this.widgetName],options);var self=this;this.element.bind("remove."+this.widgetName,function(){self.destroy();});this._create();this._init();},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+
this.namespace+"-state-disabled");},widget:function(){return this.element;},option:function(key,value){var options=key,self=this;if(arguments.length===0){return $.extend({},self.options);}
if(typeof key==="string"){if(value===undefined){return this.options[key];}
options={};options[key]=value;}
$.each(options,function(key,value){self._setOption(key,value);});return self;},_setOption:function(key,value){this.options[key]=value;if(key==="disabled"){this.widget()
[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+
this.namespace+"-state-disabled").attr("aria-disabled",value);}
return this;},enable:function(){return this._setOption("disabled",false);},disable:function(){return this._setOption("disabled",true);},_trigger:function(type,event,data){var callback=this.options[type];event=$.Event(event);event.type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase();data=data||{};if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop];}}
this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented());}};})(jQuery);(function($){$.widget("ui.mouse",{options:{cancel:':input,option',distance:1,delay:0},_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(event){return self._mouseDown(event);}).bind('click.'+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false;}});this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return;}
(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}
this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}
this._mouseMoveDelegate=function(event){return self._mouseMove(event);};this._mouseUpDelegate=function(event){return self._mouseUp(event);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true;},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event);}
if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}
return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event);}
return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(event){return this.mouseDelayMet;},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true;}});})(jQuery);(function($){var numPages=5;$.widget("ui.slider",$.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:'horizontal',range:false,step:1,value:0,values:null},_create:function(){var self=this,o=this.options;this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider"
+" ui-slider-"+this.orientation
+" ui-widget"
+" ui-widget-content"
+" ui-corner-all");if(o.disabled){this.element.addClass('ui-slider-disabled ui-disabled');}
this.range=$([]);if(o.range){if(o.range===true){this.range=$('<div></div>');if(!o.values)o.values=[this._valueMin(),this._valueMin()];if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]];}}else{this.range=$('<div></div>');}
this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range);}
this.range.addClass("ui-widget-header");}
if($(".ui-slider-handle",this.element).length==0)
$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length<o.values.length)
$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");}
this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default"
+" ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault();}).hover(function(){if(!o.disabled){$(this).addClass('ui-state-hover');}},function(){$(this).removeClass('ui-state-hover');}).focus(function(){if(!o.disabled){$(".ui-slider .ui-state-focus").removeClass('ui-state-focus');$(this).addClass('ui-state-focus');}else{$(this).blur();}}).blur(function(){$(this).removeClass('ui-state-focus');});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i);});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled)
return;switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index);}
break;}
var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index);}else{curVal=newVal=self.value();}
switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.PAGE_UP:newVal=curVal+((self._valueMax()-self._valueMin())/numPages);break;case $.ui.keyCode.PAGE_DOWN:newVal=curVal-((self._valueMax()-self._valueMin())/numPages);break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax())return;newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin())return;newVal=curVal-step;break;}
self._slide(event,index,newVal);return ret;}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active");}});this._refreshValue();this._animateOff=false;},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider"
+" ui-slider-horizontal"
+" ui-slider-vertical"
+" ui-slider-disabled"
+" ui-widget"
+" ui-widget-content"
+" ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this;},_mouseCapture:function(event){var o=this.options;if(o.disabled)
return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()-this._valueMin()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i;}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index]);}
this._start(event,index);this._mouseSliding=true;self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is('.ui-slider-handle');this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top
-(closestHandle.height()/2)
-(parseInt(closestHandle.css('borderTopWidth'),10)||0)
-(parseInt(closestHandle.css('borderBottomWidth'),10)||0)
+(parseInt(closestHandle.css('marginTop'),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);this._animateOff=true;return true;},_mouseStart:function(event){return true;},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false;},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false;},_detectOrientation:function(){this.orientation=this.options.orientation=='vertical'?'vertical':'horizontal';},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if('horizontal'==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0);}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0);}
var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1)percentMouse=1;if(percentMouse<0)percentMouse=0;if('vertical'==this.orientation)
percentMouse=1-percentMouse;var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2))
normValue+=this.options.step;return parseFloat(normValue.toFixed(5));},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values();}
this._trigger("start",event,uiHash);},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((this.options.values.length==2&&this.options.range===true)&&((index==0&&newVal>otherVal)||(index==1&&newVal<otherVal))){newVal=otherVal;}
if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal,values:newValues});var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,true);}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal});if(allowed!==false){this.value(newVal);}}}},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values();}
this._trigger("stop",event,uiHash);},_change:function(event,index){if(!this._keySliding&&!this._mouseSliding){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values();}
this._trigger("change",event,uiHash);}},value:function(newValue){if(arguments.length){this.options.value=this._trimValue(newValue);this._refreshValue();this._change(null,0);}
return this._value();},values:function(index,newValue){if(arguments.length>1){this.options.values[index]=this._trimValue(newValue);this._refreshValue();this._change(null,index);}
if(arguments.length){if($.isArray(arguments[0])){var vals=this.options.values,newValues=arguments[0];for(var i=0,l=vals.length;i<l;i++){vals[i]=this._trimValue(newValues[i]);this._change(null,i);}
this._refreshValue();}else{if(this.options.values&&this.options.values.length){return this._values(index);}else{return this.value();}}}else{return this._values();}},_setOption:function(key,value){$.Widget.prototype._setOption.apply(this,arguments);switch(key){case'disabled':if(value){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled");}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled");}
case'orientation':this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case'value':this._animateOff=true;this._refreshValue();this._animateOff=false;break;case'values':this._animateOff=true;this._refreshValue();this._animateOff=false;break;}},_step:function(){var step=this.options.step;return step;},_value:function(){var val=this.options.value;val=this._trimValue(val);return val;},_values:function(index){if(arguments.length){var val=this.options.values[index];val=this._trimValue(val);return val;}else{var vals=this.options.values.slice();for(var i=0,l=vals.length;i<l;i++){vals[i]=this._trimValue(vals[i]);}
return vals;}},_trimValue:function(val){if(val<this._valueMin())val=this._valueMin();if(val>this._valueMax())val=this._valueMax();return val;},_valueMin:function(){var valueMin=this.options.min;return valueMin;},_valueMax:function(){var valueMax=this.options.max;return valueMax;},_refreshValue:function(){var oRange=this.options.range,o=this.options,self=this;var animate=(!this._animateOff)?o.animate:false;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=='horizontal'?'left':'bottom']=valPercent+'%';$(this).stop(1,1)[animate?'animate':'css'](_set,o.animate);if(self.options.range===true){if(self.orientation=='horizontal'){(i==0)&&self.range.stop(1,1)[animate?'animate':'css']({left:valPercent+'%'},o.animate);(i==1)&&self.range[animate?'animate':'css']({width:(valPercent-lastValPercent)+'%'},{queue:false,duration:o.animate});}else{(i==0)&&self.range.stop(1,1)[animate?'animate':'css']({bottom:(valPercent)+'%'},o.animate);(i==1)&&self.range[animate?'animate':'css']({height:(valPercent-lastValPercent)+'%'},{queue:false,duration:o.animate});}}
lastValPercent=valPercent;});}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=='horizontal'?'left':'bottom']=valPercent+'%';this.handle.stop(1,1)[animate?'animate':'css'](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?'animate':'css']({width:valPercent+'%'},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?'animate':'css']({width:(100-valPercent)+'%'},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?'animate':'css']({height:valPercent+'%'},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?'animate':'css']({height:(100-valPercent)+'%'},{queue:false,duration:o.animate});}}});$.extend($.ui.slider,{version:"1.8rc2"});})(jQuery);

// jQuery Easing 1.3 <http://gsgd.co.uk/sandbox/jquery/easing/>
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){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;}});

// jQuery Coda-Slider 2.0 <http://ndoherty.biz/coda-slider/>
$(function(){$("body").removeClass("coda-slider-no-js");$(".coda-slider").children('.panel').hide().end().prepend('<p class="loading">Loading...<br /><img src="images/loading.gif" alt="loading..." /></p>');});var sliderCount=1;$.fn.codaSlider=function(settings){settings=$.extend({autoHeight:false,autoHeightEaseDuration:1000,autoHeightEaseFunction:'easeInOutExpo',autoSlide:false,autoSlideInterval:7000,autoSlideStopWhenClicked:true,crossLinking:false,dynamicArrows:false,dynamicArrowLeftText:'&larr;',dynamicArrowRightText:'&rarr;',dynamicTabs:true,dynamicTabsAlign:'right',dynamicTabsPosition:'bottom',externalTriggerSelector:'a.xtrig',firstPanelToLoad:1,panelTitleSelector:false,slideEaseDuration:1000,slideEaseFunction:'easeInOutExpo'},settings);return this.each(function(){var slider=$(this);if(settings.dynamicArrows){slider.before('<div class="coda-nav-left nav" id="coda-nav-left-'+sliderCount+'"><a href="#">'+settings.dynamicArrowLeftText+'</a></div>');slider.after('<div class="coda-nav-right nav" id="coda-nav-right-'+sliderCount+'"><a href="#">'+settings.dynamicArrowRightText+'</a></div>');$navLeft=$('#coda-nav-left-'+sliderCount+' a');$navRight=$('#coda-nav-right-'+sliderCount+' a');};var rel=slider.find('a.current').attr('rel'); var panelWidth=slider.find(".panel").width();var panelCount=slider.find(".panel").size();var panelContainerWidth=panelWidth*panelCount;var navClicks=0;$('.panel',slider).wrapAll('<div class="panel-container"></div>');$(".panel-container",slider).css({width:panelContainerWidth});if(settings.crossLinking&&location.hash&&parseInt(location.hash.slice(1))<=panelCount){var currentPanel=parseInt(location.hash.slice(1));var offset=-(panelWidth*(currentPanel-1));$('.panel-container',slider).css({marginLeft:offset});}else if(settings.firstPanelToLoad!=1&&settings.firstPanelToLoad<=panelCount){var currentPanel=settings.firstPanelToLoad;var offset=-(panelWidth*(currentPanel-1));$('.panel-container',slider).css({marginLeft:offset});}else if(rel>1){var currentPanel=rel;var offset=-(panelWidth*(currentPanel-1));$('.panel-container',slider).css({marginLeft:offset});}else{var currentPanel=1;};if(settings.dynamicArrows){if(currentPanel==1)$navLeft.parent().hide();if(currentPanel==panelCount)$navRight.parent().hide();$navLeft.click(function(){navClicks++;if(currentPanel==1){$(this).parent().addClass('hide');}else{currentPanel-=1;alterPanelHeight(currentPanel-1);offset=-(panelWidth*(currentPanel-1));slider.siblings('.coda-nav').find('a.current').removeClass('current').parent().prev().find('a').addClass('current');};if(currentPanel==1)$(this).parent().hide();else $(this).parent().show();if(currentPanel==panelCount)$navRight.parent().hide();else $navRight.parent().show();$('.panel-container',slider).animate({marginLeft:offset},settings.slideEaseDuration,settings.slideEaseFunction);if(settings.crossLinking){location.hash=currentPanel};return false;});$navRight.click(function(){navClicks++;if(currentPanel==panelCount){$(this).parent().addClass('hide');}else{offset=-(panelWidth*currentPanel);alterPanelHeight(currentPanel);currentPanel+=1;slider.siblings('.coda-nav').find('a.current').removeClass('current').parent().next().find('a').addClass('current');};if(currentPanel==1)$navLeft.parent().hide();else $navLeft.parent().show();if(currentPanel==panelCount)$(this).parent().hide();else $(this).parent().show();$('.panel-container',slider).animate({marginLeft:offset},settings.slideEaseDuration,settings.slideEaseFunction);if(settings.crossLinking){location.hash=currentPanel};return false;});};if(settings.dynamicTabs){switch(settings.dynamicTabsPosition){case"bottom":slider.after('<div id="coda-nav-'+sliderCount+'" class="pagination"><ul></ul></div>');break;default:slider.before('<div id="coda-nav-'+sliderCount+'" class="samples">'+(lang=='fr'?'extraits':'excerpts')+'<ul></ul></div>');break;};ul=$('#coda-nav-'+sliderCount+' ul');$('.panel',slider).each(function(n){tabTitle=!settings.panelTitleSelector?(n+1):$(this).find(settings.panelTitleSelector).text();ul.append('<li class="tab'+(n+1)+'"><a href="#'+(n+1)+'">'+tabTitle+'</a></li>');});navContainerWidth=slider.width()+slider.siblings('.coda-nav-left').width()+slider.siblings('.coda-nav-right').width();switch(settings.dynamicTabsAlign&&settings.dynamicTabsPosition!='top'){case"center":ul.css({width:($("li",ul).width()+2)*panelCount});break;case"right":ul.css({float:'right'});break;};};$('#coda-nav-'+sliderCount+' a').each(function(z){$(this).bind("click",function(){navClicks++;$(this).addClass('current').parents('ul').find('a').not($(this)).removeClass('current');offset=-(panelWidth*z);alterPanelHeight(z);currentPanel=z+1;$('.panel-container',slider).animate({marginLeft:offset},settings.slideEaseDuration,settings.slideEaseFunction);if(!settings.crossLinking){return false};});});$(settings.externalTriggerSelector).each(function(){if(sliderCount==parseInt($(this).attr("rel").slice(12))){$(this).bind("click",function(){navClicks++;targetPanel=parseInt($(this).attr("href").slice(1));offset=-(panelWidth*(targetPanel-1));alterPanelHeight(targetPanel-1);currentPanel=targetPanel;slider.siblings('.coda-nav').find('a').removeClass('current').parents('ul').find('li:eq('+(targetPanel-1)+') a').addClass('current');$('.panel-container',slider).animate({marginLeft:offset},settings.slideEaseDuration,settings.slideEaseFunction);if(!settings.crossLinking){return false};});};});if(settings.crossLinking&&location.hash&&parseInt(location.hash.slice(1))<=panelCount){$("#coda-nav-"+sliderCount+" a:eq("+(location.hash.slice(1)-1)+")").addClass("current");}else if(settings.firstPanelToLoad!=1&&settings.firstPanelToLoad<=panelCount){$("#coda-nav-"+sliderCount+" a:eq("+(settings.firstPanelToLoad-1)+")").addClass("current");}else{$("#coda-nav-"+sliderCount+" a:eq(0)").addClass("current");};if(settings.autoHeight){panelHeight=$('.panel:eq('+(currentPanel-1)+')',slider).height();slider.css({height:panelHeight});};if(settings.autoSlide){slider.ready(function(){setTimeout(autoSlide,settings.autoSlideInterval);});};function alterPanelHeight(x){if(settings.autoHeight){panelHeight=$('.panel:eq('+x+')',slider).height(); slider.animate({height:panelHeight},settings.autoHeightEaseDuration,settings.autoHeightEaseFunction);};};function autoSlide(){if(navClicks==0||!settings.autoSlideStopWhenClicked){if(currentPanel==panelCount){var offset=0;currentPanel=1;}else{var offset=-(panelWidth*currentPanel);currentPanel+=1;};alterPanelHeight(currentPanel-1);slider.siblings('.coda-nav').find('a').removeClass('current').parents('ul').find('li:eq('+(currentPanel-1)+') a').addClass('current');$('.panel-container',slider).animate({marginLeft:offset},settings.slideEaseDuration,settings.slideEaseFunction);setTimeout(autoSlide,settings.autoSlideInterval);};};$('.panel',slider).show().end().find("p.loading").remove();slider.removeClass("preload");sliderCount++;});};

(function($){

// Custom GSP Gallery - Inspired by Galleria 0.9 <http://monc.se/kitchen/>
var $$;$$=$.fn.gallery=function($options){if(!$$.hasCSS()){return false;}
var $defaults={insert:'.gallery',captions:false,clickNext:true,onImage:function(image,caption,thumb){}};var $opts=$.extend($defaults,$options);for(var i in $opts){if(i){$.gallery[i]=$opts[i];}}
if($opts.captions)var _p=$(document.createElement('p')).addClass('caption').appendTo(this);return this.each(function(){if(!$(this).hasClass($opts.insert))$(this).addClass('gallery');var _gal=$(this).children('img');$.gallery.count=_gal.length;_gal.each(function(i){var _img=$(this);var _src=_img.attr('src');var _title=_img.attr('title');if($.gallery.clickNext){_img.css('cursor','pointer').click(function(){$.gallery.next();window.clearTimeout($.gallery.autoSlide);});}
if(_img.hasClass('active')){$.gallery.autoSlide=window.setTimeout($$.nextImg,$.gallery.timer);$.gallery.activate(_img,true);}});});};$$.nextImg=function(){$.gallery.next();$.gallery.autoSlide=window.setTimeout($$.nextImg,$.gallery.timer);}
$$.nextSelector=function(selector){return selector.index()==($.gallery.count-1)?selector.siblings(':eq(0)'):selector.next('img');};$$.previousSelector=function(selector){return selector.index()==0?selector.siblings(':eq('+($.gallery.count-1)+')'):selector.prev('img');};$$.hasCSS=function(){$('body').append($(document.createElement('div')).attr('id','css_test').css({width:'1px',height:'1px',display:'none'}));var _v=($('#css_test').width()!=1)?false:true;$('#css_test').remove();return _v;};$$.onPageLoad=function(_img,first){if(typeof(first)=='undefined')first=false;var _wrapper=$('.gallery');if(_img){var _old=_wrapper.find('img.active').removeClass('active');_img.addClass('active');if(first){_img.show();_wrapper.find('p.caption').text(_img.attr('title')).show();}else{_old.fadeOut('normal',function(){_img.fadeIn('slow');});_wrapper.find('p.caption').fadeOut('normal',function(){$(this).text(_img.attr('title')).fadeIn('slow');});}
$.gallery.onImage(_img,_wrapper.siblings('.caption'));}else{_wrapper.find('img:visible').hide();$('.gallery img.active').removeClass('active');}
$.gallery.current=_img;};$.extend({gallery:{current:'',count:'',autoSlide:'',timer:7000,onImage:function(){},activate:function(_img,first){$$.onPageLoad(_img,first);},next:function(){var _next=$$.nextSelector($.gallery.current);$.gallery.activate(_next);},prev:function(){var _prev=$$.previousSelector($.gallery.current);$.gallery.activate(_prev);}}});

// jCarousel 0.2.3 <http://sorgalla.com/jcarousel/>
$.fn.jcarousel=function(o){return this.each(function(){new $jc(this,o);});};var defaults={orientation:false,vertical:false,start:1,offset:1,size:null,scroll:5,visible:null,animation:'normal',easing:'swing',auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:'<div></div>',buttonPrevHTML:'<div></div>',buttonNextEvent:'click',buttonPrevEvent:'click',buttonNextCallback:null,buttonPrevCallback:null};$.jcarousel=function(e,o){this.options=$.extend({},defaults,o||{});this.locked=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.wh=!this.options.vertical?'width':'height';this.lt=!this.options.vertical?'left':'top';if(e.nodeName=='UL'||e.nodeName=='OL'){this.list=$(e);this.container=this.list.parent().parent();}else{this.container=$(e);this.list=$(e).find('>ul,>ol,div>ul,div>ol');} this.clip=this.list.parent();this.buttonPrev=$('.jcarousel-prev',this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null) this.buttonPrev=this.clip.before(this.options.buttonPrevHTML).prev();this.buttonPrev.addClass('nav jcarousel-prev');this.buttonNext=$('.jcarousel-next',this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null) this.buttonNext=this.clip.before(this.options.buttonNextHTML).prev();this.buttonNext.addClass('nav jcarousel-next');var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var li=this.list.children('li');var self=this;if(li.size()>0){var wh=0,i=this.options.offset;li.each(function(){self.format(this,i++);wh+=self.dimension(this,di);});this.list.css(this.wh,wh+100+'px');if(!o||o.size===undefined) this.options.size=li.size();} this.funcNext=function(){self.next();};this.funcPrev=function(){self.prev();};this.funcResize=function(){self.reload();};if(this.options.initCallback!=null) this.options.initCallback(this,'init');if($.browser.safari){this.buttons(false,false);$(window).bind('load',function(){self.setup();});}else this.setup();};var $jc=$.jcarousel;$jc.fn=$jc.prototype={jcarousel:'0.2.3'};$jc.fn.extend=$jc.extend=$.extend;$jc.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.tail=null;this.inTail=false;if(this.locked) return;this.list.css(this.lt,this.pos(this.options.offset)+'px');var p=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(p,false);},reset:function(){this.list.empty();this.list.css(this.lt,'0px');this.list.css(this.wh,'10px');if(this.options.initCallback!=null) this.options.initCallback(this,'reset');this.setup();},reload:function(){if(this.tail!=null&&this.inTail) this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;if(this.options.reloadCallback!=null) this.options.reloadCallback(this);if(this.options.visible!=null){var self=this;var di=Math.ceil(this.clipping()/this.options.visible),wh=0,lt=0;$('li',this.list).each(function(i){wh+=self.dimension(this,di);if(i+1<self.first) lt=wh;});this.list.css(this.wh,wh+'px');this.list.css(this.lt,-lt+'px');} this.scroll(this.first,false);},lock:function(){this.locked=true;this.buttons();},unlock:function(){this.locked=false;this.buttons();},size:function(s){if(s!=undefined){this.options.size=s;if(!this.locked) this.buttons();} return this.options.size;},has:function(i,i2){if(i2==undefined||!i2) i2=i;if(this.options.size!==null&&i2>this.options.size) i2=this.options.size;for(var j=i;j<=i2;j++){var e=this.get(j);if(!e.length||e.hasClass('jcarousel-item-placeholder')) return false;} return true;},get:function(i){return $('.jcarousel-item-'+i,this.list);},add:function(i,s){var e=this.get(i),old=0,add=0;if(e.length==0){var c,e=this.create(i),j=$jc.intval(i);while(c=this.get(--j)){if(j<=0||c.length){j<=0?this.list.prepend(e):c.after(e);break;}}}else old=this.dimension(e);e.removeClass(this.className('jcarousel-item-placeholder'));typeof s=='string'?e.html(s):e.empty().append(s);var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var wh=this.dimension(e,di)-old;if(i>0&&i<this.first) this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-wh+'px');this.list.css(this.wh,$jc.intval(this.list.css(this.wh))+wh+'px');return e;},remove:function(i){var e=this.get(i);if(!e.length||(i>=this.first&&i<=this.last)) return;var d=this.dimension(e);if(i<this.first) this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+d+'px');e.remove();this.list.css(this.wh,$jc.intval(this.list.css(this.wh))-d+'px');},next:function(){this.stopAuto();if(this.tail!=null&&!this.inTail) this.scrollTail(false);else this.scroll(((this.options.wrap=='both'||this.options.wrap=='last')&&this.options.size!=null&&this.last==this.options.size)?1:this.first+this.options.scroll);},prev:function(){this.stopAuto();if(this.tail!=null&&this.inTail) this.scrollTail(true);else this.scroll(((this.options.wrap=='both'||this.options.wrap=='first')&&this.options.size!=null&&this.first==1)?this.options.size:this.first-this.options.scroll);},scrollTail:function(b){if(this.locked||this.animating||!this.tail) return;var pos=$jc.intval(this.list.css(this.lt));!b?pos-=this.tail:pos+=this.tail;this.inTail=!b;this.prevFirst=this.first;this.prevLast=this.last;this.animate(pos);},scroll:function(i,a){if(this.locked||this.animating) return;this.animate(this.pos(i),a);},pos:function(i){if(this.locked||this.animating) return;i=$jc.intval(i);if(this.options.wrap!='circular') i=i<1?1:(this.options.size&&i>this.options.size?this.options.size:i);var back=this.first>i;var pos=$jc.intval(this.list.css(this.lt));var f=this.options.wrap!='circular'&&this.first<=1?1:this.first;var c=back?this.get(f):this.get(this.last);var j=back?f:f-1;var e=null,l=0,p=false,d=0;while(back?--j>=i:++j<i){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c[back?'before':'after'](e);} c=e;d=this.dimension(e);if(p) l+=d;if(this.first!=null&&(this.options.wrap=='circular'||(j>=1&&(this.options.size==null||j<=this.options.size)))) pos=back?pos+d:pos-d;} var clipping=this.clipping();var cache=[];var visible=0,j=i,v=0;var c=this.get(i-1);while(++visible){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c.length==0?this.list.prepend(e):c[back?'before':'after'](e);} c=e;var d=this.dimension(e);if(d==0){alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...');return 0;} if(this.options.wrap!='circular'&&this.options.size!==null&&j>this.options.size) cache.push(e);else if(p) l+=d;v+=d;if(v>=clipping) break;j++;} for(var x=0;x<cache.length;x++) cache[x].remove();if(l>0){this.list.css(this.wh,this.dimension(this.list)+l+'px');if(back){pos-=l;this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-l+'px');}} var last=i+visible-1;if(this.options.wrap!='circular'&&this.options.size&&last>this.options.size) last=this.options.size;if(j>last){visible=0,j=last,v=0;while(++visible){var e=this.get(j--);if(!e.length) break;v+=this.dimension(e);if(v>=clipping) break;}} var first=last-visible+1;if(this.options.wrap!='circular'&&first<1) first=1;if(this.inTail&&back){pos+=this.tail;this.inTail=false;} this.tail=null;if(this.options.wrap!='circular'&&last==this.options.size&&(last-visible+1)>=1){var m=$jc.margin(this.get(last),!this.options.vertical?'marginRight':'marginBottom');if((v-m)>clipping) this.tail=v-clipping-m;} while(i-->first) pos+=this.dimension(this.get(i));this.prevFirst=this.first;this.prevLast=this.last;this.first=first;this.last=last;return pos;},animate:function(p,a){if(this.locked||this.animating) return;this.animating=true;var self=this;var scrolled=function(){self.animating=false;if(p==0) self.list.css(self.lt,0);if(self.options.wrap=='both'||self.options.wrap=='last'||self.options.size==null||self.last<self.options.size) self.startAuto();self.buttons();self.notify('onAfterAnimation');};this.notify('onBeforeAnimation');if(!this.options.animation||a==false){this.list.css(this.lt,p+'px');scrolled();}else{var o=!this.options.vertical?{'left':p}:{'top':p};this.list.animate(o,this.options.animation,this.options.easing,scrolled);}},startAuto:function(s){if(s!=undefined) this.options.auto=s;if(this.options.auto==0) return this.stopAuto();if(this.timer!=null) return;var self=this;this.timer=setTimeout(function(){self.next();},this.options.auto*1000);},stopAuto:function(){if(this.timer==null) return;clearTimeout(this.timer);this.timer=null;},buttons:function(n,p){if(n==undefined||n==null){var n=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='first')||this.options.size==null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=='first')&&this.options.size!=null&&this.last>=this.options.size) n=this.tail!=null&&!this.inTail;} if(p==undefined||p==null){var p=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='last')||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=='last')&&this.options.size!=null&&this.first==1) p=this.tail!=null&&this.inTail;} var self=this;this.buttonNext[n?'bind':'unbind'](this.options.buttonNextEvent,this.funcNext)[n?'removeClass':'addClass'](this.className('disabled')).attr('disabled',n?false:true);this.buttonPrev[p?'bind':'unbind'](this.options.buttonPrevEvent,this.funcPrev)[p?'removeClass':'addClass'](this.className('disabled')).attr('disabled',p?false:true);if(this.buttonNext.length>0&&(this.buttonNext[0].jcarouselstate==undefined||this.buttonNext[0].jcarouselstate!=n)&&this.options.buttonNextCallback!=null){this.buttonNext.each(function(){self.options.buttonNextCallback(self,this,n);});this.buttonNext[0].jcarouselstate=n;} if(this.buttonPrev.length>0&&(this.buttonPrev[0].jcarouselstate==undefined||this.buttonPrev[0].jcarouselstate!=p)&&this.options.buttonPrevCallback!=null){this.buttonPrev.each(function(){self.options.buttonPrevCallback(self,this,p);});this.buttonPrev[0].jcarouselstate=p;}},notify:function(evt){var state=this.prevFirst==null?'init':(this.prevFirst<this.first?'next':'prev');this.callback('itemLoadCallback',evt,state);if(this.prevFirst!==this.first){this.callback('itemFirstInCallback',evt,state,this.first);this.callback('itemFirstOutCallback',evt,state,this.prevFirst);} if(this.prevLast!==this.last){this.callback('itemLastInCallback',evt,state,this.last);this.callback('itemLastOutCallback',evt,state,this.prevLast);} this.callback('itemVisibleInCallback',evt,state,this.first,this.last,this.prevFirst,this.prevLast);this.callback('itemVisibleOutCallback',evt,state,this.prevFirst,this.prevLast,this.first,this.last);},callback:function(cb,evt,state,i1,i2,i3,i4){if(this.options[cb]==undefined||(typeof this.options[cb]!='object'&&evt!='onAfterAnimation')) return;var callback=typeof this.options[cb]=='object'?this.options[cb][evt]:this.options[cb];if(!$.isFunction(callback)) return;var self=this;if(i1===undefined) callback(self,state,evt);else if(i2===undefined) this.get(i1).each(function(){callback(self,this,i1,state,evt);});else{for(var i=i1;i<=i2;i++) if(i!==null&&!(i>=i3&&i<=i4)) this.get(i).each(function(){callback(self,this,i,state,evt);});}},create:function(i){return this.format('<li></li>',i);},format:function(e,i){var $e=$(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-'+i));$e.attr('jcarouselindex',i);return $e;},className:function(c){if(!this.options.orientation)return c;return c+' '+c+(!this.options.vertical?'-horizontal':'-vertical');},dimension:function(e,d){var el=e.jquery!=undefined?e[0]:e;var old=!this.options.vertical?el.offsetWidth+$jc.margin(el,'marginLeft')+$jc.margin(el,'marginRight'):el.offsetHeight+$jc.margin(el,'marginTop')+$jc.margin(el,'marginBottom');if(d==undefined||old==d) return old;var w=!this.options.vertical?d-$jc.margin(el,'marginLeft')-$jc.margin(el,'marginRight'):d-$jc.margin(el,'marginTop')-$jc.margin(el,'marginBottom');$(el).css(this.wh,w+'px');return this.dimension(el);},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-$jc.intval(this.clip.css('borderLeftWidth'))-$jc.intval(this.clip.css('borderRightWidth')):this.clip[0].offsetHeight-$jc.intval(this.clip.css('borderTopWidth'))-$jc.intval(this.clip.css('borderBottomWidth'));},index:function(i,s){if(s==undefined) s=this.options.size;return Math.round((((i-1)/s)-Math.floor((i-1)/s))*s)+1;}});$jc.extend({defaults:function(d){return $.extend(defaults,d||{});},margin:function(e,p){if(!e) return 0;var el=e.jquery!=undefined?e[0]:e;if(p=='marginRight'&&$.browser.safari){var old={'display':'block','float':'none','width':'auto'},oWidth,oWidth2;$.swap(el,old,function(){oWidth=el.offsetWidth;});old['marginRight']=0;$.swap(el,old,function(){oWidth2=el.offsetWidth;});return oWidth2-oWidth;} return $jc.intval($.css(el,p));},intval:function(v){v=parseInt(v);return isNaN(v)?0:v;}});

// Columnizer 1.4.0 <http://welcome.totheinter.net/columnizer-jquery-plugin/>
$.fn.columnize=function(options){var defaults={width:400,columns:false,buildOnce:false,overflow:false,doneFunc:function(){},target:false,ignoreImageLoading:true,float:"left",lastNeverTallest:false};var options=$.extend(defaults,options);return this.each(function(){var $inBox=options.target?$(options.target):$(this);var maxHeight=$(this).height();var $cache=$('<div></div>');var lastWidth=0;var columnizing=false;$cache.append($(this).children().clone(true));if(!options.ignoreImageLoading&&!options.target){if(!$inBox.data("imageLoaded")){$inBox.data("imageLoaded",true);if($(this).find("img").length>0){var func=function($inBox,$cache){return function(){if(!$inBox.data("firstImageLoaded")){$inBox.data("firstImageLoaded","true");$inBox.empty().append($cache.children().clone(true));$inBox.columnize(options);}}}($(this),$cache);$(this).find("img").one("load",func);$(this).find("img").one("abort",func);return;}}} $inBox.empty();columnizeIt();if(!options.buildOnce){$(window).resize(function(){if(!options.buildOnce&&$.browser.msie){if($inBox.data("timeout")){clearTimeout($inBox.data("timeout"));} $inBox.data("timeout",setTimeout(columnizeIt,200));}else if(!options.buildOnce){columnizeIt();}else{}});} function columnize($putInHere,$pullOutHere,$parentColumn,height){while($parentColumn.height()<height&&$pullOutHere[0].childNodes.length){$putInHere.append($pullOutHere[0].childNodes[0]);} if($putInHere[0].childNodes.length==0)return;var kids=$putInHere[0].childNodes;var lastKid=kids[kids.length-1];$putInHere[0].removeChild(lastKid);var $item=$(lastKid);if($item[0].nodeType==3){var oText=$item[0].nodeValue;var counter2=options.width/18;if(options.accuracy) counter2=options.accuracy;var columnText;var latestTextNode=null;while($parentColumn.height()<height&&oText.length){if(oText.indexOf(' ',counter2)!='-1'){columnText=oText.substring(0,oText.indexOf(' ',counter2));}else{columnText=oText;} latestTextNode=document.createTextNode(columnText);$putInHere.append(latestTextNode);if(oText.length>counter2){oText=oText.substring(oText.indexOf(' ',counter2));}else{oText="";}} if($parentColumn.height()>=height&&latestTextNode!=null){$putInHere[0].removeChild(latestTextNode);oText=latestTextNode.nodeValue+oText;} if(oText.length){$item[0].nodeValue=oText;}else{return false;}} if($pullOutHere.children().length){$pullOutHere.prepend($item);}else{$pullOutHere.append($item);} return $item[0].nodeType==3;} function split($putInHere,$pullOutHere,$parentColumn,height){if($pullOutHere.children().length){$cloneMe=$pullOutHere.children(":first");$clone=$cloneMe.clone(true);if($clone.attr("nodeType")==1&&!$clone.hasClass("dontend")){$putInHere.append($clone);if($clone.is("img")&&$parentColumn.height()<height+20){$cloneMe.remove();}else if(!$cloneMe.hasClass("dontsplit")&&$parentColumn.height()<height+20){$cloneMe.remove();}else if($clone.is("img")||$cloneMe.hasClass("dontsplit")){$clone.remove();}else{$clone.empty();if(!columnize($clone,$cloneMe,$parentColumn,height)){if($cloneMe.children().length){split($clone,$cloneMe,$parentColumn,height);}} if($clone.get(0).childNodes.length==0){$clone.remove();}}}}} function singleColumnizeIt(){if($inBox.data("columnized")&&$inBox.children().length==1){return;} $inBox.data("columnized",true);$inBox.data("columnizing",true);$inBox.empty();$inBox.append($("<div class='first last column' style='width:98%; padding: 3px; float: "+options.float+";'></div>"));$col=$inBox.children().eq($inBox.children().length-1);$destroyable=$cache.clone(true);if(options.overflow){targetHeight=options.overflow.height;columnize($col,$destroyable,$col,targetHeight);if(!$destroyable.children().find(":first-child").hasClass("dontend")){split($col,$destroyable,$col,targetHeight);} while(checkDontEndColumn($col.children(":last").length&&$col.children(":last").get(0))){var $lastKid=$col.children(":last");$lastKid.remove();$destroyable.prepend($lastKid);} var html="";var div=document.createElement('DIV');while($destroyable[0].childNodes.length>0){var kid=$destroyable[0].childNodes[0];for(var i=0;i<kid.attributes.length;i++){if(kid.attributes[i].nodeName.indexOf("jQuery")==0){kid.removeAttribute(kid.attributes[i].nodeName);}} div.innerHTML="";div.appendChild($destroyable[0].childNodes[0]);html+=div.innerHTML;} var overflow=$(options.overflow.id)[0];overflow.innerHTML=html;}else{$col.append($destroyable);} $inBox.data("columnizing",false);if(options.overflow){options.overflow.doneFunc();}} function checkDontEndColumn(dom){if(dom.nodeType!=1)return false;if($(dom).hasClass("dontend"))return true;if(dom.childNodes.length==0)return false;return checkDontEndColumn(dom.childNodes[dom.childNodes.length-1]);} function columnizeIt(){if(lastWidth==$inBox.width())return;lastWidth=$inBox.width();var numCols=Math.round($inBox.width()/options.width);if(options.columns)numCols=options.columns;if(numCols<=1){return singleColumnizeIt();} if($inBox.data("columnizing"))return;$inBox.data("columnized",true);$inBox.data("columnizing",true);$inBox.empty();$inBox.append($("<div style='width:"+(Math.round(100/numCols)-2)+"%; padding: 3px; float: "+options.float+";'></div>"));$col=$inBox.children(":last");$col.append($cache.clone());maxHeight=$col.height();$inBox.empty();var targetHeight=maxHeight/numCols;var firstTime=true;var maxLoops=3;var scrollHorizontally=false;if(options.overflow){maxLoops=1;targetHeight=options.overflow.height;}else if(options.height&&options.width){maxLoops=1;targetHeight=options.height;scrollHorizontally=true;} for(var loopCount=0;loopCount<maxLoops;loopCount++){$inBox.empty();var $destroyable;try{$destroyable=$cache.clone(true);}catch(e){$destroyable=$cache.clone();} $destroyable.css("visibility","hidden");for(var i=0;i<numCols;i++){var className=(i==0)?"first column":"column";var className=(i==numCols-1)?("last "+className):className;$inBox.append($("<div class='"+className+"' style='width:"+(Math.round(100/numCols))+"%; float: "+options.float+";'></div>"));} var i=0;while(i<numCols-(options.overflow?0:1)||scrollHorizontally&&$destroyable.children().length){if($inBox.children().length<=i){$inBox.append($("<div class='"+className+"' style='width:"+(Math.round(100/numCols))+"%; float: "+options.float+";'></div>"));} var $col=$inBox.children().eq(i);columnize($col,$destroyable,$col,targetHeight);if(!$destroyable.children().find(":first-child").hasClass("dontend")){split($col,$destroyable,$col,targetHeight);}else{} while(checkDontEndColumn($col.children(":last").length&&$col.children(":last").get(0))){var $lastKid=$col.children(":last");$lastKid.remove();$destroyable.prepend($lastKid);} i++;} if(options.overflow&&!scrollHorizontally){var IE6=false;var IE7=(document.all)&&(navigator.appVersion.indexOf("MSIE 7.")!=-1);if(IE6||IE7){var html="";var div=document.createElement('DIV');while($destroyable[0].childNodes.length>0){var kid=$destroyable[0].childNodes[0];for(var i=0;i<kid.attributes.length;i++){if(kid.attributes[i].nodeName.indexOf("jQuery")==0){kid.removeAttribute(kid.attributes[i].nodeName);}} div.innerHTML="";div.appendChild($destroyable[0].childNodes[0]);html+=div.innerHTML;} var overflow=$(options.overflow.id)[0];overflow.innerHTML=html;}else{$(options.overflow.id).empty().append($destroyable.children().clone(true));}}else if(!scrollHorizontally){$col=$inBox.children().eq($inBox.children().length-1);while($destroyable.children().length)$col.append($destroyable.children(":first"));var afterH=$col.height();var diff=afterH-targetHeight;var totalH=0;var min=10000000;var max=0;var lastIsMax=false;$inBox.children().each(function($inBox){return function($item){var h=$inBox.children().eq($item).height();lastIsMax=false;totalH+=h;if(h>max){max=h;lastIsMax=true;} if(h<min)min=h;}}($inBox));var avgH=totalH/numCols;if(options.lastNeverTallest&&lastIsMax){targetHeight=targetHeight+30;if(loopCount==maxLoops-1)maxLoops++;}else if(max-min>30){targetHeight=avgH+30;}else if(Math.abs(avgH-targetHeight)>20){targetHeight=avgH;}else{loopCount=maxLoops;}}else{$inBox.children().each(function(i){$col=$inBox.children().eq(i);$col.width(options.width+"px");if(i==0){$col.addClass("first");}else if(i==$inBox.children().length-1){$col.addClass("last");}else{$col.removeClass("first");$col.removeClass("last");}});$inBox.width($inBox.children().length*options.width+"px");} $inBox.append($("<br style='clear:both;'>"));} $inBox.find('.column').find(':first.removeiffirst').remove();$inBox.find('.column').find(':last.removeiflast').remove();$inBox.data("columnizing",false);if(options.overflow){options.overflow.doneFunc();} options.doneFunc();}});};

// jPlayer 1.0.0 <http://www.happyworm.com/jquery/jplayer>
function getter(plugin,method,args){function getMethods(type){var methods=$[plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
var methods=getMethods('getter');return($.inArray(method,methods)!=-1);}
$.fn.jPlayer=function(options){var name="jPlayer";var isMethodCall=(typeof options=='string');var args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
if(isMethodCall&&getter(name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);if(!instance&&!isMethodCall){$.data(this,name,new $[name](this,options))._init();}
(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$.jPlayer=function(element,options){this.options=$.extend({},options);this.element=$(element);};$.jPlayer.getter="jPlayerOnProgressChange jPlayerOnSoundComplete jPlayerVolume jPlayerReady getData jPlayerController";$.jPlayer.defaults={cssPrefix:"jqjp",swfPath:"/wordpress/wp-content/themes/gsp.1/assets/flash",volume:50,oggSupport:false,nativeSupport:true,customCssIds:false,graphicsFix:true,errorAlerts:false,warningAlerts:false,position:"absolute",width:"0",height:"0",top:"0",left:"0",quality:"high",bgcolor:"#ffffff"};$.jPlayer._config={jPlayerControllerId:undefined,isWaitingForPlay:false};$.jPlayer._diag={isPlaying:false,src:"",loadPercent:0,playedPercentRelative:0,playedPercentAbsolute:0,playedTime:0,totalTime:0};$.jPlayer._cssId={play:"jplayer_play",pause:"jplayer_pause",stop:"jplayer_stop",loadBar:"jplayer_load_bar",playBar:"jplayer_play_bar",volumeMin:"jplayer_volume_min",volumeMax:"jplayer_volume_max",volumeBar:"jplayer_volume_bar",volumeBarValue:"jplayer_volume_bar_value"};$.jPlayer.count=0;$.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};$.jPlayer.convertTime=function(mSec){var myTime=new Date(mSec);var hour=myTime.getUTCHours();var min=myTime.getUTCMinutes();var sec=myTime.getUTCSeconds();var strHour=($.jPlayer.timeFormat.padHour&&hour<10)?"0"+hour:hour;var strMin=($.jPlayer.timeFormat.padMin&&min<10)?"0"+min:min;var strSec=($.jPlayer.timeFormat.padSec&&sec<10)?"0"+sec:sec;return(($.jPlayer.timeFormat.showHour)?strHour+$.jPlayer.timeFormat.sepHour:"")+(($.jPlayer.timeFormat.showMin)?strMin+$.jPlayer.timeFormat.sepMin:"")+(($.jPlayer.timeFormat.showSec)?strSec+$.jPlayer.timeFormat.sepSec:"");};$.jPlayer.prototype={_init:function(){var self=this;var element=this.element;this.config=$.extend({},$.jPlayer.defaults,this.options,$.jPlayer._config);this.config.diag=$.extend({},$.jPlayer._diag);this.config.cssId={};this.config.cssSelector={};this.config.cssDisplay={};this.config.clickHandler={};this.element.data("jPlayer.config",this.config);$.extend(this.config,{id:this.element.attr("id"),swf:this.config.swfPath+((this.config.swfPath!=""&&this.config.swfPath.slice(-1)!="/")?"/":"")+"jplayer.swf",fid:this.config.cssPrefix+"_flash_"+$.jPlayer.count,aid:this.config.cssPrefix+"_audio_"+$.jPlayer.count,hid:this.config.cssPrefix+"_force_"+$.jPlayer.count,i:$.jPlayer.count});$.jPlayer.count++;if(this.config.ready!=undefined){if($.isFunction(this.config.ready)){this.jPlayerReady=this.config.ready;}else{this._warning("Constructor's ready option is not a function.");}}
this.element.prepend('<audio id="'+this.config.aid+'"></audio>');$.extend(this.config,{aSel:$("#"+this.config.aid)});var audioArray=this.config.aSel.get();$.extend(this.config,{canPlayMP3:!!((audioArray[0].canPlayType)?((""!=audioArray[0].canPlayType("audio/mpeg"))&&("no"!=audioArray[0].canPlayType("audio/mpeg"))):false),canPlayOGG:!!((audioArray[0].canPlayType)?((""!=audioArray[0].canPlayType("audio/ogg"))&&("no"!=audioArray[0].canPlayType("audio/ogg"))):false),audio:audioArray[0]});$.extend(this.config,{html5:!!((this.config.oggSupport)?((this.config.canPlayOGG)?true:this.config.canPlayMP3):this.config.canPlayMP3)});$.extend(this.config,{usingFlash:!(this.config.html5&&this.config.nativeSupport),usingMP3:!(this.config.oggSupport&&this.config.canPlayOGG&&this.config.nativeSupport)});var events={setButtons:function(e,playing){self.config.diag.isPlaying=playing;if(self.config.cssId.play!=undefined&&self.config.cssId.pause!=undefined){if(playing){self.config.cssSelector.play.css('display','none');self.config.cssSelector.pause.css('display','block');}else{self.config.cssSelector.play.css('display','block');self.config.cssSelector.pause.css('display','none');}}
if(playing){self.config.isWaitingForPlay=false;}}};var eventsForFlash={setFile:function(e,mp3,ogg){try{self._getMovie().fl_setFile_mp3(mp3);self.config.diag.src=mp3;self.config.isWaitingForPlay=true;element.trigger("jPlayer.setButtons",false);}catch(err){self._flashError(err);}},play:function(e){try{if(self._getMovie().fl_play_mp3()){element.trigger("jPlayer.setButtons",true);}}catch(err){self._flashError(err);}},pause:function(e){try{if(self._getMovie().fl_pause_mp3()){element.trigger("jPlayer.setButtons",false);}}catch(err){self._flashError(err);}},stop:function(e){try{if(self._getMovie().fl_stop_mp3()){element.trigger("jPlayer.setButtons",false);}}catch(err){self._flashError(err);}},playHead:function(e,p){try{if(self._getMovie().fl_play_head_mp3(p)){element.trigger("jPlayer.setButtons",true);}}catch(err){self._flashError(err);}},playHeadTime:function(e,t){try{if(self._getMovie().fl_play_head_time_mp3(t)){element.trigger("jPlayer.setButtons",true);}}catch(err){self._flashError(err);}},volume:function(e,v){self.config.volume=v;try{self._getMovie().fl_volume_mp3(v);}catch(err){self._flashError(err);}}};var eventsForHtmlAudio={setFile:function(e,mp3,ogg){self.config.aSel.remove();element.prepend('<audio id="'+self.config.aid+'"></audio>');self.config.aSel=$("#"+self.config.aid)
var audioArray=self.config.aSel.get();self.config.audio=audioArray[0];self.config.audio.volume=self.config.volume/100;if(self.config.usingMP3){self.config.diag.src=mp3;}else{self.config.diag.src=ogg;}
self.config.isWaitingForPlay=true;element.trigger("jPlayer.setButtons",false);self.jPlayerOnProgressChange(0,0,0,0,0);},play:function(e){if(self.config.isWaitingForPlay){self.config.audio.src=self.config.diag.src;}
self.config.audio.play();element.trigger("jPlayer.setButtons",true);clearInterval(self.config.jPlayerControllerId);self.config.jPlayerControllerId=window.setInterval(function(){self.jPlayerController(false);},100);},pause:function(e){self.config.audio.pause();element.trigger("jPlayer.setButtons",false);},stop:function(e){try{self.config.audio.currentTime=0;element.trigger("jPlayer.pause");clearInterval(self.config.jPlayerControllerId);self.config.jPlayerControllerId=window.setInterval(function(){self.jPlayerController(true);},100);}catch(err){window.setTimeout(function(){self.stop();},100);}},playHead:function(e,p){try{self.config.audio.currentTime=(self.config.audio.buffered)?p*self.config.audio.buffered.end()/100:p*self.config.audio.duration/100;element.trigger("jPlayer.play");}catch(err){window.setTimeout(function(){self.playHead(p);},100);}},playHeadTime:function(e,t){try{self.config.audio.currentTime=t/1000;element.trigger("jPlayer.play");}catch(err){window.setTimeout(function(){self.playHeadTime(t);},100);}},volume:function(e,v){if(v>100)v=100;self.config.volume=v;self.config.audio.volume=v/100;self.jPlayerVolume(v);}};if(this.config.usingFlash){$.extend(events,eventsForFlash);}else{$.extend(events,eventsForHtmlAudio);}
for(var event in events){var e="jPlayer."+event;this.element.unbind(e);this.element.bind(e,events[event]);}
if(this.config.usingFlash){if(this._checkForFlash(8)){if($.browser.msie){var html_obj='<object id="'+this.config.fid+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" type="application/x-shockwave-flash" width="'+this.config.width+'" height="'+this.config.height+'"></object>';var obj_param=new Array();obj_param[0]='<param name="movie" value="'+this.config.swf+'" />';obj_param[1]='<param name="quality" value="high" />';obj_param[2]='<param name="FlashVars" value="id='+escape(this.config.id)+'&fid='+escape(this.config.fid)+'&vol='+this.config.volume+'" />';obj_param[3]='<param name="allowScriptAccess" value="always" />';obj_param[4]='<param name="bgcolor" value="'+this.config.bgcolor+'" />';var ie_dom=document.createElement(html_obj);for(var i=0;i<obj_param.length;i++){ie_dom.appendChild(document.createElement(obj_param[i]));}
this.element.html(ie_dom);}else{var html_embed='<embed name="'+this.config.fid+'" id="'+this.config.fid+'" src="'+this.config.swf+'" width="'+this.config.width+'" height="'+this.config.height+'" bgcolor="'+this.config.bgcolor+'" quality="high" FlashVars="id='+escape(this.config.id)+'&fid='+escape(this.config.fid)+'&vol='+this.config.volume+'" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';this.element.html(html_embed);}}else{$('#jp-interface').html("<p>"+l10n.getflash+"</p>");}}
this.element.css({'position':this.config.position,'top':this.config.top,'left':this.config.left});if(this.config.graphicsFix){var html_hidden='<div id="'+this.config.hid+'"></div>';this.element.append(html_hidden);$.extend(this.config,{hSel:$("#"+this.config.hid)});this.config.hSel.css({'text-indent':'-9999px'});}
if(!this.config.customCssIds){$.each($.jPlayer._cssId,function(name,id){self.cssId(name,id);});}
if(!this.config.usingFlash){this.element.css({'left':'-9999px'});window.setTimeout(function(){self.volume(self.config.volume);self.jPlayerReady();},100);}},jPlayerReady:function(){},setFile:function(mp3,ogg){this.element.trigger("jPlayer.setFile",[mp3,ogg]);},play:function(){this.element.trigger("jPlayer.play");},pause:function(){this.element.trigger("jPlayer.pause");},stop:function(){this.element.trigger("jPlayer.stop");},playHead:function(p){this.element.trigger("jPlayer.playHead",[p]);},playHeadTime:function(t){this.element.trigger("jPlayer.playHeadTime",[t]);},volume:function(v){this.element.trigger("jPlayer.volume",[v]);},cssId:function(fn,id){var self=this;if(typeof id=='string'){if($.jPlayer._cssId[fn]){if(this.config.cssId[fn]!=undefined){this.config.cssSelector[fn].unbind("click",this.config.clickHandler[fn]);}
this.config.cssId[fn]=id;this.config.cssSelector[fn]=$('#'+id,'#'+this.element.parent().parent().attr('id'));this.config.clickHandler[fn]=function(e){self[fn](e);return false;}
this.config.cssSelector[fn].click(this.config.clickHandler[fn]);this.config.cssDisplay[fn]=this.config.cssSelector[fn].css("display");if(fn=="pause"){this.config.cssSelector[fn].css("display","none");}}else{this._warning("Unknown/Illegal function in cssId\n\njPlayer('cssId', '"+fn+"', '"+id+"')");}}else{this._warning("cssId CSS Id must be a string\n\njPlayer('cssId', '"+fn+"', "+id+")");}},loadBar:function(e){if(this.config.cssId.loadBar!=undefined){var offset=this.config.cssSelector.loadBar.offset();var x=e.pageX-offset.left;var w=this.config.cssSelector.loadBar.width();var p=100*x/w;this.playHead(p);}},playBar:function(e){this.loadBar(e);},onProgressChange:function(fn){if($.isFunction(fn)){this.onProgressChangeCustom=fn;}else{this._warning("onProgressChange parameter is not a function.");}},onProgressChangeCustom:function(){},jPlayerOnProgressChange:function(lp,ppr,ppa,pt,tt){this.config.diag.loadPercent=lp;this.config.diag.playedPercentRelative=ppr;this.config.diag.playedPercentAbsolute=ppa;this.config.diag.playedTime=pt;this.config.diag.totalTime=tt;if(this.config.cssId.loadBar!=undefined){this.config.cssSelector.loadBar.width(lp+"%");}
if(this.config.cssId.playBar!=undefined){this.config.cssSelector.playBar.width(ppr+"%");}
this.onProgressChangeCustom(lp,ppr,ppa,pt,tt);this._forceUpdate();},jPlayerController:function(override){var pt=0,tt=0,ppa=0,lp=0,ppr=0;if(this.config.audio.readyState>=1){pt=this.config.audio.currentTime*1000;tt=this.config.audio.duration*1000;tt=isNaN(tt)?0:tt;ppa=(tt>0)?100*pt/tt:0;lp=(this.config.audio.buffered)?100*this.config.audio.buffered.end()/this.config.audio.duration:100;ppr=(this.config.audio.buffered)?100*this.config.audio.currentTime/this.config.audio.buffered.end():ppa;}
if(this.config.audio.ended){clearInterval(this.config.jPlayerControllerId);this.jPlayerOnSoundComplete();}else if(!this.config.diag.isPlaying&&lp>=100){clearInterval(this.config.jPlayerControllerId);}
if(override){this.jPlayerOnProgressChange(lp,0,0,0,tt);}else{this.jPlayerOnProgressChange(lp,ppr,ppa,pt,tt);}},volumeMin:function(){this.volume(0);},volumeMax:function(){this.volume(100);},volumeBar:function(e){if(this.config.cssId.volumeBar!=undefined){var offset=this.config.cssSelector.volumeBar.offset();var x=e.pageX-offset.left;var w=this.config.cssSelector.volumeBar.width();var p=100*x/w;this.volume(p);}},volumeBarValue:function(e){this.volumeBar(e);},jPlayerVolume:function(v){if(this.config.cssId.volumeBarValue!=null){if(v!=0&&$('#jplayer_mute').hasClass('jp-unmute')){$('#jplayer_mute').click();}
this.config.cssSelector.volumeBarValue.width(v+"%");this._forceUpdate();}},onSoundComplete:function(fn){if($.isFunction(fn)){this.onSoundCompleteCustom=fn;}else{this._warning("onSoundComplete parameter is not a function.");}},onSoundCompleteCustom:function(){},jPlayerOnSoundComplete:function(){this.element.trigger("jPlayer.setButtons",false);this.onSoundCompleteCustom();},getData:function(name){var n=name.split(".");var p=this.config;for(var i=0;i<n.length;i++){if(p[n[i]]!=undefined){p=p[n[i]];}else{this._warning("Undefined data requested.\n\njPlayer('getData', '"+name+"')");return undefined;}}
return p;},_getMovie:function(){return document[this.config.fid];},_checkForFlash:function(version){var flashIsInstalled=false;var flash;if(window.ActiveXObject){try{flash=new ActiveXObject(("ShockwaveFlash.ShockwaveFlash."+version));flashIsInstalled=true;}
catch(e){}}
else if(navigator.plugins&&navigator.mimeTypes.length>0){flash=navigator.plugins["Shockwave Flash"];if(flash){var flashVersion=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1");if(flashVersion>=version){flashIsInstalled=true;}}}
return flashIsInstalled;},_forceUpdate:function(){if(this.config.graphicsFix){this.config.hSel.text(""+Math.random());}},_flashError:function(e){this._error("Problem with Flash component.\n\nCheck the swfPath points at the Jplayer.swf path.\n\nswfPath = "+this.config.swfPath+"\nurl: "+this.config.swf+"\n\nError: "+e.message);},_error:function(msg){if(this.config.errorAlerts){this._alert("Error!\n\n"+msg);}},_warning:function(msg){if(this.config.warningAlerts){this._alert("Warning!\n\n"+msg);}},_alert:function(msg){alert("jPlayer : id='"+this.config.id+"' : "+msg);}};

})(jQuery);

// Flowplayer 3.1.4 <http://flowplayer.org>
(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p<r&&q.call(s,p,s)!==false;s=t[++p]){}}return t}function c(o){return document.getElementById(o)}function i(q,p,o){if(typeof p!="object"){return q}if(q&&p){m(p,function(r,s){if(!o||typeof s!="function"){q[r]=s}})}return q}function n(s){var q=s.indexOf(".");if(q!=-1){var p=s.substring(0,q)||"*";var o=s.substring(q+1,s.length);var r=[];m(document.getElementsByTagName(p),function(){if(this.className&&this.className.indexOf(o)!=-1){r.push(this)}});return r}}function f(o){o=o||window.event;if(o.preventDefault){o.stopPropagation();o.preventDefault()}else{o.returnValue=false;o.cancelBubble=true}return false}function j(q,o,p){q[o]=q[o]||[];q[o].push(p)}function e(){return"_"+(""+Math.random()).substring(2,10)}var h=function(t,r,s){var q=this;var p={};var u={};q.index=r;if(typeof t=="string"){t={url:t}}i(this,t,true);m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var v="on"+this;if(v.indexOf("*")!=-1){v=v.substring(0,v.length-1);var w="onBefore"+v.substring(2);q[w]=function(x){j(u,w,x);return q}}q[v]=function(x){j(u,v,x);return q};if(r==-1){if(q[w]){s[w]=q[w]}if(q[v]){s[v]=q[v]}}});i(this,{onCuepoint:function(x,w){if(arguments.length==1){p.embedded=[null,x];return q}if(typeof x=="number"){x=[x]}var v=e();p[v]=[x,w];if(s.isLoaded()){s._api().fp_addCuepoints(x,r,v)}return q},update:function(w){i(q,w);if(s.isLoaded()){s._api().fp_updateClip(w,r)}var v=s.getConfig();var x=(r==-1)?v.clip:v.playlist[r];i(x,w,true)},_fireEvent:function(v,y,w,A){if(v=="onLoad"){m(p,function(B,C){if(C[0]){s._api().fp_addCuepoints(C[0],r,B)}});return false}A=A||q;if(v=="onCuepoint"){var z=p[y];if(z){return z[1].call(s,A,w)}}if(y&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v)!=-1){i(A,y);if(y.metaData){if(!A.duration){A.duration=y.metaData.duration}else{A.fullDuration=y.metaData.duration}}}var x=true;m(u[v],function(){x=this.call(s,A,y,w)});return x}});if(t.onCuepoint){var o=t.onCuepoint;q.onCuepoint.apply(q,typeof o=="function"?[o]:o);delete t.onCuepoint}m(t,function(v,w){if(typeof w=="function"){j(u,v,w);delete t[v]}});if(r==-1){s.onCuepoint=this.onCuepoint}};var l=function(p,r,q,t){var s={};var o=this;var u=false;if(t){i(s,t)}m(r,function(v,w){if(typeof w=="function"){s[v]=w;delete r[v]}});i(this,{animate:function(y,z,x){if(!y){return o}if(typeof z=="function"){x=z;z=500}if(typeof y=="string"){var w=y;y={};y[w]=z;z=500}if(x){var v=e();s[v]=x}if(z===undefined){z=500}r=q._api().fp_animate(p,y,z,v);return o},css:function(w,x){if(x!==undefined){var v={};v[w]=x;w=v}r=q._api().fp_css(p,w);i(o,r);return o},show:function(){this.display="block";q._api().fp_showPlugin(p);return o},hide:function(){this.display="none";q._api().fp_hidePlugin(p);return o},toggle:function(){this.display=q._api().fp_togglePlugin(p);return o},fadeTo:function(y,x,w){if(typeof x=="function"){w=x;x=500}if(w){var v=e();s[v]=w}this.display=q._api().fp_fadeTo(p,y,x,v);this.opacity=y;return o},fadeIn:function(w,v){return o.fadeTo(1,w,v)},fadeOut:function(w,v){return o.fadeTo(0,w,v)},getName:function(){return p},getPlayer:function(){return q},_fireEvent:function(w,v,x){if(w=="onUpdate"){var y=q._api().fp_getPlugin(p);if(!y){return}i(o,y);delete o.methods;if(!u){m(y.methods,function(){var A=""+this;o[A]=function(){var B=[].slice.call(arguments);var C=q._api().fp_invoke(p,A,B);return C==="undefined"||C===undefined?o:C}});u=true}}var z=s[w];if(z){z.apply(o,v);if(w.substring(0,1)=="_"){delete s[w]}}}})};function b(o,t,z){var E=this,y=null,x,u,p=[],s={},B={},r,v,w,D,A,q;i(E,{id:function(){return r},isLoaded:function(){return(y!==null)},getParent:function(){return o},hide:function(F){if(F){o.style.height="0px"}if(y){y.style.height="0px"}return E},show:function(){o.style.height=q+"px";if(y){y.style.height=A+"px"}return E},isHidden:function(){return y&&parseInt(y.style.height,10)===0},load:function(F){if(!y&&E._fireEvent("onBeforeLoad")!==false){m(a,function(){this.unload()});x=o.innerHTML;if(x&&!flashembed.isSupported(t.version)){o.innerHTML=""}flashembed(o,t,{config:z});if(F){F.cached=true;j(B,"onLoad",F)}}return E},unload:function(){if(x.replace(/\s/g,"")!==""){if(E._fireEvent("onBeforeUnload")===false){return E}try{if(y){y.fp_close();E._fireEvent("onUnload")}}catch(F){}y=null;o.innerHTML=x}return E},getClip:function(F){if(F===undefined){F=D}return p[F]},getCommonClip:function(){return u},getPlaylist:function(){return p},getPlugin:function(F){var H=s[F];if(!H&&E.isLoaded()){var G=E._api().fp_getPlugin(F);if(G){H=new l(F,G,E);s[F]=H}}return H},getScreen:function(){return E.getPlugin("screen")},getControls:function(){return E.getPlugin("controls")},getConfig:function(F){return F?k(z):z},getFlashParams:function(){return t},loadPlugin:function(I,H,K,J){if(typeof K=="function"){J=K;K={}}var G=J?e():"_";E._api().fp_loadPlugin(I,H,K,G);var F={};F[G]=J;var L=new l(I,null,E,F);s[I]=L;return L},getState:function(){return y?y.fp_getState():-1},play:function(G,F){function H(){if(G!==undefined){E._api().fp_play(G,F)}else{E._api().fp_play()}}if(y){H()}else{E.load(function(){H()})}return E},getVersion:function(){var G="flowplayer.js 3.1.4";if(y){var F=y.fp_getVersion();F.push(G);return F}return G},_api:function(){if(!y){throw"Flowplayer "+E.id()+" not loaded when calling an API method"}return y},setClip:function(F){E.setPlaylist([F]);return E},getIndex:function(){return w}});m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var F="on"+this;if(F.indexOf("*")!=-1){F=F.substring(0,F.length-1);var G="onBefore"+F.substring(2);E[G]=function(H){j(B,G,H);return E}}E[F]=function(H){j(B,F,H);return E}});m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed").split(","),function(){var F=this;E[F]=function(H,G){if(!y){return E}var I=null;if(H!==undefined&&G!==undefined){I=y["fp_"+F](H,G)}else{I=(H===undefined)?y["fp_"+F]():y["fp_"+F](H)}return I==="undefined"||I===undefined?E:I}});E._fireEvent=function(O){if(typeof O=="string"){O=[O]}var P=O[0],M=O[1],K=O[2],J=O[3],I=0;if(z.debug){g(O)}if(!y&&P=="onLoad"&&M=="player"){y=y||c(v);A=y.clientHeight;m(p,function(){this._fireEvent("onLoad")});m(s,function(Q,R){R._fireEvent("onUpdate")});u._fireEvent("onLoad")}if(P=="onLoad"&&M!="player"){return}if(P=="onError"){if(typeof M=="string"||(typeof M=="number"&&typeof K=="number")){M=K;K=J}}if(P=="onContextMenu"){m(z.contextMenu[M],function(Q,R){R.call(E)});return}if(P=="onPluginEvent"){var F=M.name||M;var G=s[F];if(G){G._fireEvent("onUpdate",M);G._fireEvent(K,O.slice(3))}return}if(P=="onPlaylistReplace"){p=[];var L=0;m(M,function(){p.push(new h(this,L++,E))})}if(P=="onClipAdd"){if(M.isInStream){return}M=new h(M,K,E);p.splice(K,0,M);for(I=K+1;I<p.length;I++){p[I].index++}}var N=true;if(typeof M=="number"&&M<p.length){D=M;var H=p[M];if(H){N=H._fireEvent(P,K,J)}if(!H||N!==false){N=u._fireEvent(P,K,J,H)}}m(B[P],function(){N=this.call(E,M,K);if(this.cached){B[P].splice(I,1)}if(N===false){return false}I++});return N};function C(){if($f(o)){$f(o).getParent().innerHTML="";w=$f(o).getIndex();a[w]=E}else{a.push(E);w=a.length-1}q=parseInt(o.style.height,10)||o.clientHeight;if(typeof t=="string"){t={src:t}}r=o.id||"fp"+e();v=t.id||r+"_api";t.id=v;z.playerId=r;if(typeof z=="string"){z={clip:{url:z}}}if(typeof z.clip=="string"){z.clip={url:z.clip}}z.clip=z.clip||{};if(o.getAttribute("href",2)&&!z.clip.url){z.clip.url=o.getAttribute("href",2)}u=new h(z.clip,-1,E);z.playlist=z.playlist||[z.clip];var F=0;m(z.playlist,function(){var H=this;if(typeof H=="object"&&H.length){H={url:""+H}}m(z.clip,function(I,J){if(J!==undefined&&H[I]===undefined&&typeof J!="function"){H[I]=J}});z.playlist[F]=H;H=new h(H,F,E);p.push(H);F++});m(z,function(H,I){if(typeof I=="function"){if(u[H]){u[H](I)}else{j(B,H,I)}delete z[H]}});m(z.plugins,function(H,I){if(I){s[H]=new l(H,I,E)}});if(!z.plugins||z.plugins.controls===undefined){s.controls=new l("controls",null,E)}s.canvas=new l("canvas",null,E);t.bgcolor=t.bgcolor||"#000000";t.version=t.version||[9,0];t.expressInstall="http://www.flowplayer.org/swf/expressinstall.swf";function G(H){if(!E.isLoaded()&&E._fireEvent("onBeforeClick")!==false){E.load()}return f(H)}x=o.innerHTML;if(x.replace(/\s/g,"")!==""){if(o.addEventListener){o.addEventListener("click",G,false)}else{if(o.attachEvent){o.attachEvent("onclick",G)}}}else{if(o.addEventListener){o.addEventListener("click",f,false)}E.load()}}if(typeof o=="string"){flashembed.domReady(function(){var F=c(o);if(!F){throw"Flowplayer cannot access element: "+o}else{o=F;C()}})}else{C()}}var a=[];function d(o){this.length=o.length;this.each=function(p){m(o,p)};this.size=function(){return o.length}}window.flowplayer=window.$f=function(){var p=null;var o=arguments[0];if(!arguments.length){m(a,function(){if(this.isLoaded()){p=this;return false}});return p||a[0]}if(arguments.length==1){if(typeof o=="number"){return a[o]}else{if(o=="*"){return new d(a)}m(a,function(){if(this.id()==o.id||this.id()==o||this.getParent()==o){p=this;return false}});return p}}if(arguments.length>1){var r=arguments[1];var q=(arguments.length==3)?arguments[2]:{};if(typeof o=="string"){if(o.indexOf(".")!=-1){var t=[];m(n(o),function(){t.push(new b(this,k(r),k(q)))});return new d(t)}else{var s=c(o);return new b(s!==null?s:o,r,q)}}else{if(o){return new b(o,r,q)}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.prototype.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var e=typeof jQuery=="function";var i={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(e){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:"1.0.4",conf:i}}function j(){if(c.done){return false}var l=document;if(l&&l.getElementsByTagName&&l.getElementById&&l.body){clearInterval(c.timer);c.timer=null;for(var k=0;k<c.ready.length;k++){c.ready[k].call()}c.ready=null;c.done=true}}var c=e?jQuery:function(k){if(c.done){return k()}if(c.timer){c.ready.push(k)}else{c.ready=[k];c.timer=setInterval(j,13)}};function f(l,k){if(k){for(key in k){if(k.hasOwnProperty(key)){l[key]=k[key]}}}return l}function g(k){switch(h(k)){case"string":k=k.replace(new RegExp('(["\\\\])',"g"),"\\$1");k=k.replace(/^\s?(\d+)%/,"$1pct");return'"'+k+'"';case"array":return"["+b(k,function(n){return g(n)}).join(",")+"]";case"function":return'"function()"';case"object":var l=[];for(var m in k){if(k.hasOwnProperty(m)){l.push('"'+m+'":'+g(k[m]))}}return"{"+l.join(",")+"}"}return String(k).replace(/\s/g," ").replace(/\'/g,'"')}function h(l){if(l===null||l===undefined){return false}var k=typeof l;return(k=="object"&&l.push)?"array":k}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function b(k,n){var m=[];for(var l in k){if(k.hasOwnProperty(l)){m[l]=n(k[l])}}return m}function a(r,t){var q=f({},r);var s=document.all;var n='<object width="'+q.width+'" height="'+q.height+'"';if(s&&!q.id){q.id="_"+(""+Math.random()).substring(9)}if(q.id){n+=' id="'+q.id+'"'}if(q.cachebusting){q.src+=((q.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(q.w3c||!s){n+=' data="'+q.src+'" type="application/x-shockwave-flash"'}else{n+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}n+=">";if(q.w3c||s){n+='<param name="movie" value="'+q.src+'" />'}q.width=q.height=q.id=q.w3c=q.src=null;for(var l in q){if(q[l]!==null){n+='<param name="'+l+'" value="'+q[l]+'" />'}}var o="";if(t){for(var m in t){if(t[m]!==null){o+=m+"="+(typeof t[m]=="object"?g(t[m]):t[m])+"&"}}o=o.substring(0,o.length-1);n+='<param name="flashvars" value=\''+o+"' />"}n+="</object>";return n}function d(m,p,l){var k=flashembed.getVersion();f(this,{getContainer:function(){return m},getConf:function(){return p},getVersion:function(){return k},getFlashvars:function(){return l},getApi:function(){return m.firstChild},getHTML:function(){return a(p,l)}});var q=p.version;var r=p.expressInstall;var o=!q||flashembed.isSupported(q);if(o){p.onFail=p.version=p.expressInstall=null;m.innerHTML=a(p,l)}else{if(q&&r&&flashembed.isSupported([6,65])){f(p,{src:r});l={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};m.innerHTML=a(p,l)}else{if(m.innerHTML.replace(/\s/g,"")!==""){}else{m.innerHTML="<h2>"+l10n.flashversion+" "+q+" "+l10n.required+"</h2><h3>"+(k[0]>0?l10n.yourversion+" "+k:l10n.noflash)+"</h3>"+(m.tagName=="A"?"<p>"+l10n.clickhere+"</p>":'<p>'+l10n.fromhere+'</p>');if(m.tagName=="A"){m.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!o&&p.onFail){var n=p.onFail.call(this);if(typeof n=="string"){m.innerHTML=n}}if(document.all){window[p.id]=document.getElementById(p.id)}}window.flashembed=function(l,m,k){if(typeof l=="string"){var n=document.getElementById(l);if(n){l=n}else{c(function(){flashembed(l,m,k)});return}}if(!l){return}if(typeof m=="string"){m={src:m}}var o=f({},i);f(o,m);return new d(l,o,k)};f(window.flashembed,{getVersion:function(){var m=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var l=navigator.plugins["Shockwave Flash"].description;if(typeof l!="undefined"){l=l.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var n=parseInt(l.replace(/^(.*)\..*$/,"$1"),10);var r=/r/.test(l)?parseInt(l.replace(/^.*r(.*)$/,"$1"),10):0;m=[n,r]}}else{if(window.ActiveXObject){try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(q){try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");m=[6,0];p.AllowScriptAccess="always"}catch(k){if(m[0]==6){return m}}try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(o){}}if(typeof p=="object"){l=p.GetVariable("$version");if(typeof l!="undefined"){l=l.replace(/^\S+\s+(.*)$/,"$1").split(",");m=[parseInt(l[0],10),parseInt(l[2],10)]}}}}return m},isSupported:function(k){var m=flashembed.getVersion();var l=(m[0]>k[0])||(m[0]==k[0]&&m[1]>=k[1]);return l},domReady:c,asString:g,getHTML:a});if(e){jQuery.fn.flashembed=function(l,k){var m=null;this.each(function(){m=flashembed(this,l,k)});return l.api===false?this:m}}})();/*

	[ site.js ]

*/

icl_lang = window.icl_lang || false;

var is_en = (icl_lang ? (icl_lang == 'en') : false);

if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i)) {
	addEventListener('load', function() { setTimeout(hideURLbar,0); }, false);
	function hideURLbar() { window.scrollTo(0,1); }
}

var thread, videos, audios, player, jpPlayTime, jpTotalTime;

var media = {
	pid: null,
	post: null,
	src: '/wordpress/wp-content/themes/gsp.1/assets/flash/flowplayer.swf',
	controls: '/wordpress/wp-content/themes/gsp.1/assets/flash/flowplayer.controls.swf',
	background: '/wordpress/wp-content/themes/gsp.1/assets/images/player-bg.png',
	volume: 0
};

var l10n = {
	play:		is_en ? 'Play' : 'Jouer',
	buffer:		is_en ? 'Pause' : 'Pause',
	progress:	is_en ? 'Progress Bar' : 'Barre de progression',
	playhead:	is_en ? 'Play Progress' : 'Tête de lecture',
	time:		is_en ? 'Time Left' : 'Temps restant',
	mute:		is_en ? 'Mute Volume' : 'Désactiver le volume',
	volume:		is_en ? 'Volume' : 'Volume',
	next:		is_en ? 'Next Image...' : 'Prochaine image...',
	noflash:	is_en ? 'You have no Flash plugin installed' : "Vous n'avez pas le plugin Flash install&eacute;",
	flashversion:	is_en ? 'Flash version' : 'Version Flash',
	yourversion:	is_en ? 'Your version is' : 'Votre version est',
	required:	is_en ? 'or greater is required' : 'ou supérieure est n&eacute;cessaire',
	clickhere:	is_en ? 'Click here to download latest version' : 'Cliquez ici pour t&eacute;l&eacute;charger la derni&egrave;re version',
	fromhere:	is_en ? 'Download latest version from <a href="http://adobe.com/go/getflashplayer">here</a>' : 'T&eacute;l&eacute;chargez la derni&egrave;re version &agrave; partir d\'<a href="http://adobe.com/go/getflashplayer">ici</a>',
	getflash:	is_en ? 'Flash 8 or above is not installed. <a href="http://adobe.com/go/getflashplayer">Get Flash!</a>' : 'Flash 8 ou sup&eacute;rieur n\'est pas install&eacute;. Obtenez-le <a href="http://adobe.com/go/getflashplayer">ici</a>!'
};

function createAudioPlayer(id) {
	if ( typeof(id) == 'undefined' ) {
		id = $('.post.current').attr('id');
		media.pid = id.substring(5);
		n = false;
	} else {
		media.pid = id;
		n = true;
	}
	media.post = '#post-'+media.pid;

	var tracklist = $('.tracklist', media.post);
	var tracklength = tracklist.find('p').length;

	var playItem = 0;

	if (n) {
		player.jPlayer('stop');
		if (!tracklist.data('indexed')) {
			displayPlayList(tracklist);
			tracklist.data('indexed', true);
		}
		playListConfig(playItem, false, tracklist);
	} else {
		jpPlayTime = $('#jplayer_play_time');
		jpTotalTime = $('#jplayer_total_time');

		jpPrevious = $('#jplayer_previous');
		jpNext = $('#jplayer_next');

		player = $('#jplayer');

		player.jPlayer({
			ready: function() {
				displayPlayList(tracklist);
				tracklist.data('indexed', true);
				playListConfig(playItem, false, tracklist);
			}
		}).jPlayer('onProgressChange', function(loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime) {
			jpPlayTime.text($.jPlayer.convertTime(playedTime));
			jpTotalTime.text($.jPlayer.convertTime(totalTime));
		});

		$('#jplayer_mute').unbind().toggle(function() {
			$(this).removeClass('jp-mute').addClass('jp-unmute');
			media.volume = player.jPlayer('getData', 'volume');
			player.jPlayer('volume', 0);
			return false;
		}, function() {
			$(this).removeClass('jp-unmute').addClass('jp-mute');
			player.jPlayer('volume', media.volume);
			return false;
		});

	}

	player.jPlayer('onSoundComplete', function() {
		playListNext(tracklist);
	});

	jpPrevious.unbind().click(function() {
		playListPrev(tracklist);
		return false;
	});
	jpNext.unbind().click(function() {
		playListNext(tracklist);
		return false;
	});

	function displayPlayList(tracks) {
		tracks.find('p').each(function(i){
			$('a', this).data('index', i).click(function(){
				var index = $(this).data('index');
				if ( playItem != index ) {
					playListConfig(index, true, tracks);
				} else {
					player.jPlayer('play');
				}
				return false;
			});
		});
	}
	function playListConfig(index, autoplay, tracks) {
		tracks.find('p').removeClass('playing');
		tracks.find('p:eq('+index+')').addClass('playing');
		playItem = index;
		player.jPlayer('setFile', tracks.find('p:eq('+playItem+') a').attr('href'));
		if (autoplay) player.jPlayer('play');
	}
	function playListNext(tracks) {
		if ( playItem + 1 < tracklength )
			playListConfig(playItem + 1, true, tracks);
		else
			playListConfig(0, false, tracks);
	}
	function playListPrev(tracks) {
		if ( playItem - 1 >= 0 )
			playListConfig(playItem - 1, true, tracks);
		else
			playListConfig(tracklength - 1, false, tracks);
	}
}

function createVideoPlayer(feature, play) {
	if ( typeof(feature) == 'undefined' ) feature = false;
	if ( typeof(play) == 'undefined' ) play = true;

	currentVideo = feature ? feature : $('.post.current a.m')[0];

	player = flowplayer(currentVideo, { src: '/wordpress/wp-content/themes/gsp.1/assets/flash/flowplayer.swf', wmode: 'opaque' }, {
		key: '#$548be85a3eb7b417f71',
		clip: {
			autoPlay: play,
			autoBuffering: true,
			accelerated: true,
			scaling: 'fit',
			onFinish: function(){
				if (feature) $('a.sample-text', '.sample-link').click();
			}
		},
		play: { replayLabel: null },
		plugins: {
			controls: {
				url: '/wordpress/wp-content/themes/gsp.1/assets/flash/flowplayer.controls.swf',
				autoHide: 'always',
				hideDelay: 3000
			}
		}
	}).load();

}

$(window).load(function(){
	if (audios) createAudioPlayer();
	$('.QOverlay').delay(2000).fadeOut('slow', function(){ $(this).remove(); });
	if ( $('ul#navigation').height() > 30 ) $('html').removeClass('fontface');
});

$(document).ready(function(){

	Font.place('#navigation li a');

	var $element = {
		slideshow :	$('div.gallery'),
		header :	$('div#header'),
		title :		$('h1 a','div#header'),
		line :		$('hr','div#header'),
		navigation :	$('ul#navigation','div#header')
	};

	is_ios = $('html.ios').length ? true : false;
	is_ie = $('html.msie').length ? true : false;
	is_op = $('html.opera').length ? true : false;

	if ( !$.cookie('returner') && !(jQuery.browser.msie && jQuery.browser.version <= 6) )
	{
		var date = new Date();
		date.setTime(date.getTime() + (30 * 60 * 1000));

		$.cookie('returner', true, { expires: date, path: '/' });

		$element.title.hide();
		$element.line.hide().css({ width: '1px' });
		$element.navigation.hide();

		$element.title.fadeIn('slow');
		$element.line.fadeIn(1000).animate({ width: '100%' }, 1000, 'easeInQuad', function(){
				$element.navigation.fadeIn();
				QueryLoader.createPreloading();
		});
	}

	if ( $('#home').length )
	{
		if ( $('.panel','#news').length > 1 ) {
			if (!is_ios) $('#news').codaSlider();
			$('.post', '#news').setAllToMaxHeight();
		}

		if ( $element.slideshow.find('img').length ) {
			$element.slideshow.gallery({
				onImage : function(image, caption) {
					image.attr('title',l10n.next);
				}
			});
		}
	}
	/* #home */


	if ( $('#portfolio').length )
	{
		var wrap = '#thumbnails';
		var $wrap = $(wrap);

		//if (is_ios) $('.post').setAllToMaxHeight();

		if ( $('li', wrap).length > 0 ) {

			videos = $('#portfolio.video').length;
			audios = $('#portfolio.audio').length;
			$featuredImg = $('#featured');

			if ( !(jQuery.browser.msie && jQuery.browser.version <= 6) ) {
				var $current = audios ? $('div.post.current') : $featuredImg;
			}
			$wrap.jcarousel({
				start: $('#thumbnails li.current').index()+1,
				initCallback: function (){
					if ( !(jQuery.browser.msie && jQuery.browser.version <= 6) ) {
						$wrap.css({ left: '-'+$wrap[0].style.width })
						.animate({ left: 0 }, 1000, 'easeOutExpo');
					}

				}
			});
			$('li a',wrap).click(function(){

				var $currentPost = $('.post.current');
				var newID = $(this).attr('id').substring(6);
				var $newPost = $('#post-'+newID);

				if ( $currentPost.attr('id') != $newPost.attr('id') ) {
					if ( $currentPost.length <= 0 ) $currentPost = $featuredImg;

					if (player && videos) player.unload();
					if (player && audios) player.jPlayer('stop');

					$(this).parents('li').siblings('.current').removeClass('current');
					$(this).parent().addClass('current');

					if (player && audios) $currentPost.find('#jp-interface').fadeOut('fast').appendTo($newPost.find('div.inner'));
					$currentPost.fadeOut('slow',function(){
						$currentPost.removeClass('current');
						$newPost.addClass('current').fadeIn(function(){
							//$newPost.addClass('current');
							if (audios) {
								$newPost.find('#jp-interface').fadeIn();
								createAudioPlayer(newID);
							} else
								createVideoPlayer();
						});
					});
				}
				return false;
			});
		} else {
			videos = audios = false;
		}

	}
	/* #portfolio */


	if ( $('#shows').length )
	{
		wrapped = '#shows .description';
		$panels = $('.panel',wrapped);

		if (is_ios) {
		} else {
			if (is_ie || is_op) $panels.columnize({ columns: 2 });
			if ( $panels.length > 1 ) $(wrapped).codaSlider({ autoHeight: true });

			$('a.sample-text', '.sample-link').click(function(e){
				e.preventDefault();
				var sampleText = $(this);
				var sampleMedia = sampleText.prev();
				if (player) player.unload();
				$('#featured').animate({ height: 80 }, 1000, 'easeInOutExpo', function(){
					$(this).empty();
					sampleMedia.show();
					sampleText.hide();
					$('.description, .pagination').fadeIn();
				});
			});

			$('a.sample-media', '.sample-link').click(function(e){
				e.preventDefault();
				var sampleMedia = $(this);
				var sampleText = sampleMedia.next();
				var href = sampleMedia.attr('href');
				$('.description, .pagination').fadeOut();
				$('#featured').append('<a id="flash" href="'+href+'"><img src="'+media.background+'" alt="" /></a>').animate({ height: 428 }, 1000, 'easeInOutExpo', function(){
					sampleMedia.hide();
					sampleText.show();
					createVideoPlayer('flash');
				});
			});

			if ( $('#flash').length ) {
				$('#flash').one('click',function(e){
					e.preventDefault();
					createVideoPlayer('flash');
				});
			}

		}
	}
	/* #shows */


	if ( $('#projects').length )
	{
		if ( $('.panel','#lists').length > 1 && !is_ios ) $('#lists').codaSlider({ autoHeight: true });
	}
	/* #projects */


	if ( $('#about').length )
	{
		if (is_ie || is_op) $('#about .inner').columnize({ width: 260 });
		if ( $element.slideshow.length )
		{
			$element.slideshow.gallery({
				captions : true,
				onImage :  function(image, caption) {
					image.attr('alt',l10n.next);
				}
			});
		}
	}
	/* #about */

	$('a').each(function() {
		var a = new RegExp('/' + window.location.host + '/');
		if (!a.test(this.href)) {
			$(this).attr('target','_blank');
		}
	});

	$('#featured').hover(function(){
		$('.controls').fadeIn('fast');
	}, function(){
		$('.controls').fadeOut('fast');
	});
});
