PageSourceSearch

http://sfplayhouse.org/wp-content/themes/smartscreen/scripts/custom.js?ver=7.0.6

js sfplayhouse.org collected 2026-09-24 18:36:05 UTC 26,267 bytes, 445 lines download raw bytes

1/*!
2* FitVids 1.1
3*
4* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
5* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
6* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
7*
8*/
9(function(e){"use strict";e.fn.fitVids=function(t){var n={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0];var i=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}";var s=document.createElement("div");s.innerHTML='<p>x</p><style id="fit-vids-style">'+i+"</style>";r.appendChild(s.childNodes[1])}if(t){e.extend(n,t)}return this.each(function(){var t=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];if(n.customSelector){t.push(n.customSelector)}var r=".fitvidsignore";if(n.ignore){r=r+", "+n.ignore}var i=e(this).find(t.join(","));i=i.not("object object");i=i.not(r);i.each(function(){var t=e(this);if(t.parents(r).length>0){return}if(this.tagName.toLowerCase()==="embed"&&t.parent("object").length||t.parent(".fluid-width-video-wrapper").length){return}if(!t.css("height")&&!t.css("width")&&(isNaN(t.attr("height"))||isNaN(t.attr("width")))){t.attr("height",9);t.attr("width",16)}var n=this.tagName.toLowerCase()==="object"||t.attr("height")&&!isNaN(parseInt(t.attr("height"),10))?parseInt(t.attr("height"),10):t.height(),i=!isNaN(parseInt(t.attr("width"),10))?parseInt(t.attr("width"),10):t.width(),s=n/i;if(!t.attr("id")){var o="fitvid"+Math.floor(Math.random()*999999);t.attr("id",o)}t.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",s*100+"%");t.removeAttr("height").removeAttr("width")})})}})(window.jQuery||window.Zepto);
10
11
12/*
13 * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
14 * http://benalman.com/projects/jquery-bbq-plugin/
15 * 
16 * Copyright (c) 2010 "Cowboy" Ben Alman
17 * Dual licensed under the MIT and GPL licenses.
18 * http://benalman.com/about/license/
19 */
20(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);
20p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
21/*
22 * jQuery hashchange event - v1.2 - 2/11/2010
23 * http://benalman.com/projects/jquery-hashchange-plugin/
24 * 
25 * Copyright (c) 2010 "Cowboy" Ben Alman
26 * Dual licensed under the MIT and GPL licenses.
27 * http://benalman.com/about/license/
28 */
29(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=false&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
30
31// Images rollover effect function
32function frameHover () {
33    var frame_img = jQuery(this).find('img');
34    var frame_ico = jQuery(this).find('.zoom,.video');
35    jQuery(this).hover(function(){
36        jQuery(frame_img).stop(true, true).animate({top:30}, '5000', 'swing');
37        jQuery(frame_ico).stop(true, true).animate({top:0}, '5000', 'swing');
38    }, function(){
39        jQuery(frame_img).stop(true, true).animate({top:0}, '5000', 'swing');
40        jQuery(frame_ico).stop(true, true).animate({top:-99}, '5000', 'swing');
41
42    });
43}
44
45// Checking for Retina Devices
46function isRetina() {
47    var query = '(-webkit-min-device-pixel-ratio: 1.5),\
48                (min--moz-device-pixel-ratio: 1.5),\
49                (-o-min-device-pixel-ratio: 3/2),\
50                (min-device-pixel-ratio: 1.5),\
51                (min-resolution: 144dpi),\
52                (min-resolution: 1.5dppx)';
53
54    if (window.devicePixelRatio > 1 || (window.matchMedia && window.matchMedia(query).matches)) {
55        return true;
56    }
57
58    return false;
59}
60isMobile = 'ontouchstart' in document.documentElement;
61
62
63//** Smooth Navigational Menu- By Dynamic Drive DHTML code library: http://www.dynamicdrive.com
64//** Script Download/ instructions page: http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/
65//** Menu created: Nov 12, 2008
66
67var ddsmoothmenu={transition:{overtime:300,outtime:300},showhidedelay:{showdelay:100,hidedelay:200},detectwebkit:navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1,detectie6:document.all&&!window.XMLHttpRequest,getajaxmenu:function(e,t){var n=jQuery("#"+t.contentsource[0]);n.html("Loading Menu...");e.ajax({url:t.contentsource[1],async:true,error:function(e){n.html("Error fetching content. Server Response: "+e.responseText)},success:function(r){n.html(r);ddsmoothmenu.buildmenu(e,t)}})},buildmenu:function(e,t){var n=ddsmoothmenu;var r=jQuery("#"+t.mainmenuid+">ul");r.parent().get(0).className=t.classname||"ddsmoothmenu";var i=r.find("ul").parent();i.hover(function(e){jQuery(this).children("a:eq(0)").addClass("selected")},function(e){jQuery(this).children("a:eq(0)").removeClass("selected")});i.each(function(e){var n=jQuery(this).css({zIndex:100-e});var r=jQuery(this).find("ul:eq(0)").css({display:"block"});r.data("timers",{});this._dimensions={w:this.offsetWidth,h:this.offsetHeight,subulw:r.outerWidth(),subulh:r.outerHeight()};this.istopheader=n.parents("ul").length==1?true:false;r.css({top:this.istopheader&&t.orientation!="v"?this._dimensions.h+"px":0});n.hover(function(e){var i=r;var s=n.get(0);clearTimeout(i.data("timers").hidetimer);i.data("timers").showtimer=setTimeout(function(){s._offsets={left:n.offset().left,top:n.offset().top};var e=s.istopheader&&t.orientation!="v"?0:s._dimensions.w;e=s._offsets.left+e+s._dimensions.subulw>jQuery(window).width()?s.istopheader&&t.orientation!="v"?-s._dimensions.subulw+s._dimensions.w:-s._dimensions.w:e;if(i.queue().length<=1){i.css({left:e+"px",width:s._dimensions.subulw+"px"}).animate({height:"show",opacity:"show"}
67,ddsmoothmenu.transition.overtime)}},ddsmoothmenu.showhidedelay.showdelay)},function(e){var t=r;var i=n.get(0);clearTimeout(t.data("timers").showtimer);t.data("timers").hidetimer=setTimeout(function(){t.animate({height:"hide",opacity:"hide"},ddsmoothmenu.transition.outtime)},ddsmoothmenu.showhidedelay.hidedelay)})});r.find("ul").css({display:"none",visibility:"visible"})},init:function(e){if(typeof e.customtheme=="object"&&e.customtheme.length==2){var t="#"+e.mainmenuid;var n=e.orientation=="v"?t:t+", "+t;document.write('<style type="text/css">\n'+n+" ul li a {background:"+e.customtheme[0]+";}\n"+t+" ul li a:hover {background:"+e.customtheme[1]+";}\n"+"</style>")}jQuery(document).ready(function(t){if(typeof e.contentsource=="object"){ddsmoothmenu.getajaxmenu(t,e)}else{ddsmoothmenu.buildmenu(t,e)}})}}
68
69
70
71jQuery(document).ready(function ($) { //#Begin
72
73    /*** [jQuery Easying] ***/
74    /* -------------------------------------------------------------------------------- */
75    $.easing["jswing"]=$.easing["swing"];$.extend($.easing,{def:"easeOutQuad",swing:function(e,t,n,r,i){return $.easing[$.easing.def](e,t,n,r,i)},easeInQuad:function(e,t,n,r,i){return r*(t/=i)*t+n},easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n},easeInOutQuad:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t+n;return-r/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,r,i){return r*(t/=i)*t*t+n},easeOutCubic:function(e,t,n,r,i){return r*((t=t/i-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t*t+n;return r/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,r,i){return r*(t/=i)*t*t*t+n},easeOutQuart:function(e,t,n,r,i){return-r*((t=t/i-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t*t*t+n;return-r/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,r,i){return r*(t/=i)*t*t*t*t+n},easeOutQuint:function(e,t,n,r,i){return r*((t=t/i-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t*t*t*t+n;return r/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,r,i){return-r*Math.cos(t/i*(Math.PI/2))+r+n},easeOutSine:function(e,t,n,r,i){return r*Math.sin(t/i*(Math.PI/2))+n},easeInOutSine:function(e,t,n,r,i){return-r/2*(Math.cos(Math.PI*t/i)-1)+n},easeInExpo:function(e,t,n,r,i){return t==0?n:r*Math.pow(2,10*(t/i-1))+n},easeOutExpo:function(e,t,n,r,i){return t==i?n+r:r*(-Math.pow(2,-10*t/i)+1)+n},easeInOutExpo:function(e,t,n,r,i){if(t==0)return n;if(t==i)return n+r;if((t/=i/2)<1)return r/2*Math.pow(2,10*(t-1))+n;return r/2*(-Math.pow(2,-10*--t)+2)+n},easeInCirc:function(e,t,n,r,i){return-r*(Math.sqrt(1-(t/=i)*t)-1)+n},easeOutCirc:function(e,t,n,r,i){return r*Math.sqrt(1-(t=t/i-1)*t)+n},easeInOutCirc:function(e,t,n,r,i){if((t/=i/2)<1)return-r/2*(Math.sqrt(1-t*t)-1)+n;return r/2*(Math.sqrt(1-(t-=2)*t)+1)+n},easeInElastic:function(e,t,n,r,i){var s=1.70158;var o=0;var u=r;if(t==0)return n;if((t/=i)==1)return n+r;if(!o)o=i*.3;if(u<Math.abs(r)){u=r;var s=o/4}else var s=o/(2*Math.PI)*Math.asin(r/u);return-(u*Math.pow(2,10*(t-=1))*Math.sin((t*i-s)*2*Math.PI/o))+n},easeOutElastic:function(e,t,n,r,i){var s=1.70158;var o=0;var u=r;if(t==0)return n;if((t/=i)==1)return n+r;if(!o)o=i*.3;if(u<Math.abs(r)){u=r;var s=o/4}else var s=o/(2*Math.PI)*Math.asin(r/u);return u*Math.pow(2,-10*t)*Math.sin((t*i-s)*2*Math.PI/o)+r+n},easeInOutElastic:function(e,t,n,r,i){var s=1.70158;var o=0;var u=r;if(t==0)return n;if((t/=i/2)==2)return n+r;if(!o)o=i*.3*1.5;if(u<Math.abs(r)){u=r;var s=o/4}else var s=o/(2*Math.PI)*Math.asin(r/u);if(t<1)return-.5*u*Math.pow(2,10*(t-=1))*Math.sin((t*i-s)*2*Math.PI/o)+n;return u*Math.pow(2,-10*(t-=1))*Math.sin((t*i-s)*2*Math.PI/o)*.5+r+n},easeInBack:function(e,t,n,r,i,s){if(s==undefined)s=1.70158;return r*(t/=i)*t*((s+1)*t-s)+n},easeOutBack:function(e,t,n,r,i,s){if(s==undefined)s=1.70158;return r*((t=t/i-1)*t*((s+1)*t+s)+1)+n},easeInOutBack:function(e,t,n,r,i,s){if(s==undefined)s=1.70158;if((t/=i/2)<1)return r/2*t*t*(((s*=1.525)+1)*t-s)+n;return r/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+n},easeInBounce:function(e,t,n,r,i){return r-$.easing.easeOutBounce(e,i-t,0,r,i)+n},easeOutBounce:function(e,t,n,r,i){if((t/=i)<1/2.75){return r*7.5625*t*t+n}else if(t<2/2.75){return r*(7.5625*(t-=1.5/2.75)*t+.75)+n}else if(t<2.5/2.75){return r*(7.5625*(t-=2.25/2.75)*t+.9375)+n}else{return r*(7.5625*(t-=2.625/2.75)*t+.984375)+n}},easeInOutBounce:function(e,t,n,r,i){if(t<i/2)return $.easing.easeInBounce(e,t*2,0,r,i)*.5+n;return $.easing.easeOutBounce(e,t*2-i,0,r,i)*.5+r*.5+n}})
76
77
78    ddsmoothmenu.init({
79        mainmenuid:"nav", //Menu DIV id
80        orientation:'v', //Horizontal or vertical menu: Set to "h" or "v"
81        classname:'jqueryslidemenu', //class added to menu's outer DIV
82        contentsource:"markup" //"markup" or ["container_id", "path_to_menu_file"]
83    });
84
85
86    /*** [Testimonials] ***/
87    /* -------------------------------------------------------------------------------- */
88    $('.sc-testimonials .flexslider').flexslider({
89        animation:"fade",
90        animationLoop:true,
91        maxItems:1,
92        move:1,
93        directionNav:false,
94        controlNav:true,
95        slideshow:false
96    });
97
98
99    /*** [ToolTip] ***/
100    /* -------------------------------------------------------------------------------- */
101    $(".tooltip_sc").tooltip({ relative:true, offset:[5, 0], tipClass:'tool_tip' });
102
103    /*** [Slideshow Shortcode] ***/
104    /* -------------------------------------------------------------------------------- */
105    $('.slideshow-sc').flexslider({
106        directionNav:true,
107        pauseOnHover:true,
108        controlsContainer:'.flex-container'
109    });
110
111    /*** [Tab] ***/
112    /* -------------------------------------------------------------------------------- */
113    $("ul.tabs-titles").tabs("> .tab-content");
114    $(".accordion").tabs(".acc-item .acc-content", {tabs:'h3', effect:'slide', initialIndex:null});
115
116    /*** [Toggle] ***/
117    /* -------------------------------------------------------------------------------- */
118    $(".toggle-body").hide();
119    $(".toggle-head").click(function () {
120        var tb = $(this).next(".toggle-body");
121
122        if (tb.is(':hidden')) {
123            tb.prev('.toggle-head').children('h3').addClass('minus');
124            tb.slideDown('slow');
125
126        }
127        else {
128            tb.slideUp(200, function () {
129                tb.prev('.toggle-head').children('h3').removeClass('minus');
130            });
131        }
132    });
133
134    /*** [Footer Icons Functions] ***/
135    /* -------------------------------------------------------------------------------- */
136    $('#shutdown').click(function(){
137        if($(this).attr('class') == 'active') {
138            if($('body').hasClass('home')){
139             $(' .social-in-homepage').fadeIn();
140            } else {
141             $(' .social-in-page').fadeIn();
142            }
143            $('#menu-wrap, #slidecaption, #wrap').fadeIn();
144            $(this).removeClass('active');
145        } else {
146            if($('body').hasClass('home')){
147             $(' .social-in-homepage').fadeOut();
148            } else {
149             $(' .social-in-page').fadeOut();
150            }            
151            $('#menu-wrap, #slidecaption, #wrap').fadeOut();
152            $(this).addClass('active');
153
154        }
155    });
156
157    $('#tray-button').click(function(){
158        if($(this).attr('class') == 'active') {
159            $('#slidecaption').fadeIn();
160            $(this).removeClass('active');
161        } else {
162            $('#slidecaption').fadeOut();
163            $(this).addClass('active');
164        }
165    });
166
167    /*** [Menu & Entries Toggle] ***/
168    /* -------------------------------------------------------------------------------- */
169
170    $('.menu-toggle').click(function(){
171        var menu_height = $('#menu-wrap').outerHeight() - 50;
172        if($(this).attr('data-active') == 'yes') {
173            $('#menu-wrap').stop(true, true).animate({top:0}, '5000', 'swing');
174            $(this).attr('data-active', 'no');
175        } else {
176            $('#menu-wrap').stop(true, true).animate({top:-menu_height}, '5000', 'swing');
177            $(this).attr('data-active', 'yes');
178        }
179    });
180 
181    $('.entries-toggle').click(function(){
182        var sidebar_height = $('#sidebar').height() + 50;
183        if($(this).attr('data-active') == 'yes') {
184            $('#entries-box').slideDown();
185            $('#sidebar').stop(true, true).animate({top:0}, '5000', 'swing');
186            $(this).attr('data-active', 'no');
187        } else {
188            $('#entries-box').slideUp();
189            $('#sidebar').stop(true, true).animate({top:-sidebar_height}, '5000', 'swing');
190            $(this).attr('data-active', 'yes');
191        }
192    });
193
194
195    /*** [Filterable Portfolio] ***/
196    /* -------------------------------------------------------------------------------- */
197
198
199        var container = $('.filterable');
200        var classicContainer = $('#portfolio');
201        container.imagesLoaded(function () {
202            $('.portfolio-item-slideshow').flexslider({
203            controlNav: false,
204            smoothHeight: true,
205            directionNav: true,
206            slideshow: false,
207            keyboard: false,
208            touch: true
209            });
210
211        });
212        classicContainer.imagesLoaded(function () {
213            $('.portfolio-item-slideshow').flexslider({
214            controlNav: false,
215            smoothHeight: true,
216            directionNav: true,
217            slideshow: false,
218            keyboard: false,
219            touch: true
220            });
221
222        });    
223        defaultOptions = {
224                filter: '*',
225                itemSelector: '.folio-box',
226                layoutMode: 'fitRows',
227          };
228        container.imagesLoaded(function () {
229            container.isotope(defaultOptions);
230        });
231
232    var $optionSets = $('.filters'),
233          isOptionLinkClicked = false;
234  
235      // switches selected class on buttons
236      function changeSelectedLink( $elem ) {
237        // remove selected class on previous item
238        $elem.parents('.filters').find('.selected').removeClass('selected');
239        // set selected class on new item
240        $elem.addClass('selected');
241      }
242  
243  
244      $optionSets.find('a').click(function(){
245        var $this = $(this);
246        // don't proceed if already selected
247        if ( $this.hasClass('selected') ) {
248          return;
249        }
250        changeSelectedLink( $this );
251            // get href attr, remove leading #
252        var href = $this.attr('href').replace( /^#/, '' ),
253            // convert href into object
254            // i.e. 'filter=.inner-transition' -> { filter: '.inner-transition' }
255            option = $.deparam( href, true );
256        // apply new option to previous
257        $.extend( isotopeOptions, option );
258        // set hash, triggers hashchange on window
259        $.bbq.pushState( isotopeOptions );
260        isOptionLinkClicked = true;
261        return false;
262      });
263
264      var hashChanged = false;
265
266        $(window).bind( 'hashchange', function( event ){
267            // get options object from hash
268            var hashOptions = window.location.hash ? $.deparam.fragment( window.location.hash, true ) : {},
269                // do not animate first call
270                aniEngine = hashChanged ? 'best-available' : 'none',
271                // apply defaults where no option was specified
272                options = $.extend( {}, defaultOptions, hashOptions, { animationEngine: aniEngine } );
273            // apply options from hash
274            container.isotope( options );
275            // save options
276            isotopeOptions = hashOptions;
277
278            // if option link was not clicked
279            // then we'll need to update selected links
280            if ( !isOptionLinkClicked ) {
281              // iterate over options
282              var hrefObj, hrefValue, $selectedLink;
283              for ( var key in options ) {
284                hrefObj = {};
285                hrefObj[ key ] = options[ key ];
286                // convert object into parameter string
287                // i.e. { filter: '.inner-transition' } -> 'filter=.inner-transition'
288                hrefValue = $.param( hrefObj );
289                // get matching link
290                $selectedLink = $optionSets.find('a[href="#' + hrefValue + '"]');
291                changeSelectedLink( $selectedLink );
292              }
293            }
294
295            isOptionLinkClicked = false;
296            hashChanged = true;
297        })
298
299        // trigger hashchange to capture any hash data on init
300        .trigger('hashchange');
301
302
303        $('#folio-single-slideshow').flexslider({
304            animation: 'fade',
305            directionNav: false, // set true to enable Next/Previous Buttons
306            slideshowSpeed: 6000,
307            controlsContainer: '.flex-container'
308        });
309
310    /*** [Responsive Menu] ***/
311    /* -------------------------------------------------------------------------------- */
312/*    selectnav('main-menu', {
313        label: 'Select an item',
314        nested: true,
315        indent: '─'
316    });*/
317
318    // Responsive
319    $("#mobile-nav").before('<div id="mobilepro"><i class="fa fa-reorder fa-times"></i></div>');
320    $("#mobile-menu li ul.sub-menu").prev().before('<div class="subarrow"><i class="fa fa-angle-down"></i></div>');
321    $('#mobile-menu .subarrow').click(function () {
322        $(this).parent().toggleClass("xpopdrop");
323    });
324    $('#mobilepro').click(function () {
325        $('#mobile-menu').slideToggle('slow', 'easeInOutExpo').toggleClass("xactive");
326        $("#mobilepro i").toggleClass("fa-reorder");
327    });
328    $('#mobilepro, #mobile-menu').click(function(e) {
329        e.stopPropagation();
330    });
331    function checkWindowSize() {
332        if ($(window).width() > 998) {
333            $('#mobile-menu').css('display', 'none').removeClass("xactive");
334            $('#mobilepro i').addClass('fa-reorder');
335        }
336    }
337    $(window).load(checkWindowSize);
338    $(window).resize(checkWindowSize);
339
340    /*** [Smooth Scrolling] ***/
341    /* http://github.com/kswedberg/jquery-smooth-scroll */
342    /* -------------------------------------------------------------------------------- */
343
344    $(window).scroll(function(){
345        if ($(this).scrollTop() > 100) {
346            $('.scrollup').fadeIn();
347        } else {
348            $('.scrollup').fadeOut();
349        }
350    });
351
352    $("a[href*=\\#wrap],.scrollup").click(function (document) {
353        if ($.browser.opera) {
354            $("html").animate({scrollTop:0}, "slow");
355        } else {
356            $("html, body").animate({scrollTop:0}, "slow");
357        }
358    });
359
360   
361    
362    /*** [Hover Column] ***/
363    /* -------------------------------------------------------------------------------- */
364    $(".woocommerce ul.products li.product").hover(function(){
365        $(this).find('.thumbnail-container').stop().animate({
366            opacity: 0.7
367        }, 500);
368        $(this).find('.onsale').stop().animate({
369            top: 5
370        }, 300);
371
372
373    }, function(){
374
375        $(this).find('.thumbnail-container').stop().animate({
376            opacity: 1
377        }, 500);
378        $(this).find('.onsale').stop().animate({
379            top:0
380        }, 300);      
381    });
382
383    $(".woocommerce .images a.zoom").hover(function(){
384        $(this).stop().animate({
385            opacity: 0.7
386        }, 500);
387
388    }, function(){
389        $(this).stop().animate({
390            opacity: 1
391        }, 500);
392
393    });
394
395    $('.woocommerce-page table.shop_table tr:odd').addClass('woo-cart-item');
396    $('#searchform #searchsubmit').val('');
397    
398
399    /*** [Replace Retina images] ***/
400    /* -------------------------------------------------------------------------------- */    
401    if(window.isRetina()) {
402        $('img[data-retina]').each(function(){
403            var img_src = $(this).attr('src');
404            var retinaSrc = img_src.replace('.png', '@2x.png');
405            var img_height = $(this).height();
406            var img_width = $(this).width();
407            $(this).attr('src' , retinaSrc);  
408            $(this).attr('width' , img_width);
409            $(this).attr('height' , img_height); 
410        });    
411    }
412
413    /*** [Fit Videos] ***/
414    /* -------------------------------------------------------------------------------- */
415    $("#main").fitVids();
416
417    /*** [Video Background Poster] ***/
418    /* -------------------------------------------------------------------------------- */    
419    if ($(".video-background video[poster]")[0]) {
420        var poster = $('.video-background video').attr('poster');
421        if( poster.length > 0 ) {
422             $('<div class="poster-img" style="background-image: url('+poster+');">').appendTo('body');
423        }
424    }
425
426
427    /***
428     *  woocommerce add to cart ajax change
429     */
430    $('body').bind('added_to_cart', function(){
431        $('.add_to_cart_button.added').text('ADDED');
432
433    });
434
435    $('body').bind('added_to_cart', function(e, fragments, hash, thisbutton ){
436
437        thisbutton.next().removeClass('wc-forward').addClass('s-button small s-grey').text('View Cart');
438        $('.add_to_cart_button.added').text('Added').attr('disabled', 'disabled');
439
440    });
441
442
443}); //#END
444
445

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.