');};return desc;},showImage:function(index,callback){if(this.images[index]&&!this.in_transition&&index!=this.current_index){var context=this;var image=this.images[index];this.in_transition=true;if(!image.preloaded){this.loading(true);this.preloadImage(index,function(){context.loading(false);context._showWhenLoaded(index,callback);});}else{this._showWhenLoaded(index,callback);};};},_showWhenLoaded:function(index,callback){if(this.images[index]){var context=this;var image=this.images[index];var img_container=$(document.createElement('div')).addClass('ad-image');var img=$(new Image()).attr('src',image.image);if(image.link){var link=$('');link.append(img);img_container.append(link);}else{img_container.append(img);};this.image_wrapper.prepend(img_container);var size=this._getContainedImageSize(image.size.width,image.size.height);img.attr('width',size.width);img.attr('height',size.height);img_container.css({width:size.width+'px',height:size.height+'px'});this._centerImage(img_container,size.width,size.height);var desc=this._getDescription(image);if(desc){if(!this.settings.description_wrapper&&!this.settings.hooks.displayDescription){img_container.append(desc);var width=size.width-parseInt(desc.css('padding-left'),10)-parseInt(desc.css('padding-right'),10);desc.css('width',width+'px');}else if(this.settings.hooks.displayDescription){this.settings.hooks.displayDescription.call(this,image);}else{var wrapper=this.settings.description_wrapper;wrapper.append(desc);};};this.highLightThumb(this.images[index].thumb_link);var direction='right';if(this.current_index'+this.settings.start_label+'');this.stop_link=$(''+this.settings.stop_label+'');this.countdown=$('');this.controls=$('');this.controls.append(this.start_link).append(this.stop_link).append(this.countdown);this.countdown.hide();var context=this;this.start_link.click(function(){context.start();});this.stop_link.click(function(){context.stop();});$(document).keydown(function(e){if(e.keyCode==83){if(context.running){context.stop();}else{context.start();};};});return this.controls;},disable:function(){this.enabled=false;this.stop();this.controls.hide();},enable:function(){this.enabled=true;this.controls.show();},toggle:function(){if(this.enabled){this.disable();}else{this.enable();};},start:function(){if(this.running||!this.enabled)return false;var context=this;this.running=true;this.controls.addClass('ad-slideshow-running');this._next();this.fireCallback(this.settings.onStart);return true;},stop:function(){if(!this.running)return false;this.running=false;this.countdown.hide();this.controls.removeClass('ad-slideshow-running');clearInterval(this.countdown_interval);this.fireCallback(this.settings.onStop);return true;},_next:function(){var context=this;var pre=this.settings.countdown_prefix;var su=this.settings.countdown_sufix;clearInterval(context.countdown_interval);this.countdown.show().html(pre+(this.settings.speed/1000)+su);var slide_timer=0;this.countdown_interval=setInterval(function(){slide_timer+=1000;if(slide_timer>=context.settings.speed){var whenNextIsShown=function(){if(context.running){context._next();};slide_timer=0;};if(!context.nextimage_callback(whenNextIsShown)){context.stop();};slide_timer=0;};var sec=parseInt(context.countdown.text().replace(/[^0-9]/g,''),10);sec--;if(sec>0){context.countdown.html(pre+sec+su);};},1000);},fireCallback:function(fn){if($.isFunction(fn)){fn.call(this);};}};})(jQuery);;
/*
* jPlayer Plugin for jQuery JavaScript Library
* http://www.jplayer.org
*
* Copyright (c) 2009 - 2012 Happyworm Ltd
* Dual licensed under the MIT and GPL licenses.
* - http://www.opensource.org/licenses/mit-license.php
* - http://www.gnu.org/copyleft/gpl.html
*
* Author: Mark J Panaghiston
* Version: 2.1.2
* Date: 12th April 20112
*/
(function(a,b){a.fn.jPlayer=function(c){var d="jPlayer";var e=typeof c==="string",f=Array.prototype.slice.call(arguments,1),g=this;c=!e&&f.length?a.extend.apply(null,[true,c].concat(f)):c;if(e&&c.charAt(0)==="_"){return g}if(e){this.each(function(){var e=a.data(this,d),h=e&&a.isFunction(e[c])?e[c].apply(e,f):e;if(h!==e&&h!==b){g=h;return false}})}else{this.each(function(){var b=a.data(this,d);if(b){b.option(c||{})}else{a.data(this,d,new a.jPlayer(c,this))}})}return g};a.jPlayer=function(b,c){if(arguments.length){this.element=a(c);this.options=a.extend(true,{},this.options,b);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};a.jPlayer.emulateMethods="load play pause";a.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";a.jPlayer.emulateOptions="muted volume";a.jPlayer.reservedEvent="ready flashreset resize repeat error warning";a.jPlayer.event={ready:"jPlayer_ready",flashreset:"jPlayer_flashreset",resize:"jPlayer_resize",repeat:"jPlayer_repeat",click:"jPlayer_click",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata",loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked",timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};a.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","ratechange"];a.jPlayer.pause=function(){a.each(a.jPlayer.prototype.instances,function(a,b){if(b.data("jPlayer").status.srcSet){b.jPlayer("pause")}})};a.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};a.jPlayer.convertTime=function(b){var c=new Date(b*1e3);var d=c.getUTCHours();var e=c.getUTCMinutes();var f=c.getUTCSeconds();var g=a.jPlayer.timeFormat.padHour&&d<10?"0"+d:d;var h=a.jPlayer.timeFormat.padMin&&e<10?"0"+e:e;var i=a.jPlayer.timeFormat.padSec&&f<10?"0"+f:f;return(a.jPlayer.timeFormat.showHour?g+a.jPlayer.timeFormat.sepHour:"")+(a.jPlayer.timeFormat.showMin?h+a.jPlayer.timeFormat.sepMin:"")+(a.jPlayer.timeFormat.showSec?i+a.jPlayer.timeFormat.sepSec:"")};a.jPlayer.uaBrowser=function(a){var b=a.toLowerCase();var c=/(webkit)[ \/]([\w.]+)/;var d=/(opera)(?:.*version)?[ \/]([\w.]+)/;var e=/(msie) ([\w.]+)/;var f=/(mozilla)(?:.*? rv:([\w.]+))?/;var g=c.exec(b)||d.exec(b)||e.exec(b)||b.indexOf("compatible")<0&&f.exec(b)||[];return{browser:g[1]||"",version:g[2]||"0"}};a.jPlayer.uaPlatform=function(a){var b=a.toLowerCase();var c=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/;var d=/(ipad|playbook)/;var e=/(android)/;var f=/(mobile)/;var g=c.exec(b)||[];var h=d.exec(b)||!f.exec(b)&&e.exec(b)||[];if(g[1]){g[1]=g[1].replace(/\s/g,"_")}return{platform:g[1]||"",tablet:h[1]||""}};a.jPlayer.browser={};a.jPlayer.platform={};var c=a.jPlayer.uaBrowser(navigator.userAgent);if(c.browser){a.jPlayer.browser[c.browser]=true;a.jPlayer.browser.version=c.version}var d=a.jPlayer.uaPlatform(navigator.userAgent);if(d.platform){a.jPlayer.platform[d.platform]=true;a.jPlayer.platform.mobile=!d.tablet;a.jPlayer.platform.tablet=!!d.tablet}a.jPlayer.prototype={count:0,version:{script:"2.1.2",needFlash:"2.1.2",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",preload:"metadata",volume:.8,muted:false,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",currentTime:".jp-current-time",duration:".jp-duration",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},fullScreen:false,autohide:{restored:false,full:true,fadeIn:200,fadeOut:600,hold:1e3},loop:false,repeat:function(b){if(b.jPlayer.options.loop){a(this).unbind(".jPlayerRepeat").bind(a.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){a(this).jPlayer("play")})}else{a(this).unbind(".jPlayerRepeat")}},nativeVideoControls:{},noFullScreen:{msie:/msie [0-6]/,ipad:/ipad.*?os [0-4]/,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3](?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,webos:/webos/,playbook:/playbook/},verticalVolume:false,idPrefix:"jp",noConflict:"jQuery",emulateHtml:false,errorAlerts:false,warningAlerts:false},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:true,format:{},formatType:"",waitForPlay:true,waitForLoad:true,srcSet:false,video:false,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:false},solution:{html:true,flash:true},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:true,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:true,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:false,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:false,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:false,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:true,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:true,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:true,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:false,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:false,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:true,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:true,media:"video"}},_init:function(){var c=this;this.element.empty();this.status=a.extend({},this.status);this.internal=a.extend({},this.internal);this.internal.domNode=this.element.get(0);this.formats=[];this.solutions=[];this.require={};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.ancestorJq=[];this.options.volume=this._limitValue(this.options.volume,0,1);a.each(this.options.supplied.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=false;a.each(c.formats,function(a,b){if(e===b){f=true;return false}});if(!f){c.formats.push(e)}}});a.each(this.options.solution.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.solution[e]){var f=false;a.each(c.solutions,function(a,b){if(e===b){f=true;return false}});if(!f){c.solutions.push(e)}}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;if(!this.element.attr("id")){this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count)}this.internal.self=a.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=a.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:b});this.internal.video=a.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:b});this.internal.flash=a.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:b,swf:this.options.swfPath+(this.options.swfPath.toLowerCase().slice(-4)!==".swf"?(this.options.swfPath&&this.options.swfPath.slice(-1)!=="/"?"/":"")+"Jplayer.swf":"")});this.internal.poster=a.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:b});a.each(a.jPlayer.event,function(a,d){if(c.options[a]!==b){c.element.bind(d+".jPlayer",c.options[a]);c.options[a]=b}});this.require.audio=false;this.require.video=false;a.each(this.formats,function(a,b){c.require[c.format[b].media]=true});if(this.require.video){this.options=a.extend(true,{},this.optionsVideo,this.options)}else{this.options=a.extend(true,{},this.optionsAudio,this.options)}this._setSize();this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullScreen=this._uaBlocklist(this.options.noFullScreen);this.status.noVolume=this._uaBlocklist(this.options.noVolume);this._restrictNativeVideoControls();this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=this.internal.poster.id;this.htmlElement.poster.onload=function(){if(!c.status.video||c.status.waitForPlay){c.internal.poster.jq.show()}};this.element.append(this.htmlElement.poster);this.internal.poster.jq=a("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.internal.poster.jq.bind("click.jPlayer",function(){c._trigger(a.jPlayer.event.click)});this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=document.createElement("audio");this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)}this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement("video");this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)}this.flash.available=this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};a.each(this.formats,function(a,b){c.html.canPlay[b]=c.html[c.format[b].media].available&&""!==c.htmlElement[c.format[b].media].canPlayType(c.format[b].codec);c.flash.canPlay[b]=c.format[b].flashCanPlay&&c.flash.available});this.html.desired=false;this.flash.desired=false;a.each(this.solutions,function(b,d){if(b===0){c[d].desired=true}else{var e=false;var f=false;a.each(c.formats,function(a,b){if(c[c.solutions[0]].canPlay[b]){if(c.format[b].media==="video"){f=true}else{e=true}}});c[d].desired=c.require.audio&&!e||c.require.video&&!f}});this.html.support={};this.flash.support={};a.each(this.formats,function(a,b){c.html.support[b]=c.html.canPlay[b]&&c.html.desired;c.flash.support[b]=c.flash.canPlay[b]&&c.flash.desired});this.html.used=false;this.flash.used=false;a.each(this.solutions,function(b,d){a.each(c.formats,function(a,b){if(c[d].support[b]){c[d].used=true;return false}})});this._resetActive();this._resetGate();this._cssSelectorAncestor(this.options.cssSelectorAncestor);if(!(this.html.used||this.flash.used)){this._error({type:a.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SOLUTION,hint:a.jPlayer.errorHint.NO_SOLUTION});if(this.css.jq.noSolution.length){this.css.jq.noSolution.show()}}else{if(this.css.jq.noSolution.length){this.css.jq.noSolution.hide()}}if(this.flash.used){var d,e="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+"&muted="+this.options.muted;if(a.browser.msie&&Number(a.browser.version)<=8){var f='';var g=['','','','',''];d=document.createElement(f);for(var h=0;h0?100*c/this.status.duration:0;if(typeof a.seekable==="object"&&a.seekable.length>0){f=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100;g=100*a.currentTime/a.seekable.end(a.seekable.length-1)}else{f=100;g=e}if(b){c=0;g=0;e=0}this.status.seekPercent=f;this.status.currentPercentRelative=g;this.status.currentPercentAbsolute=e;this.status.currentTime=c;this.status.readyState=a.readyState;this.status.networkState=a.networkState;this.status.playbackRate=a.playbackRate;this.status.ended=a.ended},_resetStatus:function(){this.status=a.extend({},this.status,a.jPlayer.prototype.status)},_trigger:function(b,c,d){var e=a.Event(b);e.jPlayer={};e.jPlayer.version=a.extend({},this.version);e.jPlayer.options=a.extend(true,{},this.options);e.jPlayer.status=a.extend(true,{},this.status);e.jPlayer.html=a.extend(true,{},this.html);e.jPlayer.flash=a.extend(true,{},this.flash);if(c){e.jPlayer.error=a.extend({},c)}if(d){e.jPlayer.warning=a.extend({},d)}this.element.trigger(e)},jPlayerFlashEvent:function(b,c){if(b===a.jPlayer.event.ready){if(!this.internal.ready){this.internal.ready=true;this.internal.flash.jq.css({width:"0px",height:"0px"});this.version.flash=c.version;if(this.version.needFlash!==this.version.flash){this._error({type:a.jPlayer.error.VERSION,context:this.version.flash,message:a.jPlayer.errorMsg.VERSION+this.version.flash,hint:a.jPlayer.errorHint.VERSION})}this._trigger(a.jPlayer.event.repeat);this._trigger(b)}else{if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media);if(d>0){if(e){this.pause(d)}else{this.play(d)}}}this._trigger(a.jPlayer.event.flashreset)}}}if(this.flash.gate){switch(b){case a.jPlayer.event.progress:this._getFlashStatus(c);this._updateInterface();this._trigger(b);break;case a.jPlayer.event.timeupdate:this._getFlashStatus(c);this._updateInterface();this._trigger(b);break;case a.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(b);break;case a.jPlayer.event.pause:this._updateButtons(false);this._trigger(b);break;case a.jPlayer.event.ended:this._updateButtons(false);this._trigger(b);break;case a.jPlayer.event.click:this._trigger(b);break;case a.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;if(this.status.video){this.internal.flash.jq.css({width:"0px",height:"0px"})}if(this._validString(this.status.media.poster)){this.internal.poster.jq.show()}if(this.css.jq.videoPlay.length&&this.status.video){this.css.jq.videoPlay.show()}if(this.status.video){this._flash_setVideo(this.status.media)}else{this._flash_setAudio(this.status.media)}this._updateButtons(false);this._error({type:a.jPlayer.error.URL,context:c.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL});break;case a.jPlayer.event.seeking:this._seeking();this._trigger(b);break;case a.jPlayer.event.seeked:this._seeked();this._trigger(b);break;case a.jPlayer.event.ready:break;default:this._trigger(b)}}return false},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=false},_updateButtons:function(a){if(a!==b){this.status.paused=!a;if(this.css.jq.play.length&&this.css.jq.pause.length){if(a){this.css.jq.play.hide();this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}}}if(this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length){if(this.status.noFullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.hide()}else if(this.options.fullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.show()}else{this.css.jq.fullScreen.show();this.css.jq.restoreScreen.hide()}}if(this.css.jq.repeat.length&&this.css.jq.repeatOff.length){if(this.options.loop){this.css.jq.repeat.hide();this.css.jq.repeatOff.show()}else{this.css.jq.repeat.show();this.css.jq.repeatOff.hide()}}},_updateInterface:function(){if(this.css.jq.seekBar.length){this.css.jq.seekBar.width(this.status.seekPercent+"%")}if(this.css.jq.playBar.length){this.css.jq.playBar.width(this.status.currentPercentRelative+"%")}if(this.css.jq.currentTime.length){this.css.jq.currentTime.text(a.jPlayer.convertTime(this.status.currentTime))}if(this.css.jq.duration.length){this.css.jq.duration.text(a.jPlayer.convertTime(this.status.duration))}},_seeking:function(){if(this.css.jq.seekBar.length){this.css.jq.seekBar.addClass("jp-seeking-bg")}},_seeked:function(){if(this.css.jq.seekBar.length){this.css.jq.seekBar.removeClass("jp-seeking-bg")}},_resetGate:function(){this.html.audio.gate=false;this.html.video.gate=false;this.flash.gate=false},_resetActive:function(){this.html.active=false;this.flash.active=false},setMedia:function(b){var c=this,d=false,e=this.status.media.poster!==b.poster;this._resetMedia();this._resetGate();this._resetActive();a.each(this.formats,function(e,f){var g=c.format[f].media==="video";a.each(c.solutions,function(a,e){if(c[e].support[f]&&c._validString(b[f])){var h=e==="html";if(g){if(h){c.html.video.gate=true;c._html_setVideo(b);c.html.active=true}else{c.flash.gate=true;c._flash_setVideo(b);c.flash.active=true}if(c.css.jq.videoPlay.length){c.css.jq.videoPlay.show()}c.status.video=true}else{if(h){c.html.audio.gate=true;c._html_setAudio(b);c.html.active=true}else{c.flash.gate=true;c._flash_setAudio(b);c.flash.active=true}if(c.css.jq.videoPlay.length){c.css.jq.videoPlay.hide()}c.status.video=false}d=true;return false}});if(d){return false}});if(d){if(!(this.status.nativeVideoControls&&this.html.video.gate)){if(this._validString(b.poster)){if(e){this.htmlElement.poster.src=b.poster}else{this.internal.poster.jq.show()}}}this.status.srcSet=true;this.status.media=a.extend({},b);this._updateButtons(false);this._updateInterface()}else{this._error({type:a.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SUPPORT,hint:a.jPlayer.errorHint.NO_SUPPORT})}},_resetMedia:function(){this._resetStatus();this._updateButtons(false);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);if(this.html.active){this._html_resetMedia()}else if(this.flash.active){this._flash_resetMedia()}},clearMedia:function(){this._resetMedia();if(this.html.active){this._html_clearMedia()}else if(this.flash.active){this._flash_clearMedia()}this._resetGate();this._resetActive()},load:function(){if(this.status.srcSet){if(this.html.active){this._html_load()}else if(this.flash.active){this._flash_load()}}else{this._urlNotSetError("load")}},play:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet){if(this.html.active){this._html_play(a)}else if(this.flash.active){this._flash_play(a)}}else{this._urlNotSetError("play")}},videoPlay:function(a){this.play()},pause:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet){if(this.html.active){this._html_pause(a)}else if(this.flash.active){this._flash_pause(a)}}else{this._urlNotSetError("pause")}},pauseOthers:function(){var b=this;a.each(this.instances,function(a,c){if(b.element!==c){if(c.data("jPlayer").status.srcSet){c.jPlayer("pause")}}})},stop:function(){if(this.status.srcSet){if(this.html.active){this._html_pause(0)}else if(this.flash.active){this._flash_pause(0)}}else{this._urlNotSetError("stop")}},playHead:function(a){a=this._limitValue(a,0,100);if(this.status.srcSet){if(this.html.active){this._html_playHead(a)}else if(this.flash.active){this._flash_playHead(a)}}else{this._urlNotSetError("playHead")}},_muted:function(b){this.options.muted=b;if(this.html.used){this._html_mute(b)}if(this.flash.used){this._flash_mute(b)}if(!this.html.video.gate&&!this.html.audio.gate){this._updateMute(b);this._updateVolume(this.options.volume);this._trigger(a.jPlayer.event.volumechange)}},mute:function(a){a=a===b?true:!!a;this._muted(a)},unmute:function(a){a=a===b?true:!!a;this._muted(!a)},_updateMute:function(a){if(a===b){a=this.options.muted}if(this.css.jq.mute.length&&this.css.jq.unmute.length){if(this.status.noVolume){this.css.jq.mute.hide();this.css.jq.unmute.hide()}else if(a){this.css.jq.mute.hide();this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}}},volume:function(b){b=this._limitValue(b,0,1);this.options.volume=b;if(this.html.used){this._html_volume(b)}if(this.flash.used){this._flash_volume(b)}if(!this.html.video.gate&&!this.html.audio.gate){this._updateVolume(b);this._trigger(a.jPlayer.event.volumechange)}},volumeBar:function(a){if(this.css.jq.volumeBar.length){var b=this.css.jq.volumeBar.offset(),c=a.pageX-b.left,d=this.css.jq.volumeBar.width(),e=this.css.jq.volumeBar.height()-a.pageY+b.top,f=this.css.jq.volumeBar.height();if(this.options.verticalVolume){this.volume(e/f)}else{this.volume(c/d)}}if(this.options.muted){this._muted(false)}},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){if(a===b){a=this.options.volume}a=this.options.muted?0:a;if(this.status.noVolume){if(this.css.jq.volumeBar.length){this.css.jq.volumeBar.hide()}if(this.css.jq.volumeBarValue.length){this.css.jq.volumeBarValue.hide()}if(this.css.jq.volumeMax.length){this.css.jq.volumeMax.hide()}}else{if(this.css.jq.volumeBar.length){this.css.jq.volumeBar.show()}if(this.css.jq.volumeBarValue.length){this.css.jq.volumeBarValue.show();this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](a*100+"%")}if(this.css.jq.volumeMax.length){this.css.jq.volumeMax.show()}}},volumeMax:function(){this.volume(1);if(this.options.muted){this._muted(false)}},_cssSelectorAncestor:function(b){var c=this;this.options.cssSelectorAncestor=b;this._removeUiClass();this.ancestorJq=b?a(b):[];if(b&&this.ancestorJq.length!==1){this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT})}this._addUiClass();a.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)})},_cssSelector:function(b,c){var d=this;if(typeof c==="string"){if(a.jPlayer.prototype.options.cssSelector[b]){if(this.css.jq[b]&&this.css.jq[b].length){this.css.jq[b].unbind(".jPlayer")}this.options.cssSelector[b]=c;this.css.cs[b]=this.options.cssSelectorAncestor+" "+c;if(c){this.css.jq[b]=a(this.css.cs[b])}else{this.css.jq[b]=[]}if(this.css.jq[b].length){var e=function(c){d[b](c);a(this).blur();return false};this.css.jq[b].bind("click.jPlayer",e)}if(c&&this.css.jq[b].length!==1){this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[b],message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[b].length+" found for "+b+" method.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT})}}else{this._warning({type:a.jPlayer.warning.CSS_SELECTOR_METHOD,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:a.jPlayer.warningHint.CSS_SELECTOR_METHOD})}}else{this._warning({type:a.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:a.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:a.jPlayer.warningHint.CSS_SELECTOR_STRING})}},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset();var c=a.pageX-b.left;var d=this.css.jq.seekBar.width();var e=100*c/d;this.playHead(e)}},playBar:function(a){this.seekBar(a)},repeat:function(){this._loop(true)},repeatOff:function(){this._loop(false)},_loop:function(b){if(this.options.loop!==b){this.options.loop=b;this._updateButtons();this._trigger(a.jPlayer.event.repeat)}},currentTime:function(a){},duration:function(a){},gui:function(a){},noSolution:function(a){},option:function(c,d){var e=c;if(arguments.length===0){return a.extend(true,{},this.options)}if(typeof c==="string"){var f=c.split(".");if(d===b){var g=a.extend(true,{},this.options);for(var h=0;h0){this._html_load()}else{clearTimeout(this.internal.htmlDlyCmdId)}this.htmlElement.media.pause();if(!isNaN(a)){try{this.htmlElement.media.currentTime=a}catch(c){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}}if(a>0){this._html_checkWaitForPlay()}},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0){this.htmlElement.media.currentTime=a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100}else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration)){this.htmlElement.media.currentTime=a*this.htmlElement.media.duration/100}else{throw"e"}}catch(c){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}if(!this.status.waitForLoad){this._html_checkWaitForPlay()}},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;if(this.css.jq.videoPlay.length){this.css.jq.videoPlay.hide()}if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},_html_volume:function(a){if(this.html.audio.available){this.htmlElement.audio.volume=a}if(this.html.video.available){this.htmlElement.video.volume=a}},_html_mute:function(a){if(this.html.audio.available){this.htmlElement.audio.muted=a}if(this.html.video.available){this.htmlElement.video.muted=a}},_flash_setAudio:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4a":case"fla":c._getMovie().fl_setAudio_m4a(b[d]);break;case"mp3":c._getMovie().fl_setAudio_mp3(b[d]);break;case"rtmpa":c._getMovie().fl_setAudio_rtmp(b[d]);break}c.status.src=b[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_setVideo:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4v":case"flv":c._getMovie().fl_setVideo_m4v(b[d]);break;case"rtmpv":c._getMovie().fl_setVideo_rtmp(b[d]);break}c.status.src=b[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});this._flash_pause(NaN)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=false},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=false;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}if(!this.status.waitForLoad){this._flash_checkWaitForPlay()}},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;if(this.css.jq.videoPlay.length){this.css.jq.videoPlay.hide()}if(this.status.video){this.internal.poster.jq.hide();this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(a){var b=false;var c;if(window.ActiveXObject){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a);b=true}catch(d){}}else if(navigator.plugins&&navigator.mimeTypes.length>0){c=navigator.plugins["Shockwave Flash"];if(c){var e=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1");if(e>=a){b=true}}}return b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,c){return ac?c:a},_urlNotSetError:function(b){this._error({type:a.jPlayer.error.URL_NOT_SET,context:b,message:a.jPlayer.errorMsg.URL_NOT_SET,hint:a.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(b){var c;if(!this.internal.ready){c="FLASH"}else{c="FLASH_DISABLED"}this._error({type:a.jPlayer.error[c],context:this.internal.flash.swf,message:a.jPlayer.errorMsg[c]+b.message,hint:a.jPlayer.errorHint[c]});this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(b){this._trigger(a.jPlayer.event.error,b);if(this.options.errorAlerts){this._alert("Error!"+(b.message?"\n\n"+b.message:"")+(b.hint?"\n\n"+b.hint:"")+"\n\nContext: "+b.context)}},_warning:function(c){this._trigger(a.jPlayer.event.warning,b,c);if(this.options.warningAlerts){this._alert("Warning!"+(c.message?"\n\n"+c.message:"")+(c.hint?"\n\n"+c.hint:"")+"\n\nContext: "+c.context)}},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)},_emulateHtmlBridge:function(){var b=this,c=a.jPlayer.emulateMethods;a.each(a.jPlayer.emulateMethods.split(/\s+/g),function(a,c){b.internal.domNode[c]=function(a){b[c](a)}});a.each(a.jPlayer.event,function(c,d){var e=true;a.each(a.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c){e=false;return false}});if(e){b.element.bind(d+".jPlayer.jPlayerHtml",function(){b._emulateHtmlUpdate();var a=document.createEvent("Event");a.initEvent(c,false,true);b.internal.domNode.dispatchEvent(a)})}})},_emulateHtmlUpdate:function(){var b=this;a.each(a.jPlayer.emulateStatus.split(/\s+/g),function(a,c){b.internal.domNode[c]=b.status[c]});a.each(a.jPlayer.emulateOptions.split(/\s+/g),function(a,c){b.internal.domNode[c]=b.options[c]})},_destroyHtmlBridge:function(){var b=this;this.element.unbind(".jPlayerHtml");var c=a.jPlayer.emulateMethods+" "+a.jPlayer.emulateStatus+" "+a.jPlayer.emulateOptions;a.each(c.split(/\s+/g),function(a,c){delete b.internal.domNode[c]})}};a.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};a.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+a.jPlayer.prototype.version.script+" needs Jplayer.swf version "+a.jPlayer.prototype.version.needFlash+" but found "};a.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};a.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};a.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};a.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery);
(function($,undefined){jPlayerPlaylist=function(cssSelector,playlist,options){var self=this;this.current=0;this.loop=false;this.shuffled=false;this.removing=false;this.cssSelector=$.extend({},this._cssSelector,cssSelector);this.options=$.extend(true,{},this._options,options);this.playlist=[];this.original=[];this._initPlaylist(playlist);this.cssSelector.title=this.cssSelector.cssSelectorAncestor+" .jp-title";this.cssSelector.playlist=this.cssSelector.cssSelectorAncestor+" .jp-playlist";this.cssSelector.next=this.cssSelector.cssSelectorAncestor+" .jp-next";this.cssSelector.previous=this.cssSelector.cssSelectorAncestor+" .jp-previous";this.cssSelector.shuffle=this.cssSelector.cssSelectorAncestor+" .jp-shuffle";this.cssSelector.shuffleOff=this.cssSelector.cssSelectorAncestor+" .jp-shuffle-off";this.options.cssSelectorAncestor=this.cssSelector.cssSelectorAncestor;this.options.repeat=function(event){self.loop=event.jPlayer.options.loop};$(this.cssSelector.jPlayer).bind($.jPlayer.event.ready,function(event){self._init()});$(this.cssSelector.jPlayer).bind($.jPlayer.event.ended,function(event){self.next()});$(this.cssSelector.jPlayer).bind($.jPlayer.event.play,function(event){$(this).jPlayer("pauseOthers")});$(this.cssSelector.jPlayer).bind($.jPlayer.event.resize,function(event){if(event.jPlayer.options.fullScreen){$(self.cssSelector.title).show()}else{$(self.cssSelector.title).hide()}});$(this.cssSelector.previous).click(function(){self.previous();$(this).blur();return false});$(this.cssSelector.next).click(function(){self.next();$(this).blur();return false});$(this.cssSelector.shuffle).click(function(){self.shuffle(true);return false});$(this.cssSelector.shuffleOff).click(function(){self.shuffle(false);return false}).hide();if(!this.options.fullScreen){$(this.cssSelector.title).hide()}$(this.cssSelector.playlist+" ol").empty();this._createItemHandlers();$(this.cssSelector.jPlayer).jPlayer(this.options)};jPlayerPlaylist.prototype={_cssSelector:{jPlayer:"#jquery_jplayer_1",cssSelectorAncestor:"#jp_container_1"},_options:{playlistOptions:{autoPlay:false,loopOnPrevious:false,shuffleOnLoop:true,enableRemoveControls:false,displayTime:'slow',addTime:'fast',removeTime:'fast',shuffleTime:'slow',itemClass:"jp-playlist-item",freeGroupClass:"jp-free-media",freeItemClass:"jp-playlist-item-free",removeItemClass:"jp-playlist-item-remove"}},option:function(option,value){if(value===undefined){return this.options.playlistOptions[option]}this.options.playlistOptions[option]=value;switch(option){case"enableRemoveControls":this._updateControls();break;case"itemClass":case"freeGroupClass":case"freeItemClass":case"removeItemClass":this._refresh(true);this._createItemHandlers();break}return this},_init:function(){var self=this;this._refresh(function(){if(self.options.playlistOptions.autoPlay){self.play(self.current)}else{self.select(self.current)}$(".jp-current-title").html(self.playlist[self.current].title);$(".jp-current-artist").html("By "+self.playlist[self.current].artist+"");$(".jp-current-rating").html("");$(".jp-current-cover img").attr("src",(self.playlist[self.current].cover))})},_initPlaylist:function(playlist){this.current=0;this.shuffled=false;this.removing=false;this.original=$.extend(true,[],playlist);this._originalPlaylist()},_originalPlaylist:function(){var self=this;this.playlist=[];$.each(this.original,function(i,v){self.playlist[i]=self.original[i]})},_refresh:function(instant){var self=this;if(instant&&!$.isFunction(instant)){$(this.cssSelector.playlist+" ol").empty();$.each(this.playlist,function(i,v){$(self.cssSelector.playlist+" ol").append(self._createListItem(self.playlist[i]))});this._updateControls()}else{var displayTime=$(this.cssSelector.playlist+" ol").children().length?this.options.playlistOptions.displayTime:0;$(this.cssSelector.playlist+" ol").slideUp(displayTime,function(){var $this=$(this);$(this).empty();$.each(self.playlist,function(i,v){$this.append(self._createListItem(self.playlist[i]))});self._updateControls();if($.isFunction(instant)){instant()}if(self.playlist.length){$(this).slideDown(self.options.playlistOptions.displayTime)}else{$(this).show()}})}},_createListItem:function(media){var self=this;var listItem="
");a.controlsContainer?(d(a.controlsContainer).append(b),a.directionNav=d("."+e+"direction-nav li a",a.controlsContainer)):(a.append(b),a.directionNav=d("."+e+"direction-nav li a",a));f.directionNav.update();a.directionNav.bind(t,function(b){b.preventDefault();b=d(this).hasClass(e+"next")?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(b,c.pauseOnAction)});
p&&a.directionNav.bind("click touchstart",function(a){a.preventDefault()})},update:function(){var b=e+"disabled";1===a.pagingCount?a.directionNav.addClass(b):c.animationLoop?a.directionNav.removeClass(b):0===a.animatingTo?a.directionNav.removeClass(b).filter("."+e+"prev").addClass(b):a.animatingTo===a.last?a.directionNav.removeClass(b).filter("."+e+"next").addClass(b):a.directionNav.removeClass(b)}},pausePlay:{setup:function(){var b=d('
');a.controlsContainer?
(a.controlsContainer.append(b),a.pausePlay=d("."+e+"pauseplay a",a.controlsContainer)):(a.append(b),a.pausePlay=d("."+e+"pauseplay a",a));f.pausePlay.update(c.slideshow?e+"pause":e+"play");a.pausePlay.bind(t,function(b){b.preventDefault();d(this).hasClass(e+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())});p&&a.pausePlay.bind("click touchstart",function(a){a.preventDefault()})},update:function(b){"play"===b?a.pausePlay.removeClass(e+"pause").addClass(e+
"play").text(c.playText):a.pausePlay.removeClass(e+"play").addClass(e+"pause").text(c.pauseText)}},touch:function(){function b(b){j=l?d-b.touches[0].pageY:d-b.touches[0].pageX;p=l?Math.abs(j)j||a.currentSlide===a.last&&0Number(new Date)-k&&50q/2)?a.flexAnimate(l,c.pauseOnAction):r||a.flexAnimate(a.currentSlide,c.pauseOnAction,!0)}i.removeEventListener("touchend",g,!1);f=j=e=d=null}var d,e,f,q,j,k,p=!1;i.addEventListener("touchstart",function(j){a.animating?j.preventDefault():1===j.touches.length&&(a.pause(),q=l?a.h:a.w,k=Number(new Date),f=h&&m&&a.animatingTo===
a.last?0:h&&m?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+c.itemMargin)*a.move*a.currentSlide:m?(a.last-a.currentSlide+a.cloneOffset)*q:(a.currentSlide+a.cloneOffset)*q,d=l?j.touches[0].pageY:j.touches[0].pageX,e=l?j.touches[0].pageX:j.touches[0].pageY,i.addEventListener("touchmove",b,!1),i.addEventListener("touchend",g,!1))},!1)},resize:function(){!a.animating&&a.is(":visible")&&(h||a.doMath(),r?f.smoothHeight():h?(a.slides.width(a.computedW),
a.update(a.pagingCount),a.setProps()):l?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(c.smoothHeight&&f.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(b){if(!l||r){var c=r?a:a.viewport;b?c.animate({height:a.slides.eq(a.animatingTo).height()},b):c.height(a.slides.eq(a.animatingTo).height())}},sync:function(b){var g=d(c.sync).data("flexslider"),e=a.animatingTo;switch(b){case "animate":g.flexAnimate(e,c.pauseOnAction,!1,!0);break;case "play":!g.playing&&
!g.asNav&&g.play();break;case "pause":g.pause()}}};a.flexAnimate=function(b,g,n,i,k){s&&1===a.pagingCount&&(a.direction=a.currentItema.w?2*c.itemMargin:c.itemMargin,b=(a.itemW+b)*a.move*a.animatingTo,b=b>a.limit&&1!==a.visible?a.limit:b):b=0===a.currentSlide&&b===a.count-1&&c.animationLoop&&"next"!==a.direction?m?(a.count+a.cloneOffset)*
q:0:a.currentSlide===a.last&&0===b&&c.animationLoop&&"prev"!==a.direction?m?0:(a.count+1)*q:m?(a.count-1-b+a.cloneOffset)*q:(b+a.cloneOffset)*q;a.setProps(b,"",c.animationSpeed);if(a.transitions){if(!c.animationLoop||!a.atEnd)a.animating=!1,a.currentSlide=a.animatingTo;a.container.unbind("webkitTransitionEnd transitionend");a.container.bind("webkitTransitionEnd transitionend",function(){a.wrapup(q)})}else a.container.animate(a.args,c.animationSpeed,c.easing,function(){a.wrapup(q)})}c.smoothHeight&&
f.smoothHeight(c.animationSpeed)}};a.wrapup=function(b){!r&&!h&&(0===a.currentSlide&&a.animatingTo===a.last&&c.animationLoop?a.setProps(b,"jumpEnd"):a.currentSlide===a.last&&(0===a.animatingTo&&c.animationLoop)&&a.setProps(b,"jumpStart"));a.animating=!1;a.currentSlide=a.animatingTo;c.after(a)};a.animateSlides=function(){a.animating||a.flexAnimate(a.getTarget("next"))};a.pause=function(){clearInterval(a.animatedSlides);a.playing=!1;c.pausePlay&&f.pausePlay.update("play");a.syncExists&&f.sync("pause")};
a.play=function(){a.animatedSlides=setInterval(a.animateSlides,c.slideshowSpeed);a.playing=!0;c.pausePlay&&f.pausePlay.update("pause");a.syncExists&&f.sync("play")};a.canAdvance=function(b,g){var d=s?a.pagingCount-1:a.last;return g?!0:s&&a.currentItem===a.count-1&&0===b&&"prev"===a.direction?!0:s&&0===a.currentItem&&b===a.pagingCount-1&&"next"!==a.direction?!1:b===a.currentSlide&&!s?!1:c.animationLoop?!0:a.atEnd&&0===a.currentSlide&&b===d&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===d&&0===
b&&"next"===a.direction?!1:!0};a.getTarget=function(b){a.direction=b;return"next"===b?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1};a.setProps=function(b,g,d){var e,f=b?b:(a.itemW+c.itemMargin)*a.move*a.animatingTo;e=-1*function(){if(h)return"setTouch"===g?b:m&&a.animatingTo===a.last?0:m?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:f;switch(g){case "setTotal":return m?(a.count-1-a.currentSlide+a.cloneOffset)*b:(a.currentSlide+
a.cloneOffset)*b;case "setTouch":return b;case "jumpEnd":return m?b:a.count*b;case "jumpStart":return m?a.count*b:b;default:return b}}()+"px";a.transitions&&(e=l?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",d=void 0!==d?d/1E3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",d));a.args[a.prop]=e;(a.transitions||void 0===d)&&a.container.css(a.args)};a.setup=function(b){if(r)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(p?a.slides.css({opacity:0,
display:"block",webkitTransition:"opacity "+c.animationSpeed/1E3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):a.slides.eq(a.currentSlide).fadeIn(c.animationSpeed,c.easing)),c.smoothHeight&&f.smoothHeight();else{var g,n;"init"===b&&(a.viewport=d('').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,m&&(n=d.makeArray(a.slides).reverse(),a.slides=d(n),a.container.empty().append(a.slides)));
c.animationLoop&&!h&&(a.cloneCount=2,a.cloneOffset=1,"init"!==b&&a.container.find(".clone").remove(),a.container.append(a.slides.first().clone().addClass("clone")).prepend(a.slides.last().clone().addClass("clone")));a.newSlides=d(c.selector,a);g=m?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset;l&&!h?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"});a.doMath();a.viewport.height(a.h);
a.setProps(g*a.h,"init")},"init"===b?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(g*a.computedW,"init"),setTimeout(function(){a.doMath();a.newSlides.css({width:a.computedW,"float":"left",display:"block"});c.smoothHeight&&f.smoothHeight()},"init"===b?100:0))}h||a.slides.removeClass(e+"active-slide").eq(a.currentSlide).addClass(e+"active-slide")};a.doMath=function(){var b=a.slides.first(),d=c.itemMargin,e=c.minItems,f=c.maxItems;a.w=a.width();a.h=b.height();a.boxPadding=b.outerWidth()-
b.width();h?(a.itemT=c.itemWidth+d,a.minW=e?e*a.itemT:a.w,a.maxW=f?f*a.itemT:a.w,a.itemW=a.minW>a.w?(a.w-d*e)/e:a.maxWa.w?a.w:c.itemWidth,a.visible=Math.floor(a.w/(a.itemW+d)),a.move=0a.w?(a.itemW+2*d)*a.count-a.w-d:(a.itemW+d)*a.count-a.w-d):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1);a.computedW=a.itemW-
a.boxPadding};a.update=function(b,d){a.doMath();h||(ba.controlNav.length)f.controlNav.update("add");else if("remove"===d&&!h||a.pagingCounta.last&&(a.currentSlide-=1,a.animatingTo-=1),f.controlNav.update("remove",a.last);c.directionNav&&f.directionNav.update()};a.addSlide=function(b,e){var f=
d(b);a.count+=1;a.last=a.count-1;l&&m?void 0!==e?a.slides.eq(a.count-e).after(f):a.container.prepend(f):void 0!==e?a.slides.eq(e).before(f):a.container.append(f);a.update(e,"add");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.added(a)};a.removeSlide=function(b){var e=isNaN(b)?a.slides.index(d(b)):b;a.count-=1;a.last=a.count-1;isNaN(b)?d(b,a.slides).remove():l&&m?a.slides.eq(a.last).remove():a.slides.eq(b).remove();a.doMath();a.update(e,"remove");a.slides=d(c.selector+":not(.clone)",a);a.setup();
c.removed(a)};f.init()};d.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7E3,animationSpeed:600,initDelay:0,randomize:!1,pauseOnAction:!0,pauseOnHover:!1,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",
manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};d.fn.flexslider=function(i){void 0===i&&(i={});if("object"===typeof i)return this.each(function(){var a=d(this),c=a.find(i.selector?i.selector:".slides > li");1===c.length?(c.fadeIn(400),i.start&&i.start(a)):void 0===a.data("flexslider")&&new d.flexslider(this,i)});var k=d(this).data("flexslider");
switch(i){case "play":k.play();break;case "pause":k.pause();break;case "next":k.flexAnimate(k.getTarget("next"),!0);break;case "prev":case "previous":k.flexAnimate(k.getTarget("prev"),!0);break;default:"number"===typeof i&&k.flexAnimate(i,!0)}}})(jQuery);;
(function ($) {
/**
* A progressbar object. Initialized with the given id. Must be inserted into
* the DOM afterwards through progressBar.element.
*
* method is the function which will perform the HTTP request to get the
* progress bar state. Either "GET" or "POST".
*
* e.g. pb = new progressBar('myProgressBar');
* some_element.appendChild(pb.element);
*/
Drupal.progressBar = function (id, updateCallback, method, errorCallback) {
var pb = this;
this.id = id;
this.method = method || 'GET';
this.updateCallback = updateCallback;
this.errorCallback = errorCallback;
// The WAI-ARIA setting aria-live="polite" will announce changes after users
// have completed their current activity and not interrupt the screen reader.
this.element = $('').attr('id', id);
this.element.html('
' +
'' +
'
');
};
/**
* Set the percentage and status message for the progressbar.
*/
Drupal.progressBar.prototype.setProgress = function (percentage, message) {
if (percentage >= 0 && percentage <= 100) {
$('div.filled', this.element).css('width', percentage + '%');
$('div.percentage', this.element).html(percentage + '%');
}
$('div.message', this.element).html(message);
if (this.updateCallback) {
this.updateCallback(percentage, message, this);
}
};
/**
* Start monitoring progress via Ajax.
*/
Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
this.delay = delay;
this.uri = uri;
this.sendPing();
};
/**
* Stop monitoring progress via Ajax.
*/
Drupal.progressBar.prototype.stopMonitoring = function () {
clearTimeout(this.timer);
// This allows monitoring to be stopped from within the callback.
this.uri = null;
};
/**
* Request progress data from server.
*/
Drupal.progressBar.prototype.sendPing = function () {
if (this.timer) {
clearTimeout(this.timer);
}
if (this.uri) {
var pb = this;
// When doing a post request, you need non-null data. Otherwise a
// HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
$.ajax({
type: this.method,
url: this.uri,
data: '',
dataType: 'json',
success: function (progress) {
// Display errors.
if (progress.status == 0) {
pb.displayError(progress.data);
return;
}
// Update display.
pb.setProgress(progress.percentage, progress.message);
// Schedule next timer.
pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay);
},
error: function (xmlhttp) {
pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri));
}
});
}
};
/**
* Display errors on the page.
*/
Drupal.progressBar.prototype.displayError = function (string) {
var error = $('').html(string);
$(this.element).before(error).hide();
if (this.errorCallback) {
this.errorCallback(this);
}
};
})(jQuery);
;
/**
* @file
*
* Implement a modal form.
*
* @see modal.inc for documentation.
*
* This javascript relies on the CTools ajax responder.
*/
(function ($) {
// Make sure our objects are defined.
Drupal.CTools = Drupal.CTools || {};
Drupal.CTools.Modal = Drupal.CTools.Modal || {};
/**
* Display the modal
*
* @todo -- document the settings.
*/
Drupal.CTools.Modal.show = function(choice) {
var opts = {};
if (choice && typeof choice == 'string' && Drupal.settings[choice]) {
// This notation guarantees we are actually copying it.
$.extend(true, opts, Drupal.settings[choice]);
}
else if (choice) {
$.extend(true, opts, choice);
}
var defaults = {
modalTheme: 'CToolsModalDialog',
throbberTheme: 'CToolsModalThrobber',
animation: 'show',
animationSpeed: 'fast',
modalSize: {
type: 'scale',
width: .8,
height: .8,
addWidth: 0,
addHeight: 0,
// How much to remove from the inner content to make space for the
// theming.
contentRight: 25,
contentBottom: 45
},
modalOptions: {
opacity: .55,
background: '#fff'
}
};
var settings = {};
$.extend(true, settings, defaults, Drupal.settings.CToolsModal, opts);
if (Drupal.CTools.Modal.currentSettings && Drupal.CTools.Modal.currentSettings != settings) {
Drupal.CTools.Modal.modal.remove();
Drupal.CTools.Modal.modal = null;
}
Drupal.CTools.Modal.currentSettings = settings;
var resize = function(e) {
// When creating the modal, it actually exists only in a theoretical
// place that is not in the DOM. But once the modal exists, it is in the
// DOM so the context must be set appropriately.
var context = e ? document : Drupal.CTools.Modal.modal;
if (Drupal.CTools.Modal.currentSettings.modalSize.type == 'scale') {
var width = $(window).width() * Drupal.CTools.Modal.currentSettings.modalSize.width;
var height = $(window).height() * Drupal.CTools.Modal.currentSettings.modalSize.height;
}
else {
var width = Drupal.CTools.Modal.currentSettings.modalSize.width;
var height = Drupal.CTools.Modal.currentSettings.modalSize.height;
}
// Use the additionol pixels for creating the width and height.
$('div.ctools-modal-content', context).css({
'width': width + Drupal.CTools.Modal.currentSettings.modalSize.addWidth + 'px',
'height': height + Drupal.CTools.Modal.currentSettings.modalSize.addHeight + 'px'
});
$('div.ctools-modal-content .modal-content', context).css({
'width': (width - Drupal.CTools.Modal.currentSettings.modalSize.contentRight) + 'px',
'height': (height - Drupal.CTools.Modal.currentSettings.modalSize.contentBottom) + 'px'
});
}
if (!Drupal.CTools.Modal.modal) {
Drupal.CTools.Modal.modal = $(Drupal.theme(settings.modalTheme));
if (settings.modalSize.type == 'scale') {
$(window).bind('resize', resize);
}
}
resize();
$('span.modal-title', Drupal.CTools.Modal.modal).html(Drupal.CTools.Modal.currentSettings.loadingText);
Drupal.CTools.Modal.modalContent(Drupal.CTools.Modal.modal, settings.modalOptions, settings.animation, settings.animationSpeed);
$('#modalContent .modal-content').html(Drupal.theme(settings.throbberTheme));
// Position autocomplete results based on the scroll position of the modal.
$('#modalContent .modal-content').delegate('input.form-autocomplete', 'keyup', function() {
$('#autocomplete').css('top', $(this).position().top + $(this).outerHeight() + $(this).offsetParent().filter('#modal-content').scrollTop());
});
};
/**
* Hide the modal
*/
Drupal.CTools.Modal.dismiss = function() {
if (Drupal.CTools.Modal.modal) {
Drupal.CTools.Modal.unmodalContent(Drupal.CTools.Modal.modal);
}
};
/**
* Provide the HTML to create the modal dialog.
*/
Drupal.theme.prototype.CToolsModalDialog = function () {
var html = ''
html += '
';
return html;
}
/**
* Provide the HTML to create the throbber.
*/
Drupal.theme.prototype.CToolsModalThrobber = function () {
var html = '';
html += '
';
html += '
';
html += Drupal.CTools.Modal.currentSettings.throbber;
html += '
';
html += '
';
return html;
};
/**
* Figure out what settings string to use to display a modal.
*/
Drupal.CTools.Modal.getSettings = function (object) {
var match = $(object).attr('class').match(/ctools-modal-(\S+)/);
if (match) {
return match[1];
}
}
/**
* Click function for modals that can be cached.
*/
Drupal.CTools.Modal.clickAjaxCacheLink = function () {
Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(this));
return Drupal.CTools.AJAX.clickAJAXCacheLink.apply(this);
};
/**
* Handler to prepare the modal for the response
*/
Drupal.CTools.Modal.clickAjaxLink = function () {
Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(this));
return false;
};
/**
* Submit responder to do an AJAX submit on all modal forms.
*/
Drupal.CTools.Modal.submitAjaxForm = function(e) {
var $form = $(this);
var url = $form.attr('action');
setTimeout(function() { Drupal.CTools.AJAX.ajaxSubmit($form, url); }, 1);
return false;
}
/**
* Bind links that will open modals to the appropriate function.
*/
Drupal.behaviors.ZZCToolsModal = {
attach: function(context) {
// Bind links
// Note that doing so in this order means that the two classes can be
// used together safely.
/*
* @todo remimplement the warm caching feature
$('a.ctools-use-modal-cache', context).once('ctools-use-modal', function() {
$(this).click(Drupal.CTools.Modal.clickAjaxCacheLink);
Drupal.CTools.AJAX.warmCache.apply(this);
});
*/
$('area.ctools-use-modal, a.ctools-use-modal', context).once('ctools-use-modal', function() {
var $this = $(this);
$this.click(Drupal.CTools.Modal.clickAjaxLink);
// Create a drupal ajax object
var element_settings = {};
if ($this.attr('href')) {
element_settings.url = $this.attr('href');
element_settings.event = 'click';
element_settings.progress = { type: 'throbber' };
}
var base = $this.attr('href');
Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
});
// Bind buttons
$('input.ctools-use-modal, button.ctools-use-modal', context).once('ctools-use-modal', function() {
var $this = $(this);
$this.click(Drupal.CTools.Modal.clickAjaxLink);
var button = this;
var element_settings = {};
// AJAX submits specified in this manner automatically submit to the
// normal form action.
element_settings.url = Drupal.CTools.Modal.findURL(this);
if (element_settings.url == '') {
element_settings.url = $(this).closest('form').attr('action');
}
element_settings.event = 'click';
element_settings.setClick = true;
var base = $this.attr('id');
Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
// Make sure changes to settings are reflected in the URL.
$('.' + $(button).attr('id') + '-url').change(function() {
Drupal.ajax[base].options.url = Drupal.CTools.Modal.findURL(button);
});
});
// Bind our custom event to the form submit
$('#modal-content form', context).once('ctools-use-modal', function() {
var $this = $(this);
var element_settings = {};
element_settings.url = $this.attr('action');
element_settings.event = 'submit';
element_settings.progress = { 'type': 'throbber' }
var base = $this.attr('id');
Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
Drupal.ajax[base].form = $this;
$('input[type=submit], button', this).click(function(event) {
Drupal.ajax[base].element = this;
this.form.clk = this;
// An empty event means we were triggered via .click() and
// in jquery 1.4 this won't trigger a submit.
if (event.bubbles == undefined) {
$(this.form).trigger('submit');
return false;
}
});
});
// Bind a click handler to allow elements with the 'ctools-close-modal'
// class to close the modal.
$('.ctools-close-modal', context).once('ctools-close-modal')
.click(function() {
Drupal.CTools.Modal.dismiss();
return false;
});
}
};
// The following are implementations of AJAX responder commands.
/**
* AJAX responder command to place HTML within the modal.
*/
Drupal.CTools.Modal.modal_display = function(ajax, response, status) {
if ($('#modalContent').length == 0) {
Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(ajax.element));
}
$('#modal-title').html(response.title);
// Simulate an actual page load by scrolling to the top after adding the
// content. This is helpful for allowing users to see error messages at the
// top of a form, etc.
$('#modal-content').html(response.output).scrollTop(0);
// Attach behaviors within a modal dialog.
var settings = response.settings || ajax.settings || Drupal.settings;
Drupal.attachBehaviors('#modalContent', settings);
}
/**
* AJAX responder command to dismiss the modal.
*/
Drupal.CTools.Modal.modal_dismiss = function(command) {
Drupal.CTools.Modal.dismiss();
$('link.ctools-temporary-css').remove();
}
/**
* Display loading
*/
//Drupal.CTools.AJAX.commands.modal_loading = function(command) {
Drupal.CTools.Modal.modal_loading = function(command) {
Drupal.CTools.Modal.modal_display({
output: Drupal.theme(Drupal.CTools.Modal.currentSettings.throbberTheme),
title: Drupal.CTools.Modal.currentSettings.loadingText
});
}
/**
* Find a URL for an AJAX button.
*
* The URL for this gadget will be composed of the values of items by
* taking the ID of this item and adding -url and looking for that
* class. They need to be in the form in order since we will
* concat them all together using '/'.
*/
Drupal.CTools.Modal.findURL = function(item) {
var url = '';
var url_class = '.' + $(item).attr('id') + '-url';
$(url_class).each(
function() {
var $this = $(this);
if (url && $this.val()) {
url += '/';
}
url += $this.val();
});
return url;
};
/**
* modalContent
* @param content string to display in the content box
* @param css obj of css attributes
* @param animation (fadeIn, slideDown, show)
* @param speed (valid animation speeds slow, medium, fast or # in ms)
*/
Drupal.CTools.Modal.modalContent = function(content, css, animation, speed) {
// If our animation isn't set, make it just show/pop
if (!animation) {
animation = 'show';
}
else {
// If our animation isn't "fadeIn" or "slideDown" then it always is show
if (animation != 'fadeIn' && animation != 'slideDown') {
animation = 'show';
}
}
if (!speed) {
speed = 'fast';
}
// Build our base attributes and allow them to be overriden
css = jQuery.extend({
position: 'absolute',
left: '0px',
margin: '0px',
background: '#000',
opacity: '.55'
}, css);
// Add opacity handling for IE.
css.filter = 'alpha(opacity=' + (100 * css.opacity) + ')';
content.hide();
// if we already ahve a modalContent, remove it
if ( $('#modalBackdrop')) $('#modalBackdrop').remove();
if ( $('#modalContent')) $('#modalContent').remove();
// position code lifted from http://www.quirksmode.org/viewport/compatibility.html
if (self.pageYOffset) { // all except Explorer
var wt = self.pageYOffset;
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
var wt = document.documentElement.scrollTop;
} else if (document.body) { // all other Explorers
var wt = document.body.scrollTop;
}
// Get our dimensions
// Get the docHeight and (ugly hack) add 50 pixels to make sure we dont have a *visible* border below our div
var docHeight = $(document).height() + 50;
var docWidth = $(document).width();
var winHeight = $(window).height();
var winWidth = $(window).width();
if( docHeight < winHeight ) docHeight = winHeight;
// Create our divs
$('body').append('
' + $(content).html() + '
');
// Keyboard and focus event handler ensures focus stays on modal elements only
modalEventHandler = function( event ) {
target = null;
if ( event ) { //Mozilla
target = event.target;
} else { //IE
event = window.event;
target = event.srcElement;
}
var parents = $(target).parents().get();
for (var i = 0; i < parents.length; ++i) {
var position = $(parents[i]).css('position');
if (position == 'absolute' || position == 'fixed') {
return true;
}
}
if( $(target).filter('*:visible').parents('#modalContent').size()) {
// allow the event only if target is a visible child node of #modalContent
return true;
}
if ( $('#modalContent')) $('#modalContent').get(0).focus();
return false;
};
$('body').bind( 'focus', modalEventHandler );
$('body').bind( 'keypress', modalEventHandler );
// Create our content div, get the dimensions, and hide it
var modalContent = $('#modalContent').css('top','-1000px');
var mdcTop = wt + ( winHeight / 2 ) - ( modalContent.outerHeight() / 2);
var mdcLeft = ( winWidth / 2 ) - ( modalContent.outerWidth() / 2);
$('#modalBackdrop').css(css).css('top', 0).css('height', docHeight + 'px').css('width', docWidth + 'px').show();
modalContent.css({top: mdcTop + 'px', left: mdcLeft + 'px'}).hide()[animation](speed);
// Bind a click for closing the modalContent
modalContentClose = function(){close(); return false;};
$('.close').bind('click', modalContentClose);
// Bind a keypress on escape for closing the modalContent
modalEventEscapeCloseHandler = function(event) {
if (event.keyCode == 27) {
close();
return false;
}
};
$(document).bind('keydown', modalEventEscapeCloseHandler);
// Close the open modal content and backdrop
function close() {
// Unbind the events
$(window).unbind('resize', modalContentResize);
$('body').unbind( 'focus', modalEventHandler);
$('body').unbind( 'keypress', modalEventHandler );
$('.close').unbind('click', modalContentClose);
$('body').unbind('keypress', modalEventEscapeCloseHandler);
$(document).trigger('CToolsDetachBehaviors', $('#modalContent'));
// Set our animation parameters and use them
if ( animation == 'fadeIn' ) animation = 'fadeOut';
if ( animation == 'slideDown' ) animation = 'slideUp';
if ( animation == 'show' ) animation = 'hide';
// Close the content
modalContent.hide()[animation](speed);
// Remove the content
$('#modalContent').remove();
$('#modalBackdrop').remove();
};
// Move and resize the modalBackdrop and modalContent on resize of the window
modalContentResize = function(){
// Get our heights
var docHeight = $(document).height();
var docWidth = $(document).width();
var winHeight = $(window).height();
var winWidth = $(window).width();
if( docHeight < winHeight ) docHeight = winHeight;
// Get where we should move content to
var modalContent = $('#modalContent');
var mdcTop = ( winHeight / 2 ) - ( modalContent.outerHeight() / 2);
var mdcLeft = ( winWidth / 2 ) - ( modalContent.outerWidth() / 2);
// Apply the changes
$('#modalBackdrop').css('height', docHeight + 'px').css('width', docWidth + 'px').show();
modalContent.css('top', mdcTop + 'px').css('left', mdcLeft + 'px').show();
};
$(window).bind('resize', modalContentResize);
$('#modalContent').focus();
};
/**
* unmodalContent
* @param content (The jQuery object to remove)
* @param animation (fadeOut, slideUp, show)
* @param speed (valid animation speeds slow, medium, fast or # in ms)
*/
Drupal.CTools.Modal.unmodalContent = function(content, animation, speed)
{
// If our animation isn't set, make it just show/pop
if (!animation) { var animation = 'show'; } else {
// If our animation isn't "fade" then it always is show
if (( animation != 'fadeOut' ) && ( animation != 'slideUp')) animation = 'show';
}
// Set a speed if we dont have one
if ( !speed ) var speed = 'fast';
// Unbind the events we bound
$(window).unbind('resize', modalContentResize);
$('body').unbind('focus', modalEventHandler);
$('body').unbind('keypress', modalEventHandler);
$('.close').unbind('click', modalContentClose);
$(document).trigger('CToolsDetachBehaviors', $('#modalContent'));
// jQuery magic loop through the instances and run the animations or removal.
content.each(function(){
if ( animation == 'fade' ) {
$('#modalContent').fadeOut(speed, function() {
$('#modalBackdrop').fadeOut(speed, function() {
$(this).remove();
});
$(this).remove();
});
} else {
if ( animation == 'slide' ) {
$('#modalContent').slideUp(speed,function() {
$('#modalBackdrop').slideUp(speed, function() {
$(this).remove();
});
$(this).remove();
});
} else {
$('#modalContent').remove();
$('#modalBackdrop').remove();
}
}
});
};
$(function() {
Drupal.ajax.prototype.commands.modal_display = Drupal.CTools.Modal.modal_display;
Drupal.ajax.prototype.commands.modal_dismiss = Drupal.CTools.Modal.modal_dismiss;
});
})(jQuery);
;
/**
* Provide the HTML to create the modal dialog.
*/
Drupal.theme.prototype.WSMUserVotePopup = function () {
var html = '';
html += '
';
html += '
';
html += '
';
html += '
';
html += ' ';
html += ' ' + Drupal.CTools.Modal.currentSettings.closeText + '';
html += ' ';
html += '
';
html += '
';
html += '
';
html += '
';
html += '
';
return html;
}
;
(function ($) {
Drupal.behaviors.textarea = {
attach: function (context, settings) {
$('.form-textarea-wrapper.resizable', context).once('textarea', function () {
var staticOffset = null;
var textarea = $(this).addClass('resizable-textarea').find('textarea');
var grippie = $('').mousedown(startDrag);
grippie.insertAfter(textarea);
function startDrag(e) {
staticOffset = textarea.height() - e.pageY;
textarea.css('opacity', 0.25);
$(document).mousemove(performDrag).mouseup(endDrag);
return false;
}
function performDrag(e) {
textarea.height(Math.max(32, staticOffset + e.pageY) + 'px');
return false;
}
function endDrag(e) {
$(document).unbind('mousemove', performDrag).unbind('mouseup', endDrag);
textarea.css('opacity', 1);
}
});
}
};
})(jQuery);
;
}
/*
FILE ARCHIVED ON 10:50:56 Sep 15, 2014 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 03:35:32 Aug 22, 2022.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
/*
playback timings (ms):
captures_list: 214.638
exclusion.robots: 0.078
exclusion.robots.policy: 0.072
cdx.remote: 0.059
esindex: 0.007
LoadShardBlock: 188.226 (3)
PetaboxLoader3.datanode: 176.053 (4)
CDXLines.iter: 17.215 (3)
load_resource: 165.015
PetaboxLoader3.resolve: 118.094
*/