var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /*! jQuery ColorBox v1.4.2 - 2013-02-18 (c) 2013 Jack Moore - jacklmoore.com/colorbox license: http://www.opensource.org/licenses/mit-license.php */ (function(e,t,i){function o(i,o,n){var r=t.createElement(i);return o&&(r.id=Y+o),n&&(r.style.cssText=n),e(r)}function n(e){var t=T.length,i=(A+e)%t;return 0>i?t+i:i}function r(e,t){return Math.round((/%/.test(e)?("x"===t?k.width():k.height())/100:1)*parseInt(e,10))}function h(e){return K.photo||K.photoRegex.test(e)}function l(e){return K.retinaUrl&&i.devicePixelRatio>1?e.replace(K.photoRegex,K.retinaSuffix):e}function s(e){"contains"in w[0]&&!w[0].contains(e.target)&&(e.stopPropagation(),w.focus())}function a(){var t,i=e.data(N,V);null==i?(K=e.extend({},J),console&&console.log&&console.log("Error: cboxElement missing settings object")):K=e.extend({},i);for(t in K)e.isFunction(K[t])&&"on"!==t.slice(0,2)&&(K[t]=K[t].call(N));K.rel=K.rel||N.rel||e(N).data("rel")||"nofollow",K.href=K.href||e(N).attr("href"),K.title=K.title||N.title,"string"==typeof K.href&&(K.href=e.trim(K.href))}function d(i,o){e(t).trigger(i),at.trigger(i),e.isFunction(o)&&o.call(N)}function c(){var e,t,i,o,n,r=Y+"Slideshow_",h="click."+Y;K.slideshow&&T[1]?(t=function(){clearTimeout(e)},i=function(){(K.loop||T[A+1])&&(e=setTimeout(G.next,K.slideshowSpeed))},o=function(){M.html(K.slideshowStop).unbind(h).one(h,n),at.bind(it,i).bind(tt,t).bind(ot,n),w.removeClass(r+"off").addClass(r+"on")},n=function(){t(),at.unbind(it,i).unbind(tt,t).unbind(ot,n),M.html(K.slideshowStart).unbind(h).one(h,function(){G.next(),o()}),w.removeClass(r+"on").addClass(r+"off")},K.slideshowAuto?o():n()):w.removeClass(r+"off "+r+"on")}function u(i){U||(N=i,a(),T=e(N),A=0,"nofollow"!==K.rel&&(T=e("."+Z).filter(function(){var t,i=e.data(this,V);return i&&(t=e(this).data("rel")||i.rel||this.rel),t===K.rel}),A=T.index(N),-1===A&&(T=T.add(N),A=T.length-1)),m.css({opacity:parseFloat(K.opacity),cursor:K.overlayClose?"pointer":"auto",visibility:"visible"}).show(),j||(j=q=!0,w.css({visibility:"hidden",display:"block"}),E=o(dt,"LoadedContent","width:0; height:0; overflow:hidden").appendTo(v),_=x.height()+C.height()+v.outerHeight(!0)-v.height(),z=y.width()+b.width()+v.outerWidth(!0)-v.width(),D=E.outerHeight(!0),B=E.outerWidth(!0),K.w=r(K.initialWidth,"x"),K.h=r(K.initialHeight,"y"),G.position(),lt&&k.bind("resize."+st+" scroll."+st,function(){m.css({width:k.width(),height:k.height(),top:k.scrollTop(),left:k.scrollLeft()})}).trigger("resize."+st),c(),d(et,K.onOpen),P.add(W).hide(),R.html(K.close).show(),w.focus(),t.addEventListener&&(t.addEventListener("focus",s,!0),at.one(nt,function(){t.removeEventListener("focus",s,!0)})),K.returnFocus&&at.one(nt,function(){e(N).focus()})),G.load(!0))}function f(){!w&&t.body&&(X=!1,k=e(i),w=o(dt).attr({id:V,"class":ht?Y+(lt?"IE6":"IE"):"",role:"dialog",tabindex:"-1"}).hide(),m=o(dt,"Overlay",lt?"position:absolute":"").hide(),L=o(dt,"LoadingOverlay").add(o(dt,"LoadingGraphic")),g=o(dt,"Wrapper"),v=o(dt,"Content").append(W=o(dt,"Title"),H=o(dt,"Current"),F=o("button","Previous"),S=o("button","Next"),M=o("button","Slideshow"),L,R=o("button","Close")),g.append(o(dt).append(o(dt,"TopLeft"),x=o(dt,"TopCenter"),o(dt,"TopRight")),o(dt,!1,"clear:left").append(y=o(dt,"MiddleLeft"),v,b=o(dt,"MiddleRight")),o(dt,!1,"clear:left").append(o(dt,"BottomLeft"),C=o(dt,"BottomCenter"),o(dt,"BottomRight"))).find("div div").css({"float":"left"}),I=o(dt,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),P=S.add(F).add(H).add(M),e(t.body).append(m,w.append(g,I)))}function p(){function i(e){e.which>1||e.shiftKey||e.altKey||e.metaKey||(e.preventDefault(),u(this))}return w?(X||(X=!0,S.click(function(){G.next()}),F.click(function(){G.prev()}),R.click(function(){G.close()}),m.click(function(){K.overlayClose&&G.close()}),e(t).bind("keydown."+Y,function(e){var t=e.keyCode;j&&K.escKey&&27===t&&(e.preventDefault(),G.close()),j&&K.arrowKey&&T[1]&&!e.altKey&&(37===t?(e.preventDefault(),F.click()):39===t&&(e.preventDefault(),S.click()))}),e.isFunction(e.fn.on)?e(t).on("click."+Y,"."+Z,i):e("."+Z).live("click."+Y,i)),!0):!1}var m,w,g,v,x,y,b,C,T,k,E,I,L,W,H,M,S,F,R,P,K,_,z,D,B,N,A,O,j,q,U,$,G,Q,X,J={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,className:!1,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0},V="colorbox",Y="cbox",Z=Y+"Element",et=Y+"_open",tt=Y+"_load",it=Y+"_complete",ot=Y+"_cleanup",nt=Y+"_closed",rt=Y+"_purge",ht=!e.support.leadingWhitespace,lt=ht&&!i.XMLHttpRequest,st=Y+"_IE6",at=e({}),dt="div";e.colorbox||(e(f),G=e.fn[V]=e[V]=function(t,i){var o=this;if(t=t||{},f(),p()){if(e.isFunction(o))o=e(""),t.open=!0;else if(!o[0])return o;i&&(t.onComplete=i),o.each(function(){e.data(this,V,e.extend({},e.data(this,V)||J,t))}).addClass(Z),(e.isFunction(t.open)&&t.open.call(o)||t.open)&&u(o[0])}return o},G.position=function(e,t){function i(e){x[0].style.width=C[0].style.width=v[0].style.width=parseInt(e.style.width,10)-z+"px",v[0].style.height=y[0].style.height=b[0].style.height=parseInt(e.style.height,10)-_+"px"}var o,n,h,l=0,s=0,a=w.offset();k.unbind("resize."+Y),w.css({top:-9e4,left:-9e4}),n=k.scrollTop(),h=k.scrollLeft(),K.fixed&&!lt?(a.top-=n,a.left-=h,w.css({position:"fixed"})):(l=n,s=h,w.css({position:"absolute"})),s+=K.right!==!1?Math.max(k.width()-K.w-B-z-r(K.right,"x"),0):K.left!==!1?r(K.left,"x"):Math.round(Math.max(k.width()-K.w-B-z,0)/2),l+=K.bottom!==!1?Math.max(k.height()-K.h-D-_-r(K.bottom,"y"),0):K.top!==!1?r(K.top,"y"):Math.round(Math.max(k.height()-K.h-D-_,0)/2),w.css({top:a.top,left:a.left,visibility:"visible"}),e=w.width()===K.w+B&&w.height()===K.h+D?0:e||0,g[0].style.width=g[0].style.height="9999px",o={width:K.w+B+z,height:K.h+D+_,top:l,left:s},0===e&&w.css(o),w.dequeue().animate(o,{duration:e,complete:function(){i(this),q=!1,g[0].style.width=K.w+B+z+"px",g[0].style.height=K.h+D+_+"px",K.reposition&&setTimeout(function(){k.bind("resize."+Y,G.position)},1),t&&t()},step:function(){i(this)}})},G.resize=function(e){j&&(e=e||{},e.width&&(K.w=r(e.width,"x")-B-z),e.innerWidth&&(K.w=r(e.innerWidth,"x")),E.css({width:K.w}),e.height&&(K.h=r(e.height,"y")-D-_),e.innerHeight&&(K.h=r(e.innerHeight,"y")),e.innerHeight||e.height||(E.css({height:"auto"}),K.h=E.height()),E.css({height:K.h}),G.position("none"===K.transition?0:K.speed))},G.prep=function(t){function i(){return K.w=K.w||E.width(),K.w=K.mw&&K.mw1?("string"==typeof K.current&&H.html(K.current.replace("{current}",A+1).replace("{total}",l)).show(),S[K.loop||l-1>A?"show":"hide"]().html(K.next),F[K.loop||A?"show":"hide"]().html(K.previous),K.slideshow&&M.show(),K.preloading&&e.each([n(-1),n(1)],function(){var t,i,o=T[this],n=e.data(o,V);n&&n.href?(t=n.href,e.isFunction(t)&&(t=t.call(o))):t=e(o).attr("href"),t&&(h(t)||n.photo)&&(i=new Image,i.src=t)})):P.hide(),K.iframe?(i=o("iframe")[0],a in i&&(i[a]=0),c in i&&(i[c]="true"),K.scrolling||(i.scrolling="no"),e(i).attr({src:K.href,name:(new Date).getTime(),"class":Y+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",r).appendTo(E),at.one(rt,function(){i.src="//about:blank"}),K.fastIframe&&e(i).trigger("load")):r(),"fade"===K.transition?w.fadeTo(s,1,t):t())},"fade"===K.transition?w.fadeTo(s,0,function(){G.position(0,l)}):G.position(s,l)}},G.load=function(t){var n,s,c,u=G.prep;q=!0,O=!1,N=T[A],t||a(),Q&&w.add(m).removeClass(Q),K.className&&w.add(m).addClass(K.className),Q=K.className,d(rt),d(tt,K.onLoad),K.h=K.height?r(K.height,"y")-D-_:K.innerHeight&&r(K.innerHeight,"y"),K.w=K.width?r(K.width,"x")-B-z:K.innerWidth&&r(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=r(K.maxWidth,"x")-B-z,K.mw=K.w&&K.w1&&(O.height=O.height/i.devicePixelRatio,O.width=O.width/i.devicePixelRatio),K.scalePhotos&&(s=function(){O.height-=O.height*e,O.width-=O.width*e},K.mw&&O.width>K.mw&&(e=(O.width-K.mw)/O.width,s()),K.mh&&O.height>K.mh&&(e=(O.height-K.mh)/O.height,s())),K.h&&(O.style.marginTop=Math.max(K.mh-O.height,0)/2+"px"),T[1]&&(K.loop||T[A+1])&&(O.style.cursor="pointer",O.onclick=function(){G.next()}),ht&&(O.style.msInterpolationMode="bicubic"),setTimeout(function(){u(O)},1)}),setTimeout(function(){O.src=n},1)):n&&I.load(n,K.data,function(t,i){u("error"===i?o(dt,"Error").html(K.xhrError):e(this).contents())})},G.next=function(){!q&&T[1]&&(K.loop||T[A+1])&&(A=n(1),G.load())},G.prev=function(){!q&&T[1]&&(K.loop||A)&&(A=n(-1),G.load())},G.close=function(){j&&!U&&(U=!0,j=!1,d(ot,K.onCleanup),k.unbind("."+Y+" ."+st),m.fadeTo(200,0),w.stop().fadeTo(300,0,function(){w.add(m).css({opacity:1,cursor:"auto"}).hide(),d(rt),E.empty().remove(),setTimeout(function(){U=!1,d(nt,K.onClosed)},1)}))},G.remove=function(){e([]).add(w).add(m).remove(),w=null,e("."+Z).removeData(V).removeClass(Z),e(t).unbind("click."+Y)},G.element=function(){return e(N)},G.settings=J)})(jQuery,document,window);; (function ($) { Drupal.behaviors.initColorbox = { attach: function (context, settings) { if (!$.isFunction($.colorbox)) { return; } $('a, area, input', context) .filter('.colorbox') .once('init-colorbox') .colorbox(settings.colorbox); } }; { $(document).bind('cbox_complete', function () { Drupal.attachBehaviors('#cboxLoadedContent'); }); } })(jQuery); ; (function ($) { Drupal.behaviors.initColorboxDefaultStyle = { attach: function (context, settings) { $(document).bind('cbox_complete', function () { // Only run if there is a title. if ($('#cboxTitle:empty', context).length == false) { setTimeout(function () { $('#cboxTitle', context).slideUp() }, 1500); $('#cboxLoadedContent img', context).bind('mouseover', function () { $('#cboxTitle', context).slideDown(); }); $('#cboxOverlay', context).bind('mouseover', function () { $('#cboxTitle', context).slideUp(); }); } else { $('#cboxTitle', context).hide(); } }); } }; })(jQuery); ; /** * @file * Adds some show/hide to the admin form to make the UXP easier. */ (function($){ Drupal.behaviors.video = { attach: function (context, settings) { //lets see if we have any jmedia movies if($.fn.media) { $('.jmedia').media(); } if(settings.video) { $.fn.media.defaults.flvPlayer = settings.video.flvplayer; } //lets setup our colorbox videos $('.video-box').each(function() { var url = $(this).attr('href'); var data = $(this).metadata(); var width = data.width; var height= data.height; var player = settings.video.player; //player can be either jwplayer or flowplayer. $(this).colorbox({ html: '', onComplete:function() { if(player == 'flowplayer') { flowplayer("video-overlay", settings.video.flvplayer, { clip: { autoPlay: settings.video.autoplay, autoBuffering: settings.video.autobuffer } }); } else { $('#video-overlay').media({ flashvars: { autostart: settings.video.autoplay }, width:width, height:height }); } } }); }); } }; Drupal.behaviors.videoEdit = function(context){ // on change of the thumbnails when edit $(".video-thumbnails input").each(function() { var path = $(this).val(); if($(this).is(':checked')) { var holder = $(this).attr('rel'); var id = $(this).attr('id'); var src = $('label[for="'+id+'"]').find('img').attr('src'); $('.'+holder+' img').attr('src', src); } }); } })(jQuery); ; // $Id: extlink.js,v 1.8 2010/05/26 01:25:56 quicksketch Exp $ (function ($) { function extlinkAttach(context) { // Strip the host name down, removing ports, subdomains, or www. var pattern = /^(([^\/:]+?\.)*)([^\.:]{4,})((\.[a-z]{1,4})*)(:[0-9]{1,5})?$/; var host = window.location.host.replace(pattern, '$3$4'); var subdomain = window.location.host.replace(pattern, '$1'); // Determine what subdomains are considered internal. if (Drupal.settings.extlink.extSubdomains) { var subdomains = "([^/]*\\.)?"; } else if (subdomain == 'www.' || subdomain == '') { var subdomains = "(www\\.)?"; } else { var subdomains = subdomain.replace(".", "\\."); } // Build regular expressions that define an internal link. var internal_link = new RegExp("^https?://" + subdomains + host, "i"); // Extra internal link matching. var extInclude = false; if (Drupal.settings.extlink.extInclude) { extInclude = new RegExp(Drupal.settings.extlink.extInclude.replace(/\\/, '\\')); } // Extra external link matching. var extExclude = false; if (Drupal.settings.extlink.extExclude) { extExclude = new RegExp(Drupal.settings.extlink.extExclude.replace(/\\/, '\\')); } // Find all links which are NOT internal and begin with http (as opposed // to ftp://, javascript:, etc. other kinds of links. // When operating on the 'this' variable, the host has been appended to // all links by the browser, even local ones. // In jQuery 1.1 and higher, we'd use a filter method here, but it is not // available in jQuery 1.0 (Drupal 5 default). var external_links = new Array(); var mailto_links = new Array(); $("a:not(." + Drupal.settings.extlink.extClass + ", ." + Drupal.settings.extlink.mailtoClass + ")", context).each(function(el) { try { var url = this.href.toLowerCase(); if (url.indexOf('http') == 0 && (!url.match(internal_link) || (extInclude && url.match(extInclude))) && !(extExclude && url.match(extExclude))) { external_links.push(this); } else if (url.indexOf('mailto:') == 0) { mailto_links.push(this); } } // IE7 throws errors often when dealing with irregular links, such as: // Empty tags. // example User:pass syntax. catch(error) { return false; } }); if (Drupal.settings.extlink.extClass) { // Apply the "ext" class to all links not containing images. if (parseFloat($().jquery) < 1.2) { $(external_links).not('[img]').addClass(Drupal.settings.extlink.extClass).each(function() { if ($(this).css('display') == 'inline') $(this).after(''); }); } else { $(external_links).not($(external_links).find('img').parents('a')).addClass(Drupal.settings.extlink.extClass).each(function() { if ($(this).css('display') == 'inline') $(this).after(''); }); } } if (Drupal.settings.extlink.mailtoClass) { // Apply the "mailto" class to all mailto links not containing images. if (parseFloat($().jquery) < 1.2) { $(mailto_links).not('[img]').addClass(Drupal.settings.extlink.mailtoClass).each(function() { if ($(this).css('display') == 'inline') $(this).after(''); }); } else { $(mailto_links).not($(mailto_links).find('img').parents('a')).addClass(Drupal.settings.extlink.mailtoClass).each(function() { if ($(this).css('display') == 'inline') $(this).after(''); }); } } if (Drupal.settings.extlink.extTarget) { // Apply the target attribute to all links. $(external_links).attr('target', Drupal.settings.extlink.extTarget); } if (Drupal.settings.extlink.extAlert) { // Add pop-up click-through dialog. $(external_links).click(function(e) { return confirm(Drupal.settings.extlink.extAlertText); }); } // Work around for Internet Explorer box model problems. if (($.support && !($.support.boxModel === undefined) && !$.support.boxModel) || ($.browser.msie && parseInt($.browser.version) <= 7)) { $('span.ext, span.mailto').css('display', 'inline-block'); } } Drupal.behaviors.extlink = { attach: function(context){ extlinkAttach(context); } } })(jQuery); ; /** * Create a degradeable star rating interface out of a simple form structure. * * Originally based on the Star Rating jQuery plugin by Wil Stuckey: * http://sandbox.wilstuckey.com/jquery-ratings/ */ (function($){ // Create local scope. Drupal.behaviors.fivestar = { attach: function (context) { $('div.fivestar-form-item').once('fivestar', function() { var $this = $(this); var $container = $('
'); var $select = $('select', $this); // Setup the cancel button var $cancel = $('option[value="0"]', $this); if ($cancel.length) { $('
' + $cancel.text() + '
') .appendTo($container); } // Setup the rating buttons var $options = $('option', $this).not('[value="-"], [value="0"]'); var index = -1; $options.each(function(i, element) { var classes = 'star-' + (i+1); classes += (i + 1) % 2 == 0 ? ' even' : ' odd'; classes += i == 0 ? ' star-first' : ''; classes += i + 1 == $options.length ? ' star-last' : ''; $('
' + element.text + '
') .addClass(classes) .appendTo($container); if (element.value == $select.val()) { index = i + 1; } }); $container.find('.star:lt(' + index + ')').addClass('on'); $container.addClass('fivestar-widget-' + ($options.length)); $container.find('a') .bind('click', $this, Drupal.behaviors.fivestar.rate) .bind('mouseover', $this, Drupal.behaviors.fivestar.hover); $container.bind('mouseover mouseout', $this, Drupal.behaviors.fivestar.hover); // Attach the new widget and hide the existing widget. $select.after($container).css('display', 'none'); }); }, rate: function(event) { var $this = $(this); var $widget = event.data; var value = this.hash.replace('#', ''); $('select', $widget).val(value).change(); var $this_star = $this.closest('.star'); $this_star.prevAll('.star').andSelf().addClass('on'); $this_star.nextAll('.star').removeClass('on'); event.preventDefault(); }, hover: function(event) { var $this = $(this); var $widget = event.data; var $target = $(event.target); var $stars = $('.star', $this); if (event.type == 'mouseover') { var index = $stars.index($target.parent()); $stars.each(function(i, element) { if (i <= index) { $(element).addClass('hover'); } else { $(element).removeClass('hover'); } }); } else { $stars.removeClass('hover'); } } }; })(jQuery); ; (function ($) { $(document).ready(function() { // Expression to check for absolute internal links. var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i"); // Attach onclick event to document only and catch clicks on all elements. $(document.body).click(function(event) { // Catch the closest surrounding link of a clicked element. $(event.target).closest("a,area").each(function() { var ga = Drupal.settings.googleanalytics; // Expression to check for special links like gotwo.module /go/* links. var isInternalSpecial = new RegExp("(\/go\/.*)$", "i"); // Expression to check for download links. var isDownload = new RegExp("\\.(" + ga.trackDownloadExtensions + ")$", "i"); // Is the clicked URL internal? if (isInternal.test(this.href)) { // Skip 'click' tracking, if custom tracking events are bound. if ($(this).is('.colorbox')) { // Do nothing here. The custom event will handle all tracking. } // Is download tracking activated and the file extension configured for download tracking? else if (ga.trackDownload && isDownload.test(this.href)) { // Download link clicked. var extension = isDownload.exec(this.href); _gaq.push(["_trackEvent", "Downloads", extension[1].toUpperCase(), this.href.replace(isInternal, '')]); } else if (isInternalSpecial.test(this.href)) { // Keep the internal URL for Google Analytics website overlay intact. _gaq.push(["_trackPageview", this.href.replace(isInternal, '')]); } } else { if (ga.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) { // Mailto link clicked. _gaq.push(["_trackEvent", "Mails", "Click", this.href.substring(7)]); } else if (ga.trackOutbound && this.href.match(/^\w+:\/\//i)) { if (ga.trackDomainMode == 2 && isCrossDomain($(this).attr('hostname'), ga.trackCrossDomains)) { // Top-level cross domain clicked. document.location is handled by _link internally. event.preventDefault(); _gaq.push(["_link", this.href]); } else { // External link clicked. _gaq.push(["_trackEvent", "Outbound links", "Click", this.href]); } } } }); }); // Colorbox: This event triggers when the transition has completed and the // newly loaded content has been revealed. $(document).bind("cbox_complete", function() { var href = $.colorbox.element().attr("href"); if (href) { _gaq.push(["_trackPageview", href.replace(isInternal, '')]); } }); }); /** * Check whether the hostname is part of the cross domains or not. * * @param string hostname * The hostname of the clicked URL. * @param array crossDomains * All cross domain hostnames as JS array. * * @return boolean */ function isCrossDomain(hostname, crossDomains) { /** * jQuery < 1.6.3 bug: $.inArray crushes IE6 and Chrome if second argument is * `null` or `undefined`, http://bugs.jquery.com/ticket/10076, * https://github.com/jquery/jquery/commit/a839af034db2bd934e4d4fa6758a3fed8de74174 * * @todo: Remove/Refactor in D8 */ if (!crossDomains) { return false; } else { return $.inArray(hostname, crossDomains) > -1 ? true : false; } } })(jQuery); ; /** * Copyright (c) 2012 Anders Ekdahl (http://coffeescripter.com/) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * Version: 1.2.7 * * Demo and documentation: http://coffeescripter.com/code/ad-gallery/ */ (function($){$.fn.adGallery=function(options){var defaults={loader_image:'loader.gif',start_at_index:0,update_window_hash:true,description_wrapper:false,thumb_opacity:0.7,animate_first_image:false,animation_speed:400,width:false,height:false,display_next_and_prev:true,display_back_and_forward:true,scroll_jump:0,slideshow:{enable:true,autostart:false,speed:5000,start_label:'Start',stop_label:'Stop',stop_on_scroll:true,countdown_prefix:'(',countdown_sufix:')',onStart:false,onStop:false},effect:'slide-hori',enable_keyboard_move:true,cycle:true,hooks:{displayDescription:false},callbacks:{init:false,afterImageVisible:false,beforeImageVisible:false}};var settings=$.extend(false,defaults,options);if(options&&options.slideshow){settings.slideshow=$.extend(false,defaults.slideshow,options.slideshow);};if(!settings.slideshow.enable){settings.slideshow.autostart=false;};var galleries=[];$(this).each(function(){var gallery=new AdGallery(this,settings);galleries[galleries.length]=gallery;});return galleries;};function VerticalSlideAnimation(img_container,direction,desc){var current_top=parseInt(img_container.css('top'),10);if(direction=='left'){var old_image_top='-'+this.image_wrapper_height+'px';img_container.css('top',this.image_wrapper_height+'px');}else{var old_image_top=this.image_wrapper_height+'px';img_container.css('top','-'+this.image_wrapper_height+'px');};if(desc){desc.css('bottom','-'+desc[0].offsetHeight+'px');desc.animate({bottom:0},this.settings.animation_speed*2);};if(this.current_description){this.current_description.animate({bottom:'-'+this.current_description[0].offsetHeight+'px'},this.settings.animation_speed*2);};return{old_image:{top:old_image_top},new_image:{top:current_top}};};function HorizontalSlideAnimation(img_container,direction,desc){var current_left=parseInt(img_container.css('left'),10);if(direction=='left'){var old_image_left='-'+this.image_wrapper_width+'px';img_container.css('left',this.image_wrapper_width+'px');}else{var old_image_left=this.image_wrapper_width+'px';img_container.css('left','-'+this.image_wrapper_width+'px');};if(desc){desc.css('bottom','-'+desc[0].offsetHeight+'px');desc.animate({bottom:0},this.settings.animation_speed*2);};if(this.current_description){this.current_description.animate({bottom:'-'+this.current_description[0].offsetHeight+'px'},this.settings.animation_speed*2);};return{old_image:{left:old_image_left},new_image:{left:current_left}};};function ResizeAnimation(img_container,direction,desc){var image_width=img_container.width();var image_height=img_container.height();var current_left=parseInt(img_container.css('left'),10);var current_top=parseInt(img_container.css('top'),10);img_container.css({width:0,height:0,top:this.image_wrapper_height/2,left:this.image_wrapper_width/2});return{old_image:{width:0,height:0,top:this.image_wrapper_height/2,left:this.image_wrapper_width/2},new_image:{width:image_width,height:image_height,top:current_top,left:current_left}};};function FadeAnimation(img_container,direction,desc){img_container.css('opacity',0);return{old_image:{opacity:0},new_image:{opacity:1}};};function NoneAnimation(img_container,direction,desc){img_container.css('opacity',0);return{old_image:{opacity:0},new_image:{opacity:1},speed:0};};function AdGallery(wrapper,settings){this.init(wrapper,settings);};AdGallery.prototype={wrapper:false,image_wrapper:false,gallery_info:false,nav:false,loader:false,preloads:false,thumbs_wrapper:false,thumbs_wrapper_width:0,scroll_back:false,scroll_forward:false,next_link:false,prev_link:false,slideshow:false,image_wrapper_width:0,image_wrapper_height:0,current_index:-1,current_image:false,current_description:false,nav_display_width:0,settings:false,images:false,in_transition:false,animations:false,init:function(wrapper,settings){var context=this;this.wrapper=$(wrapper);this.settings=settings;this.setupElements();this.setupAnimations();if(this.settings.width){this.image_wrapper_width=this.settings.width;this.image_wrapper.width(this.settings.width);this.wrapper.width(this.settings.width);}else{this.image_wrapper_width=this.image_wrapper.width();};if(this.settings.height){this.image_wrapper_height=this.settings.height;this.image_wrapper.height(this.settings.height);}else{this.image_wrapper_height=this.image_wrapper.height();};this.nav_display_width=this.nav.width();this.current_index=-1;this.current_image=false;this.current_description=false;this.in_transition=false;this.findImages();if(this.settings.display_next_and_prev){this.initNextAndPrev();};var nextimage_callback=function(callback){return context.nextImage(callback);};this.slideshow=new AdGallerySlideshow(nextimage_callback,this.settings.slideshow);this.controls.append(this.slideshow.create());if(this.settings.slideshow.enable){this.slideshow.enable();}else{this.slideshow.disable();};if(this.settings.display_back_and_forward){this.initBackAndForward();};if(this.settings.enable_keyboard_move){this.initKeyEvents();};this.initHashChange();var start_at=parseInt(this.settings.start_at_index,10);if(typeof this.getIndexFromHash()!="undefined"){start_at=this.getIndexFromHash();};this.loading(true);this.showImage(start_at,function(){if(context.settings.slideshow.autostart){context.preloadImage(start_at+1);context.slideshow.start();};});this.fireCallback(this.settings.callbacks.init);},setupAnimations:function(){this.animations={'slide-vert':VerticalSlideAnimation,'slide-hori':HorizontalSlideAnimation,'resize':ResizeAnimation,'fade':FadeAnimation,'none':NoneAnimation};},setupElements:function(){this.controls=this.wrapper.find('.ad-controls');this.gallery_info=$('

');this.controls.append(this.gallery_info);this.image_wrapper=this.wrapper.find('.ad-image-wrapper');this.image_wrapper.empty();this.nav=this.wrapper.find('.ad-nav');this.thumbs_wrapper=this.nav.find('.ad-thumbs');this.preloads=$('
');this.loader=$('');this.image_wrapper.append(this.loader);this.loader.hide();$(document.body).append(this.preloads);},loading:function(bool){if(bool){this.loader.show();}else{this.loader.hide();};},addAnimation:function(name,fn){if($.isFunction(fn)){this.animations[name]=fn;};},findImages:function(){var context=this;this.images=[];var thumbs_loaded=0;var thumbs=this.thumbs_wrapper.find('a');var thumb_count=thumbs.length;if(this.settings.thumb_opacity<1){thumbs.find('img').css('opacity',this.settings.thumb_opacity);};thumbs.each(function(i){var link=$(this);link.data("ad-i",i);var image_src=link.attr('href');var thumb=link.find('img');context.whenImageLoaded(thumb[0],function(){var width=thumb[0].parentNode.parentNode.offsetWidth;if(thumb[0].width==0){width=100;};context.thumbs_wrapper_width+=width;thumbs_loaded++;});context._initLink(link);context.images[i]=context._createImageData(link,image_src);});var inter=setInterval(function(){if(thumb_count==thumbs_loaded){context._setThumbListWidth(context.thumbs_wrapper_width);clearInterval(inter);};},100);},_setThumbListWidth:function(wrapper_width){wrapper_width-=100;var list=this.nav.find('.ad-thumb-list');list.css('width',wrapper_width+'px');var i=1;var last_height=list.height();while(i<201){list.css('width',(wrapper_width+i)+'px');if(last_height!=list.height()){break;};last_height=list.height();i++;};if(list.width()=this.images.length){throw"Cannot remove image for index "+index;};var image=this.images[index];this.images.splice(index,1);var thumb_link=image.thumb_link;var thumb_width=thumb_link[0].parentNode.offsetWidth;this.thumbs_wrapper_width-=thumb_width;thumb_link.remove();this._setThumbListWidth(this.thumbs_wrapper_width);this.gallery_info.html((this.current_index+1)+' / '+this.images.length);this.thumbs_wrapper.find('a').each(function(i){$(this).data("ad-i",i);});if(index==this.current_index&&this.images.length!=0){this.showImage(0);};},removeAllImages:function(){for(var i=this.images.length-1;i>=0;i--){this.removeImage(i);};},addImage:function(thumb_url,image_url,image_id,title,description){image_id=image_id||"";title=title||"";description=description||"";var li=$('
  • '+''+description+''+'
  • ');var context=this;this.thumbs_wrapper.find("ul").append(li);var link=li.find("a");var thumb=link.find("img");thumb.css('opacity',this.settings.thumb_opacity);this.whenImageLoaded(thumb[0],function(){var thumb_width=thumb[0].parentNode.parentNode.offsetWidth;if(thumb[0].width==0){thumb_width=100;};context.thumbs_wrapper_width+=thumb_width;context._setThumbListWidth(context.thumbs_wrapper_width);});var i=this.images.length;link.data("ad-i",i);this._initLink(link);this.images[i]=context._createImageData(link,image_url);this.gallery_info.html((this.current_index+1)+' / '+this.images.length);},initHashChange:function(){var context=this;if("onhashchange"in window){$(window).bind("hashchange",function(){var index=context.getIndexFromHash();if(typeof index!="undefined"&&index!=context.current_index){context.showImage(index);};});}else{var current_hash=window.location.hash;setInterval(function(){if(window.location.hash!=current_hash){current_hash=window.location.hash;var index=context.getIndexFromHash();if(typeof index!="undefined"&&index!=context.current_index){context.showImage(index);};};},200);};},initNextAndPrev:function(){this.next_link=$('
    ');this.prev_link=$('
    ');this.image_wrapper.append(this.next_link);this.image_wrapper.append(this.prev_link);var context=this;this.prev_link.add(this.next_link).mouseover(function(e){$(this).css('height',context.image_wrapper_height);$(this).find('div').show();}).mouseout(function(e){$(this).find('div').hide();}).click(function(){if($(this).is('.ad-next')){context.nextImage();context.slideshow.stop();}else{context.prevImage();context.slideshow.stop();};}).find('div').css('opacity',0.7);},initBackAndForward:function(){var context=this;this.scroll_forward=$('
    ');this.scroll_back=$('
    ');this.nav.append(this.scroll_forward);this.nav.prepend(this.scroll_back);var has_scrolled=0;var thumbs_scroll_interval=false;$(this.scroll_back).add(this.scroll_forward).click(function(){var width=context.nav_display_width-50;if(context.settings.scroll_jump>0){var width=context.settings.scroll_jump;};if($(this).is('.ad-forward')){var left=context.thumbs_wrapper.scrollLeft()+width;}else{var left=context.thumbs_wrapper.scrollLeft()-width;};if(context.settings.slideshow.stop_on_scroll){context.slideshow.stop();};context.thumbs_wrapper.animate({scrollLeft:left+'px'});return false;}).css('opacity',0.6).hover(function(){var direction='left';if($(this).is('.ad-forward')){direction='right';};thumbs_scroll_interval=setInterval(function(){has_scrolled++;if(has_scrolled>30&&context.settings.slideshow.stop_on_scroll){context.slideshow.stop();};var left=context.thumbs_wrapper.scrollLeft()+1;if(direction=='left'){left=context.thumbs_wrapper.scrollLeft()-1;};context.thumbs_wrapper.scrollLeft(left);},10);$(this).css('opacity',1);},function(){has_scrolled=0;clearInterval(thumbs_scroll_interval);$(this).css('opacity',0.6);});},_afterShow:function(){this.gallery_info.html((this.current_index+1)+' / '+this.images.length);if(!this.settings.cycle){this.prev_link.show().css('height',this.image_wrapper_height);this.next_link.show().css('height',this.image_wrapper_height);if(this.current_index==(this.images.length-1)){this.next_link.hide();};if(this.current_index==0){this.prev_link.hide();};};if(this.settings.update_window_hash){var thumb_link=this.images[this.current_index].thumb_link;if(thumb_link.attr("id")){window.location.hash="#ad-image-"+thumb_link.attr("id");}else{window.location.hash="#ad-image-"+this.current_index;};};this.fireCallback(this.settings.callbacks.afterImageVisible);},_getContainedImageSize:function(image_width,image_height){if(image_height>this.image_wrapper_height){var ratio=image_width/image_height;image_height=this.image_wrapper_height;image_width=this.image_wrapper_height*ratio;};if(image_width>this.image_wrapper_width){var ratio=image_height/image_width;image_width=this.image_wrapper_width;image_height=this.image_wrapper_width*ratio;};return{width:image_width,height:image_height};},_centerImage:function(img_container,image_width,image_height){img_container.css('top','0px');if(image_height';};var desc='';if(image.desc.length){desc=''+image.desc+'';};desc=$('

    '+title+desc+'

    ');};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="
  • ";listItem+=""+media.title+"";if(media.duration)listItem+=""+media.duration+"";if(media.rating)listItem+="";if(media.itunes||media.amazon||media.spotify){listItem+=""}listItem+="
  • ";return listItem},_createItemHandlers:function(){var self=this;$(this.cssSelector.playlist+" a."+this.options.playlistOptions.itemClass).die("click").live("click",function(){var index=$(this).parent().parent().parent().index();if(self.current!==index){self.play(index)}else{$(self.cssSelector.jPlayer).jPlayer("play")}$(this).blur();return false});$(self.cssSelector.playlist+" a."+this.options.playlistOptions.freeItemClass).die("click").live("click",function(){$(this).parent().parent().parent().find("."+self.options.playlistOptions.itemClass).click();$(this).blur();return false});$(self.cssSelector.playlist+" a."+this.options.playlistOptions.removeItemClass).die("click").live("click",function(){var index=$(this).parent().parent().parent().index();self.remove(index);$(this).blur();return false})},_updateControls:function(){if(this.options.playlistOptions.enableRemoveControls){$(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).show()}else{$(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).hide()}if(this.shuffled){$(this.cssSelector.shuffleOff).show();$(this.cssSelector.shuffle).hide()}else{$(this.cssSelector.shuffleOff).hide();$(this.cssSelector.shuffle).show()}},_highlight:function(index){if(this.playlist.length&&index!==undefined){$(this.cssSelector.playlist+" .jp-playlist-current").removeClass("jp-playlist-current");$(this.cssSelector.playlist+" li:nth-child("+(index+1)+")").addClass("jp-playlist-current").find(".jp-playlist-item").addClass("jp-playlist-current");$(this.cssSelector.title+" li").html(this.playlist[index].title+(this.playlist[index].artist?" ":""))}},setPlaylist:function(playlist){this._initPlaylist(playlist);this._init()},add:function(media,playNow){$(this.cssSelector.playlist+" ol").append(this._createListItem(media)).find("li:last-child").hide().slideDown(this.options.playlistOptions.addTime);this._updateControls();this.original.push(media);this.playlist.push(media);if(playNow){this.play(this.playlist.length-1)}else{if(this.original.length===1){this.select(0)}}},remove:function(index){var self=this;if(index===undefined){this._initPlaylist([]);this._refresh(function(){$(self.cssSelector.jPlayer).jPlayer("clearMedia")});return true}else{if(this.removing){return false}else{index=(index<0)?self.original.length+index:index;if(0<=index&&index"+this.playlist[this.current].artist+"");$(".jp-current-rating").html("");$(".jp-current-cover img").attr("src",(this.playlist[this.current].cover))},play:function(index){index=(index<0)?this.original.length+index:index;if(0<=index&&index1){this.shuffle(true,true)}else{this.play(index)}}else{if(index>0){this.play(index)}}},previous:function(){var index=(this.current-1>=0)?this.current-1:this.playlist.length-1;if(this.loop&&this.options.playlistOptions.loopOnPrevious||indexg?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(d,c.pauseOnAction)});c.pausePlay&&f.pausePlay.setup();c.slideshow&&(c.pauseOnHover&&a.hover(function(){!a.manualPlay&&!a.manualPause&&a.pause()}, function(){!a.manualPause&&!a.manualPlay&&a.play()}),0');if(1':""+b+"",a.controlNavScaffold.append("
  • "+g+"
  • "),b++;a.controlsContainer?d(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold);f.controlNav.set();f.controlNav.active();a.controlNavScaffold.delegate("a, img",t,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"active")||(a.direction=g>a.currentSlide?"next":"prev",a.flexAnimate(g,c.pauseOnAction))});p&&a.controlNavScaffold.delegate("a", "click touchstart",function(a){a.preventDefault()})},setupManual:function(){a.controlNav=a.manualControls;f.controlNav.active();a.controlNav.live(t,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"active")||(g>a.currentSlide?a.direction="next":a.direction="prev",a.flexAnimate(g,c.pauseOnAction))});p&&a.controlNav.live("click touchstart",function(a){a.preventDefault()})},set:function(){a.controlNav=d("."+e+"control-nav li "+("thumbnails"===c.controlNav?"img":"a"), a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(e+"active").eq(a.animatingTo).addClass(e+"active")},update:function(b,c){1"+a.count+"")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(c).closest("li").remove();f.controlNav.set();1
  • '+c.prevText+'
  • '+c.nextText+"
  • ");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)); }; /** * 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 += '
    ' html += '
    ' // panels-modal-content html += ' '; html += ' '; html += '
    '; html += '
    '; return html; } /** * Provide the HTML to create the throbber. */ Drupal.theme.prototype.CToolsModalThrobber = function () { var 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); element_settings.event = 'click'; 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); Drupal.attachBehaviors(); } /** * 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 += '
    '; html += '
    '; html += '
    '; return html; } ; } /* FILE ARCHIVED ON 04:32:01 Apr 24, 2013 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 23:14:20 Sep 25, 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: 77.164 exclusion.robots: 0.08 exclusion.robots.policy: 0.073 RedisCDXSource: 6.941 esindex: 0.009 LoadShardBlock: 52.083 (3) PetaboxLoader3.datanode: 132.182 (4) CDXLines.iter: 15.28 (3) load_resource: 146.954 PetaboxLoader3.resolve: 59.083 */