1jQuery.noConflict(); 2jQuery(document).ready(function() { 3 4 /* 5 * Tab functions 6 */ 7 if(jQuery('ul.tabs').length > 0){ 8 jQuery('ul.tabs').tabs('> .tabs_content'); 9 } 10 if(jQuery('ul.tabs_framed').length > 0){ 11 jQuery('ul.tabs_framed').tabs('> .tabs_framed_content'); 12 } 13 if(jQuery('ul.tabs_button').length > 0){ 14 jQuery('ul.tabs_button').tabs('> .tabs_button_content'); 15 } 16 if(jQuery('.tabs_vertical_frame').length > 0){ 17 jQuery('.tabs_vertical_frame').tabs('> .tabs_vertical_content'); 18 jQuery('.tabs_vertical li').click(function(){ jQuery(this).parent().children().removeClass('current'); 19 jQuery(this).addClass('current'); 20 }); 21 } 22 if(jQuery('ul.blog_tabs').length > 0){ 23 jQuery('ul.blog_tabs').tabs('> .blog_tabs_content'); 24 jQuery('ul.blog_tabs').data('tabs').onClick(function(index) { 25 Cufon.refresh(); 26 }); 27 } 28 29 /* 30 * Hover fade 31 */ 32 jQuery('.hover_fade_js').live('hover', function(e) { 33 if( e.type == 'mouseenter' ) 34 jQuery(this).stop().animate({opacity:0.7},400); 35 36 if( e.type == 'mouseleave' ) 37 jQuery(this).stop().animate({opacity:1},400); 38 }); 39 40 /* 41 * toggle functions 42 */ 43 jQuery('.toggle').toggle(function(){ 44 jQuery(this).addClass('active'); 45 }, function () { 46 jQuery(this).removeClass('active'); 47 }); 48 49 jQuery('.toggle').click(function(){ 50 jQuery(this).next('.toggle_content').slideToggle(); 51 }); 52 53 jQuery('.toggle_frame_set').each(function(i) { 54 var _this = jQuery(this), 55 toggle = _this.find('.toggle_accordion'); 56 57 toggle.click(function(){ 58 if( jQuery(this).next().is(':hidden') ) { 59 _this.find('.toggle_accordion').removeClass('active').next().slideUp(); 60 jQuery(this).toggleClass('active').next().slideDown(); 61 } 62 return false; 63 }); 64 }); 65 66 /* 67 * Testimonial functions 68 */ 69 var testimonialsEl = jQuery('.widget_testimonial_module'); 70 71 if(testimonialsEl.length>0){ 72 testimonialsEl.each(function(i) { 73 testimonialsElChildren = jQuery(this).children(':not(span)'), 74 testimonialsCount = testimonialsElChildren.length; 75 testimonialNext = jQuery(this).find('.testimonial_next'), 76 testimonialPrev = jQuery(this).find('.testimonial_prev'), 77 nextTestimonials = '', 78 prevTestimonials = ''; 79 80 testimonialNext.click(function () { 81 testimonialsElChildren.each(function(i) { 82 if(jQuery(this).is(':visible')){ 83 nextTestimonials = jQuery(this).next(); 84 if(nextTestimonials.hasClass('testimonial_nav')) 85 nextTestimonials = testimonialsElChildren.eq(0); 86 } 87 }); 88 89 testimonialsElChildren.hide(); 90 nextTestimonials.show(); 91 }); 92 93 testimonialPrev.click(function () { 94 testimonialsElChildren.each(function(i) { 95 if(jQuery(this).is(':visible')){ 96 prevTestimonials = jQuery(this).prev(); 97 if(prevTestimonials.length == 0) 98 prevTestimonials = testimonialsElChildren.eq(testimonialsCount-1); 99 } 100 }); 101 102 testimonialsElChildren.hide(); 103 prevTestimonials.show(); 104 }); 105 106 }); 107 } 108 109 /* 110 * image reflect functions 111 */ 112 jQuery('img.reflect').reflect({height:0.5,opacity:0.5}); 113 114 /* 115 * prettyPhoto 116 */ 117 jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto({ 118 overlay_gallery: false, social_tools: '', 'theme': prettyphotoTheme /* light_square / dark_rounded / light_square / dark_square / facebook */ 119 }); 120 121 /* 122 * spam protction on mailto: links 123 */ 124 jQuery('a.email_link_noreplace').nospam({ 125 replaceText: false, 126 filterLevel: 'normal' 127 }); 128 129 jQuery('a.email_link_replace').nospam({ 130 replaceText: true, 131 filterLevel: 'normal' 132 }); 133 134 /* 135 * Contact form submit 136 */ 137 jQuery('.contact_form_submit').click(function() { 138 clearInterval(preLoaderSmall); 139 preLoaderCount = 0; 140 mysitePreloaderSmall('.mysite_contact_feedback'); 141 jQuery(this).next().css('display','inline-block'); 142 }); 143 144 /* 145 * "target_blank" links 146 */ 147 jQuery('.flickr_badge_image a').attr('target', '_blank'); 148 jQuery('.target_blank').attr('target', '_blank'); 149 150}); 151 152 153/* 154 * Preload image function 155 */ 156(function($) { 157 var cache = []; 158 // Arguments are image paths relative to the current page. 159 $.preLoadImages = function() { 160 var args_len = arguments.length; 161 for (var i = args_len; i--;) { 162 var cacheImage = document.createElement('img'); 163 cacheImage.src = arguments[i]; 164 cache.push(cacheImage); 165 } 166 } 167})(jQuery) 168 169// Preload loading images 170jQuery.preLoadImages( 171assetsUri+ '/transparent.gif', 172assetsUri+ '/preloader.png' 173); 174 175/* 176 * Preloader image 177 */
178var preLoader = null; 179var preLoaderCount = 0; 180function mysitePreloader(img_class) { 181 var i, 182 positions; 183 i=0; 184 185 positions=[-26,-52,-78,-104,-130,-156,-182,-208,-234,-260,-286,0]; 186 positionsClass = 'center'; 187 188 preLoader=setInterval(function(){ 189 jQuery(img_class +' img').css('background-position',positions[i]+'px ' +positionsClass); 190 i++; 191 preLoaderCount++; 192 if(preLoaderCount===200){clearInterval(preLoader);preLoaderCount = 0;} 193 if(i===12){i=0;} 194 },70); 195} 196 197var preLoaderSmall = null; 198var preLoaderSmallCount = 0; 199function mysitePreloaderSmall(img_class) { 200 var i, 201 positions; 202 i=0; 203 204 positionsSmall=[-16,-32,-48,-64,-80,-96,-112,-128,-144,-160,-176,0]; 205 positionsClassSmall = 'bottom'; 206 207 preLoaderSmall=setInterval(function(){ 208 jQuery(img_class +' img').css('background-position',positionsSmall[i]+'px ' +positionsClassSmall); 209 i++; 210 preLoaderSmallCount++; 211 if(preLoaderSmallCount===200){clearInterval(preLoaderSmall);preLoaderSmallCount = 0;} 212 if(i===12){i=0;} 213 },70); 214} 215 216var preLoaderLarge = null; 217var preLoaderLargeCount = 0; 218function mysitePreloaderLarge(img_class) { 219 var i, 220 positions; 221 i=0; 222 223 positionsLarge=[-35,-70,-105,-140,-175,-210,-245,-280,-315,-350,-385,0]; 224 positionsClassLarge = 'top'; 225 226 preLoaderLarge=setInterval(function(){ 227 jQuery(img_class +' img').css('background-position',positionsLarge[i]+'px ' +positionsClassLarge); 228 i++; 229 preLoaderLargeCount++; 230 if(preLoaderLargeCount===200){clearInterval(preLoaderLarge);preLoaderLargeCount = 0;} 231 if(i===12){i=0;} 232 },70); 233} 234 235mysitePreloader('.mysite_preloader'); 236mysitePreloaderLarge('.mysite_preloader_large'); 237 238/* 239 * YouTube api events 240 */ 241function onYouTubePlayerAPIReady(id) { 242 new YT.Player(id, { 243 height: '', 244 width: '', 245 videoId: '', 246 events: { 247 'onStateChange': onPlayerStateChange 248 } 249 }); 250} 251 252function onPlayerStateChange(event) { 253 if( event.data == YT.PlayerState.PLAYING ) { 254 if( jQuery('#mysite_scrolling_slider').length>0){ 255 jQuery('#mysite_scrolling_slider').data('scrollable').stop(); 256 jQuery('#slider_module_inner').mouseout(function() { 257 jQuery('#mysite_scrolling_slider').data('scrollable').stop(); 258 }); 259 } 260 if( jQuery('#fading_slides').length>0){ 261 jQuery('.slider_nav').data('slideshow').stop(); 262 } 263 } 264} 265 266/* 267 * Vimeo api events 268 */ 269var VimeoEmbed = {}; 270 271VimeoEmbed.vimeo_player_loaded = function(player_id) { 272 VimeoEmbed.setupAPIEventListeners(player_id); 273}; 274 275VimeoEmbed.setupAPIEventListeners = function(target) { 276 iframe_player = document.getElementById(target); 277 iframe_player.addEvent( 'onPlay', VimeoEmbed.vimeo_on_play); 278}; 279 280VimeoEmbed.vimeo_on_play = function(player_id) { 281 if( jQuery('#mysite_scrolling_slider').length>0){ 282 jQuery('#mysite_scrolling_slider').data('scrollable').stop(); 283 jQuery('#slider_module_inner').mouseout(function() { 284 jQuery('#mysite_scrolling_slider').data('scrollable').stop(); 285 }); 286 } 287 if( jQuery('#fading_slides').length>0){ 288 jQuery('.slider_nav').data('slideshow').stop(); 289 } 290}; 291 292/* 293 * Contact ajaxForm 294 */ 295(function($) 296{ 297 $(function() { 298 try { 299 300 $('div.mysite_form > form').ajaxForm({ 301 302 data: { '_mysite_form_ajax_submit': 1 }, 303 dataType: 'json', 304 success: function(data) { 305 if($.browser.safari){ bodyelem = $('body') } else { bodyelem = $('html') } 306 307 jQuery(data.into).find(':input').each(function() { 308 jQuery(this).removeClass('required_error'); 309 }); 310 311 if(data.errors) { 312 313 if(data.errored_fields){ 314 $('.mysite_message').remove(); 315 for(var i in data.errored_fields){ 316 $('#' +data.errored_fields[i]).addClass('required_error'); 317 } 318 bodyelem.animate({ scrollTop: $(data.into).offset().top-80 319 }, 'slow', function(){ 320 jQuery('.mysite_contact_feedback').css('display','none'); 321 }); 322 } 323 324 if(data.errored_fields == '' || !data.sidebar){ 325 if(data.errors) { 326 bodyelem.animate({ 327 scrollTop: $(data.into).offset().top-80 328 }, 'slow', function(){ 329 $('.mysite_message').remove(); 330 $(data.errors).css('display', 'none').prependTo(data.into).slideDown('slow'); 331 jQuery('.mysite_contact_feedback').css('display','none'); 332 }); 333 } 334 } 335 } 336 337 if( data.mail_sent ) { 338 $('.mysite_message').remove(); 339 $(data.into + ' > form').remove(); 340 bodyelem.animate({ 341 scrollTop: $(data.into).offset().top-80 342 }, 'slow', function(){ 343 $(data.success).css('display', 'none').prependTo(data.into).slideDown('slow'); 344 jQuery('.mysite_contact_feedback').css('display','none'); 345 }); 346 } 347 } 348 349 }); 350 351 } catch (e) { 352 //suppress error 353 } 354 }); 355 356})(jQuery); 357 358/* 359 * Mysitemyway image preloader 360 */ 361(function($) 362{ 363 $.fn.preloader = function(options) { 364 var defaults = { 365 selector: '', 366 imgSelector: 'img:not(.nopreload)', 367 imgAppend: 'a', 368 fade: true, 369 delay: 500, 370 fadein: 400, 371 slider: false, 372 imageResize: imageResize, 373 resizeDisabled: resizeDisabled, 374 nonce: imageNonce, 375 beforeShowAll: function(){}, 376 onDone: function(){}, 377 oneachload: function(image){} 378 379 }, 380 options = $.extend({}, defaults, options); 381 382 var ua = $.browser, 383 uaVersion = ua.version.substring(0,1); 384 385 if(options.imageResize == 'wordpress') 386 options.delay = 0; 387 388 return this.each(function() { 389 390 options.beforeShowAll.call(this); 391 392 var $this = $(this), 393 images = $this.find(options.imgSelector), 394 count = images.length; 395 396 $this.load = { 397 398 preload: function(count) { 399 if(count>0) { 400 $this.load.loadImage(0,count); 401 } else if (options.slider && $this.find('.video_frame').length>0){ 402 options.onDone.call(this); 403 } else { 404 return; 405 } 406 }, 407 408 loadImage: function(i,count) { 409 if(i<count) { 410 var imgId = Math.floor(Math.random()*1000)+'_img_'; 411 $this.load.append(i,imgId); 412 413 if(options.imageResize == 'timthumb' || options.resizeDisabled == 'true') 414 $this.load.loader(i,$(images[i]).attr('src'),imgId); 415 416 if( (options.imageResize == 'wordpress') && (options.resizeDisabled == false) ) 417 $this.load.resize(i,imgId); 418 419 } else { 420 options.onDone.call(this); 421 } 422 }, 423 424 append: function(i,imgId) { 425 $('<span id="'+imgId+(i+1)+'"></span>').each(function() { 426 if( options.imgAppend ) { 427 $(this).appendTo($this.find(options.imgAppend).eq(i)); 428 } else { 429 $(this).appendTo($(options.selector)); 430 } 431 432 }); 433 }, 434 435 loader: function(i,image,imgId) { 436 var newImage = new Image(), 437 currImage = $('#'+imgId+(i+1)), 438 title = ( $(images[i]).attr('title') ) ? $(images[i]).attr('title') : ''; 439 440 $(newImage).load(function () { 441 var currImgWidth = $(images[i]).attr('width'), 442 currImgHeight = $(images[i]).attr('height'); 443 444 $(this).attr('width', currImgWidth); 445 $(this).attr('height', currImgHeight); 446 447 if(responsiveSite == 'true' && options.fade){ 448 paddingBottom = currImgHeight*100/$(images[i]).attr('width'); 449 $(images[i]).parent().parent().prepend('<span class="placeholder" style="padding-bottom:'+paddingBottom+'%;display:block;padding-top:'+imagePadding+'px;height:0;width:100%;"></span>'); 450 $(images[i]).parent().remove(); 451 452 } else { 453 $(images[i]).parent().remove() 454 } 455 456 457 if( options.fade ) { 458 $(this).css('display','none'); 459 $(currImage).append(this); 460 461 j = i+1; 462 463 // Remove preloader 464 $(this).parent().prev().delay(j*options.delay).queue(function() { 465 $(this).remove(); 466 467 if(responsiveSite == 'true'){ 468 currImage.prev().remove(); 469 } 470 }); 471 472 // FadeIn image 473 $(this).delay(j*options.delay).fadeIn(options.fadein).queue(function() { 474 $(this).addClass($(images[i]).attr('class')); 475 if( $(this).parent().parent().is('a')) { 476 if(($(this).parent().parent().attr('rel'))){ 477 if($(this).parent().parent().attr('rel').match('prettyPhoto')){ 478 var filename = $(this).parent().parent().attr('href'), 479 videos=['swf','youtube','vimeo','mov']; 480 for(var v in videos){ 481 if(filename.match(videos[v])){ 482 var video_icon = true; 483 }else{ 484 var zoom_icon = true; 485 } 486 } 487 } 488 } 489 490 //$(this).parent().prev().remove(); 491 492 } else { 493 //$(this).parent().prev().remove(); 494 } 495 496 if( video_icon ){ 497 $(this).parent().parent().css('backgroundImage','url(' +assetsUri+ '/play.png)'); 498 499 }else if(zoom_icon){ 500 $(this).parent().parent().css('backgroundImage','url(' +assetsUri+ '/zoom.png)'); 501 } 502 503 options.oneachload.call(this, this); 504 }); 505 if( (!ua.msie) || (uaVersion >= '9' && ua.msie) ){ 506 $this.load.loadImage(i+1,count); 507 } 508 509 } else { 510 $(this).addClass($(images[i]).attr('class')); 511 $(currImage).append(this); 512 if( (!ua.msie) || (uaVersion >= '9' && ua.msie) ){ 513 $this.load.loadImage(i+1,count); 514 } 515 options.oneachload.call(this, this); 516 } 517 518 }).error(function () { 519 // try to load next item 520 $this.load.loadImage(i+1,count); 521 }) 522 .attr('src', image) 523 .attr('title', title) 524 .attr('alt', $(images[i]).attr('alt')); 525 526 if(uaVersion <= '8' && ua.msie){ 527 $this.load.loadImage(i+1,count); 528 } 529 530 }, 531 532 resize: function(i,imgId) { 533 var imgResize = $('<input>', { type: 'text', name:'ajax_image_resize_url', val: $(images[i]).attr('src') }) 534 imgWidth = $('<input>', { type: 'text', name:'img_width', val: $(images[i]).attr('width') }), 535 imgHeight = $('<input>', { type: 'text', name:'img_height', val: $(images[i]).attr('height') }), 536 j5M5601 = $('<input>', { type: 'text', name:'j5M5601', val: options.nonce }); 537 538 postData = imgResize.add(imgWidth).add(imgHeight).add(j5M5601).serialize(); 539 540 $.ajax({ 541 type: 'POST', 542 dataType: 'json', 543 data: postData, 544 beforeSend: function(x) { 545 if(x && x.overrideMimeType) { 546 x.overrideMimeType('application/json;charset=UTF-8'); 547 } 548 }, 549 success: function(data) { 550 $this.load.loader(i,data.url,imgId); 551 } 552 }); 553 } 554 555 }; 556 557 $this.load.preload(count); 558 }); 559 } 560})(jQuery); 561 562 563/********************* 564//* jQuery Multi Level CSS Menu #2- By Dynamic Drive: http://www.dynamicdrive.com/ 565//* Last update: Nov 7th, 08': Limit # of queued animations to minmize animation stuttering 566//* Menu avaiable at DD CSS Library: http://www.dynamicdrive.com/style/ 567*********************/ 568 569//Update: April 12th, 10: Fixed compat issue with jquery 1.4x 570 571//Specify full URL to down and right arrow images (23 is padding-right to add to top level LIs with drop downs): 572var arrowimages={down:['', ''], right:['', '']} 573 574var jqueryslidemenu={ 575 576animateduration: {over: 200, out: 25}, //duration of slide in/ out animation, in milliseconds 577 578buildmenu:function(menuid, arrowsvar){ 579 jQuery(document).ready(function($){ 580 $(" #main_navigation a").removeAttr("title"); 581 582 var $mainmenu=$("."+menuid+">ul") 583 var $headers=$mainmenu.find("ul").parent() 584 $headers.each(function(i){ 585 var $curobj=$(this) 586 var $subul=$(this).find('ul:eq(0)') 587 this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()} 588 this.istopheader=$curobj.parents("ul").length==1? true : false 589 $subul.css({top:this.istopheader? this._dimensions.h+"px" : 0}) 590 591 /* 592 $curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: arrowsvar.down[2]} : {}).append( 593 '<img src="'+ (this.istopheader? arrowsvar.down[1] : arrowsvar.right[1]) 594 +'" class="' + (this.istopheader? arrowsvar.down[0] : arrowsvar.right[0]) 595 + '" style="border:0;" />' 596 )*/ 597 598 $curobj.hover( 599 function(e){ 600 var $targetul=$(this).children("ul:eq(0)") 601 this._offsets={left:$(this).offset().left, top:$(this).offset().top} 602 603 if(jQuery.browser.msie){ 604 var menuleft=this.istopheader? 0 : this._dimensions.w +2 605 menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) -4 : menuleft 606 } 607 if(!jQuery.browser.msie){ 608 var menuleft=this.istopheader? 0 : this._dimensions.w 609 menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft 610 } 611 if ($targetul.queue().length<=1){ 612 $targetul.css({left:menuleft+"px", width:this._dimensions.subulw+'px'}).slideDown(jqueryslidemenu.animateduration.over, function() { 613 // Animation complete 614 jQuery(this).find('li a span').css('display','block') 615 }) 616 617 if(jQuery.browser.msie){ 618 ieVersion = jQuery.browser.version.substring(0,1); 619 if( ieVersion == 7 ){ var disableArrors = true; } 620 } 621 if( !disableArrors ) { 622 if(this.istopheader && jQuery(this).children().eq(0).find('span.menu_arrow').length<1) { 623 $curobj.children("a:eq(0)").append( 624 '<span class="menu_arrow"></span>' 625 ) 626 } 627 } 628 } //if 1 or less queued animations 629 630 }, 631 function(e){ 632 var $targetul=$(this).children("ul:eq(0)") 633 $targetul.slideUp(jqueryslidemenu.animateduration.out) 634 } 635 ) //end hover 636 $curobj.click(function(){ 637 $(this).children("ul:eq(0)").hide() 638 }) 639 }) //end $headers.each() 640 $mainmenu.find("ul").css({display:'none', visibility:'visible'}) 641 }) //end document.ready 642} 643}; 644//build menu with ID="main_navigation" on page: 645if(disableSlidemenu == 'false' ){ 646 jqueryslidemenu.buildmenu("jqueryslidemenu", arrowimages); 647} 648 649 650/* 651 reflection.js for jQuery v1.03 652 (c) 2006-2009 Christophe Beyls <http://www.digitalia.be> 653 MIT-style license. 654*/ 655(function(a){a.fn.extend({reflect:function(b){b=a.extend({height:1/3,opacity:0.5},b);return this.unreflect().each(function(){var c=this;if(/^img$/i.test(c.tagName)){function d(){var g=c.width,f=c.height,l,i,m,h,k;i=Math.floor((b.height>1)?Math.min(f,b.height):f*b.height);if(a.browser.msie){l=a("<img />").attr("src",c.src).css({width:g,height:f,marginBottom:i-f,filter:"flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+(b.opacity*100)+", style=1, finishOpacity=0, startx=0, start
655y=0, finishx=0, finishy="+(i/f*100)+")"})[0]}else{l=a("<canvas />")[0];if(!l.getContext){return}h=l.getContext("2d");try{a(l).attr({width:g,height:i});h.save();h.translate(0,f-1);h.scale(1,-1);h.drawImage(c,0,0,g,f);h.restore();h.globalCompositeOperation="destination-out";k=h.createLinearGradient(0,0,0,i);k.addColorStop(0,"rgba(255, 255, 255, "+(1-b.opacity)+")");k.addColorStop(1,"rgba(255, 255, 255, 1.0)");h.fillStyle=k;h.rect(0,0,g,i);h.fill()}catch(j){return}}a(l).css({display:"block",border:0});m=a(/^a$/i.test(c.parentNode.tagName)?"<span />":"<div />").insertAfter(c).append([c,l])[0];m.className=c.className;a.data(c,"reflected",m.style.cssText=c.style.cssText);a(m).css({width:g,height:f+i,overflow:"hidden"});c.style.cssText="display: block; border: 0px";c.className="reflected"}if(c.complete){d()}else{a(c).load(d)}}})},unreflect:function(){return this.unbind("load").each(function(){var c=this,b=a.data(this,"reflected"),d;if(b!==undefined){d=c.parentNode;c.className=d.className;c.style.cssText=b;a.removeData(c,"reflected");d.parentNode.replaceChild(c,d)}})}})})(jQuery); 656 657/** 658* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+ 659* <http://cherne.net/brian/resources/jquery.hoverIntent.html> 660* 661* @param f onMouseOver function || An object with configuration options 662* @param g onMouseOut function || Nothing (use configuration options object) 663* @author Brian Cherne <[email protected]> 664*/ 665(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery); 666 667/* 668 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 669 * 670 * Uses the built in easing capabilities added In jQuery 1.1 671 * to offer multiple easing options 672 * 673 * TERMS OF USE - jQuery Easing 674 * 675 * Open source under the BSD License. 676 * 677 * Copyright © 2008 George McGinley Smith 678 * All rights reserved. 679 * 680 * Redistribution and use in source and binary forms, with or without modification, 681 * are permitted provided that the following conditions are met: 682 * 683 * Redistributions of source code must retain the above copyright notice, this list of 684 * conditions and the following disclaimer. 685 * Redistributions in binary form must reproduce the above copyright notice, this list 686 * of conditions and the following disclaimer in the documentation and/or other materials 687 * provided with the distribution. 688 * 689 * Neither the name of the author nor the names of contributors may be used to endorse 690 * or promote products derived from this software without specific prior written permission. 691 * 692 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 693 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 694 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 695 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
vendor: 4,446 bytes, lines 696-721
696 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 697 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 698 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 699 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 700 * OF THE POSSIBILITY OF SUCH DAMAGE. 701 * 702*/ 703 704jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;} 705else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;} 706else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;} 707else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}}); 708 709/* 710 * No Spam (1.3) 711 * by Mike Branski (www.leftrightdesigns.com) 712 * [email protected] 713 * 714 * Copyright (c) 2008 Mike Branski (www.leftrightdesigns.com) 715 * Licensed under GPL (www.leftrightdesigns.com/library/jquery/nospam/gpl.txt) 716 * 717 * NOTE: This script requires jQuery to work. Download jQuery at www.jquery.com 718 * 719 * Thanks to Bill on the jQuery mailing list for the double slash idea! 720 * 721 * CHANGELOG:
722 * v 1.3 - Added support for e-mail addresses with multiple dots (.) both before and after the at (@) sign 723 * v 1.2.1 - Included GPL license 724 * v 1.2 - Finalized name as No Spam (was Protect Email) 725 * v 1.1 - Changed switch() to if() statement 726 * v 1.0 - Initial release 727 * 728 */ 729 730jQuery.fn.nospam = function(settings) { 731 settings = jQuery.extend({ 732 replaceText: false, // optional, accepts true or false 733 filterLevel: 'normal' // optional, accepts 'low' or 'normal' 734 }, settings); 735 736 return this.each(function(){ 737 e = null; 738 if(settings.filterLevel == 'low') { // Can be a switch() if more levels added 739 if(jQuery(this).is('a[rel]')) { 740 e = jQuery(this).attr('rel').replace('//', '@').replace(/\//g, '.'); 741 } else { 742 e = jQuery(this).text().replace('//', '@').replace(/\//g, '.'); 743 } 744 } else { // 'normal' 745 if(jQuery(this).is('a[rel]')) { 746 e = jQuery(this).attr('rel').split('').reverse().join('').replace('//', '@').replace(/\//g, '.'); 747 } else { 748 e = jQuery(this).text().split('').reverse().join('').replace('//', '@').replace(/\//g, '.'); 749 } 750 } 751 if(e) { 752 if(jQuery(this).is('a[rel]')) { 753 jQuery(this).attr('href', 'mailto:' + e); 754 if(settings.replaceText) { 755 jQuery(this).text(e); 756 } 757 } else { 758 jQuery(this).text(e); 759 } 760 } 761 }); 762}; 763 764 765/* 766 767CUSTOM FORM ELEMENTS 768 769Created by Ryan Fait 770www.ryanfait.com 771
772The only things you may need to change in this file are the following 773variables: checkboxHeight, radioHeight and selectWidth (lines 24, 25, 26) 774 775The numbers you set for checkboxHeight and radioHeight should be one quarter 776of the total height of the image want to use for checkboxes and radio 777buttons. Both images should contain the four stages of both inputs stacked 778on top of each other in this order: unchecked, unchecked-clicked, checked, 779checked-clicked. 780 781You may need to adjust your images a bit if there is a slight vertical 782movement during the different stages of the button activation. 783 784The value of selectWidth should be the width of your select list image. 785 786Visit http://ryanfait.com/ for more information. 787 788*/ 789 790var checkboxHeight = "25"; 791var radioHeight = "25"; 792var selectWidth = "190"; 793 794 795/* No need to change anything after this */ 796 797 798document.write('<style type="text/css">input.styled { display: none; } select.styled { position: relative; width: ' + selectWidth + 'px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>'); 799 800var Custom = { 801 init: function() { 802 var inputs = document.getElementsByTagName("input"), span = Array(), textnode, option, active; 803 for(a = 0; a < inputs.length; a++) { 804 if((inputs[a].type == "checkbox" || inputs[a].type == "radio") && jQuery(inputs[a]).hasClass('styled')) { 805 span[a] = document.createElement("span"); 806 span[a].className = inputs[a].type; 807 808 if(inputs[a].checked == true) { 809 if(inputs[a].type == "checkbox") { 810 position = "0 -" + (checkboxHeight*2) + "px"; 811 span[a].style.backgroundPosition = position; 812 } else { 813 position = "0 -" + (radioHeight*2) + "px"; 814 span[a].style.backgroundPosition = position; 815 } 816 } 817 inputs[a].parentNode.insertBefore(span[a], inputs[a]); 818 inputs[a].onchange = Custom.clear; 819 if(!inputs[a].getAttribute("disabled")) { 820 span[a].onmousedown = Custom.pushed; 821 span[a].onmouseup = Custom.check; 822 } else { 823 span[a].className = span[a].className += " disabled"; 824 } 825 } 826 } 827 inputs = document.getElementsByTagName("select"); 828 for(a = 0; a < inputs.length; a++) { 829 if(jQuery(inputs[a]).hasClass('styled')) { 830 option = inputs[a].getElementsByTagName("option"); 831 active = option[0].childNodes[0].nodeValue; 832 textnode = document.createTextNode(active); 833 for(b = 0; b < option.length; b++) { 834 if(option[b].selected == true) { 835 textnode = document.createTextNode(option[b].childNodes[0].nodeValue); 836 } 837 } 838 span[a] = document.createElement("span"); 839 span[a].className = "select";
840 span[a].id = "select" + inputs[a].name; 841 span[a].appendChild(textnode); 842 inputs[a].parentNode.insertBefore(span[a], inputs[a]); 843 if(!inputs[a].getAttribute("disabled")) { 844 inputs[a].onchange = Custom.choose; 845 } else { 846 inputs[a].previousSibling.className = inputs[a].previousSibling.className += " disabled"; 847 } 848 } 849 } 850 document.onmouseup = Custom.clear; 851 }, 852 pushed: function() { 853 element = this.nextSibling; 854 if(element.checked == true && element.type == "checkbox") { 855 this.style.backgroundPosition = "0 -" + checkboxHeight*3 + "px"; 856 } else if(element.checked == true && element.type == "radio") { 857 this.style.backgroundPosition = "0 -" + radioHeight*3 + "px"; 858 } else if(element.checked != true && element.type == "checkbox") { 859 this.style.backgroundPosition = "0 -" + checkboxHeight + "px"; 860 } else { 861 this.style.backgroundPosition = "0 -" + radioHeight + "px"; 862 } 863 }, 864 check: function() { 865 element = this.nextSibling; 866 if(element.checked == true && element.type == "checkbox") { 867 this.style.backgroundPosition = "0 0"; 868 element.checked = false; 869 } else { 870 if(element.type == "checkbox") { 871 this.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px"; 872 } else { 873 this.style.backgroundPosition = "0 -" + radioHeight*2 + "px"; 874 group = this.nextSibling.name; 875 inputs = document.getElementsByTagName("input"); 876 for(a = 0; a < inputs.length; a++) { 877 if(inputs[a].name == group && inputs[a] != this.nextSibling) { 878 inputs[a].previousSibling.style.backgroundPosition = "0 0"; 879 } 880 } 881 } 882 element.checked = true; 883 } 884 }, 885 clear: function() { 886 inputs = document.getElementsByTagName("input"); 887 for(var b = 0; b < inputs.length; b++) { 888 if(inputs[b].type == "checkbox" && inputs[b].checked == true && jQuery(inputs[b]).hasClass('styled')) { 889 inputs[b].previousSibling.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px"; 890 } else if(inputs[b].type == "checkbox" && jQuery(inputs[b]).hasClass('styled')) { 891 inputs[b].previousSibling.style.backgroundPosition = "0 0"; 892 } else if(inputs[b].type == "radio" && inputs[b].checked == true && jQuery(inputs[b]).hasClass('styled')) { 893 inputs[b].previousSibling.style.backgroundPosition = "0 -" + radioHeight*2 + "px"; 894 } else if(inputs[b].type == "radio" && jQuery(inputs[b]).hasClass('styled')) { 895 inputs[b].previousSibling.style.backgroundPosition = "0 0"; 896 } 897 } 898 }, 899 choose: function() { 900 option = this.getElementsByTagName("option"); 901 for(d = 0; d < option.length; d++) { 902 if(option[d].selected == true) { 903 document.getElementById("select" + this.name).childNodes[0].nodeValue = option[d].childNodes[0].nodeValue; 904 } 905 } 906 } 907} 908window.onload = Custom.init; 909 910 911/* Copyright 2011, Ben Lin (http://dreamerslab.com/) 912* Licensed under the MIT License (LICENSE.txt). 913* 914* Version: 1.0.5 915* 916* Requires: jQuery 1.2.3+ 917*/ 918;(function(a){a.fn.extend({actual:function(b,k){var c,d,h,g,f,j,e,i;if(!this[b]){throw'$.actual => The jQuery method "'+b+'" you called does not exist';}h=a.extend({absolute:false,clone:false,includeMargin:undefined},k);d=this;if(h.clone===true){e=function(){d=d.filter(":first").clone().css({position:"absolute",top:-1000}).appendTo("body");};i=function(){d.remove();};}else{e=function(){c=d.parents().andSelf().filter(":hidden");g=h.absolute===true?{position:"absolute",visibility:"hidden",display:"block"}:{visibility:"hidden",display:"block"};f=[];c.each(function(){var m={},l;for(l in g){m[l]=this.style[l];this.style[l]=g[l];}f.push(m);});};i=function(){c.each(function(m){var n=f[m],l;for(l in g){this.style[l]=n[l];}});};}e();j=d[b](h.includeMargin);i();return j;}});})(jQuery); 919 920// #################################################################################### 921// ####### ####### 922// ####### Plugin: jScroll ####### 923// ####### Author: William Duffy ####### 924// ####### Website: http://www.wduffy.co.uk/jScroll ####### 925// ####### Version: 1.1 ####### 926// ####### ####### 927// ####### Copyright (c) 2011, William Duffy - www.wduffy.co.uk ####### 928// ####### ####### 929// ####### Permission is hereby granted, free of charge, to any person ####### 930// ####### obtaining a copy of this software and associated documentation ####### 931// ####### files (the "Software"), to deal in the Software without ####### 932// ####### restriction, including without limitation the rights to use, ####### 933// ####### copy, modify, merge, publish, distribute, sublicense, and/or sell ####### 934// ####### copies of the Software, and to permit persons to whom the ####### 935// ####### Software is furnished to do so, subject to the following ####### 936// ####### conditions: ####### 937// ####### ####### 938// ####### The above copyright notice and this permission notice shall be ####### 939// ####### included in all copies or substantial portions of the Software. ####### 940// ####### ####### 941// ####### THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ####### 942// ####### EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ####### 943// ####### OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ####### 944// ####### NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ####### 945// ####### HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ####### 946// ####### WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ####### 947// ####### FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ####### 948// ####### OTHER DEALINGS IN THE SOFTWARE. ####### 949// ####### ####### 950// #################################################################################### 951 952(function($){$.fn.jScroll=function(e){var f=$.extend({},$.fn.jScroll.defaults,e);return this.each(function(){var a=$(this);var b=$(window);var c=new location(a);b.scroll(function(){a.stop().animate(c.getMargin(b),f.speed)})});function location(d){this.min=d.offset().top;this.originalMargin=parseInt(d.css("margin-top"),10)||0;this.getMargin=function(a){var b=d.parent().height()-d.outerHeight();var c=this.originalMargin;if(a.scrollTop()>
952=this.min)c=c+f.top+a.scrollTop()-this.min;if(c>b)c=b;return({"marginTop":c+'px'})}}};$.fn.jScroll.defaults={speed:"slow",top:10}})(jQuery); 953 954 955/*! 956* FitVids 1.0 957* 958* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 959* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 960* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 961* 962* Date: Thu Sept 01 18:00:00 2011 -0500 963*/ 964(function(a){a.fn.fitVids=function(b){var c={customSelector:null};var e=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];e.className="fit-vids-style";e.innerHTML="­<style>.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%!important;height:100%!important;}</style>";d.parentNode.insertBefore(e,d);if(b){a.extend(c,b)}return this.each(function(){var f=["iframe[src*='player.vimeo.com']","iframe[src*='www.youtube.com']","iframe[src*='www.kickstarter.com']","object","embed"];if(c.customSelector){f.push(c.customSelector)}var g=a(this).find(f.join(","));g.each(function(){var k=a(this);if(this.tagName.toLowerCase()=="embed"&&k.parent("object").length||k.parent(".fluid-width-video-wrapper").length){return}var h=this.tagName.toLowerCase()=="object"?k.attr("height"):k.height(),i=h/k.width();if(!k.attr("id")){var j="fitvid"+Math.floor(Math.random()*999999);k.attr("id",j)}k.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",(i*100)+"%");k.removeAttr("height").removeAttr("width")})})}})(jQuery); 965 966 967/** 968 * Vimeo Api 969 * http://github.com/vimeo/froogaloop/raw/master/froogaloop.min.js 970 */ 971var Froogaloop=function(){var e={hasWindowEvent:false,PLAYER_DOMAIN:"",eventCallbacks:{},iframe_pattern:/player\.(([a-zA-Z0-9_\.]+)\.)?vimeo(ws)?\.com\/video\/([0-9]+)/i},j=function(b){b||(b=document.getElementsByTagName("iframe"));for(var a,c=0,f=b.length,g;c<f;c++){a=b[c];if(g=e.iframe_pattern.test(a.getAttribute("src"))){a.api=h.api;a.get=h.get;a.addEvent=h.addEvent}}},h={api:function(b,a){i(b,a,this)},get:function(b,a){k(b,a,this.id!=""?this.id:null);i(b,null,this)},addEvent:function(b,a){k(b, 972a,this.id!=""?this.id:null);b!="onLoad"&&i("api_addEventListener",[b,a.name],this);if(e.hasWindowEvent)return false;e.PLAYER_DOMAIN=d.getDomainFromUrl(this.getAttribute("src"));window.addEventListener?window.addEventListener("message",l,false):window.attachEvent("onmessage",l,false);e.hasWindowEvent=true}},i=function(b,a,c){if(!c.contentWindow.postMessage)return false;if(a===undefined||a===null)a="";var f=c.getAttribute("src").split("?")[0];b=d.serialize({method:b,params:a,id:c.getAttribute("id")}); 973c.contentWindow.postMessage(b,f)},k=function(b,a,c){if(c){e.eventCallbacks[c]||(e.eventCallbacks[c]={});e.eventCallbacks[c][b]=a}else e.eventCallbacks[b]=a},l=function(b){if(b.origin!=e.PLAYER_DOMAIN)return false;var a=d.unserialize(b.data);b=a.params?a.params.split('"').join("").split(","):"";a=a.method;var c=b[b.length-1];if(c=="")c=null;if(a=c?e.eventCallbacks[c][a]:e.eventCallbacks[a])b.length>0?a.apply(null,b):a.call()},d={r20:/%20/g,isArray:function(b){return Object.prototype.toString.call(b)=== 974"[object Array]"},isFunction:function(b){return Object.prototype.toString.call(b)==="[object Function]"},unserialize:function(b){if(!b)return false;var a={};b=b.split("&");for(var c,f,g=0;g<b.length;g++){c=unescape(b[g].split("=")[0]);f=unescape(b[g].split("=")[1]);if(f.indexOf("=")>-1)f=d.unserialize(f);a[c]=f}return a},s:false,serialize:function(b){d.s=[];for(var a in b)d.buildParams(a,b[a]);return d.s.join("&").replace(d.r20,"+")},buildParams:function(b,a){var c=0;if(d.isArray(a)){for(;c<a.length;c++)a[c]= 975encodeURIComponent(a[c]);d.addToParam(encodeURIComponent(b),a.join(","))}else d.addToParam(encodeURIComponent(b),encodeURIComponent(a))},addToParam:function(b,a){a=d.isFunction(a)?a():a;d.s[d.s.length]=b+"="+a},getDomainFromUrl:function(b){b=b.split("/");for(var a="",c=0;c<b.length;c++){if(c<3)a+=b[c];else break;if(c<2)a+="/"}return a}};j();return{init:j}}(); 976 977 978/** 979 * YouTube Api 980 */ 981(function(){var f=void 0,g=null,i=!1,j,l=this,m=function(a){for(var a=a.split("."),c=l,b;b=a.shift();)if(c[b]!=g)c=c[b];else return g;return c},n=function(a){return"string"==typeof a}
981,q="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),aa=0,ba=function(a,c,b){return a.call.apply(a.bind,arguments)},ca=function(a,c,b){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var b=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(b, 982d);return a.apply(c,b)}}return function(){return a.apply(c,arguments)}},s=function(a,c,b){s=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ba:ca;return s.apply(g,arguments)},t=function(a,c){var b=a.split("."),d=l;!(b[0]in d)&&d.execScript&&d.execScript("var "+b[0]);for(var e;b.length&&(e=b.shift());)!b.length&&c!==f?d[e]=c:d=d[e]?d[e]:d[e]={}},u=function(a,c){function b(){}b.prototype=c.prototype;a.s=c.prototype;a.prototype=new b}; 983Function.prototype.bind=Function.prototype.bind||function(a,c){if(1<arguments.length){var b=Array.prototype.slice.call(arguments,1);b.unshift(this,a);return s.apply(g,b)}return s(this,a)};var v=function(a){this.stack=Error().stack||"";a&&(this.message=""+a)};u(v,Error);v.prototype.name="CustomError";var da=function(a,c){for(var b=1;b<arguments.length;b++)var d=(""+arguments[b]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a};var w=function(a,c){c.unshift(a);v.call(this,da.apply(g,c));c.shift()};u(w,v);w.prototype.name="AssertionError";var x=function(a,c,b){if(!a){var d=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(c)var e=e+(": "+c),h=d;throw new w(""+e,h||[]);}};var y=Array.prototype,ea=y.indexOf?function(a,c,b){x(a.length!=g);return y.indexOf.call(a,c,b)}:function(a,c,b){b=b==g?0:0>b?Math.max(0,a.length+b):b;if(n(a))return!n(c)||1!=c.length?-1:a.indexOf(c,b);for(;b<a.length;b++)if(b in a&&a[b]===c)return b;return-1},fa=y.forEach?function(a,c,b){x(a.length!=g);y.forEach.call(a,c,b)}:function(a,c,b){for(var d=a.length,e=n(a)?a.split(""):a,h=0;h<d;h++)h in e&&c.call(b,e[h],h,a)},ga=function(a,c,b){x(a.length!=g);return 2>=arguments.length?y.slice.call(a,c): 984y.slice.call(a,c,b)};var ha=function(a){var c=z,b;for(b in c)if(a.call(f,c[b],b,c))return b};var A,B,C,D,ia=function(){return l.navigator?l.navigator.userAgent:g};D=C=B=A=i;var E;if(E=ia()){var ja=l.navigator;A=0==E.indexOf("Opera");B=!A&&-1!=E.indexOf("MSIE");C=!A&&-1!=E.indexOf("WebKit");D=!A&&!C&&"Gecko"==ja.product}var F=B,G=D,H=C,I; 985a:{var J="",K;if(A&&l.opera)var L=l.opera.version,J="function"==typeof L?L():L;else if(G?K=/rv\:([^\);]+)(\)|;)/:F?K=/MSIE\s+([^\);]+)(\)|;)/:H&&(K=/WebKit\/(\S+)/),K)var ka=K.exec(ia()),J=ka?ka[1]:"";if(F){var M,la=l.document;M=la?la.documentMode:f;if(M>parseFloat(J)){I=""+M;break a}}I=J} 986var ma=I,na={},N=function(a){var c;if(!(c=na[a])){c=0;for(var b=(""+ma).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=(""+a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(b.length,d.length),h=0;0==c&&h<e;h++){var k=b[h]||"",r=d[h]||"",xa=RegExp("(\\d*)(\\D*)","g"),ya=RegExp("(\\d*)(\\D*)","g");do{var o=xa.exec(k)||["","",""],p=ya.exec(r)||["","",""];if(0==o[0].length&&0==p[0].length)break;c=((0==o[1].length?0:parseInt(o[1],10))<(0==p[1].length?0:parseInt(p[1],10))?-1:(0==o[1].length? 9870:parseInt(o[1],10))>(0==p[1].length?0:parseInt(p[1],10))?1:0)||((0==o[2].length)<(0==p[2].length)?-1:(0==o[2].length)>(0==p[2].length)?1:0)||(o[2]<p[2]?-1:o[2]>p[2]?1:0)}while(0==c)}c=na[a]=0<=c}return c},oa={},pa=function(){return oa[9]||(oa[9]=F&&!!document.documentMode&&9<=document.documentMode)};!F||pa();!G&&!F||F&&pa()||G&&N("1.9.1");F&&N("9");var qa=function(){};var O=function(){this.d=[];this.f={}};u(O,qa);O.prototype.l=1;O.prototype.h=0;var ra=function(a,c,b){var d=a.f[c];d||(d=a.f[c]=[]);var e=a.l;a.d[e]=c;a.d[e+1]=b;a.d[e+2]=f;a.l=e+3;d.push(e)}; 988O.prototype.r=function(a,c){var b=this.f[a];if(b){this.h++;for(var d=ga(arguments,1),e=0,h=b.length;e<h;e++){var k=b[e];this.d[k+1].apply(this.d[k+2],d)}this.h--;if(this.g&&0==this.h)for(;b=this.g.pop();)if(0!=this.h)this.g||(this.g=[]),this.g.push(b);else if(d=this.d[b]){if(d=this.f[d])e=d,d=ea(e,b),0<=d&&(x(e.length!=g),y.splice.call(e,d,1));delete this.d[b];delete this.d[b+1];delete this.d[b+2]}}};var sa=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),ta=function(a){if
988(P){P=i;var c=l.location;if(c){var b=c.href;if(b&&(b=(b=ta(b)[3]||g)&&decodeURIComponent(b))&&b!=c.hostname)throw P=!0,Error();}}return a.match(sa)},P=H;var Q=m("yt.dom.getNextId_");if(!Q){Q=function(){return++ua};t("yt.dom.getNextId_",Q);var ua=0};var va=function(a){if(a=a||m("window.event")){this.type=a.type;var c=a.target||a.srcElement;c&&3==c.nodeType&&(c=c.parentNode);this.target=c;if(c=a.relatedTarget)try{c=c.nodeName&&c}catch(b){c=g}else"mouseover"==this.type?c=a.fromElement:"mouseout"==this.type&&(c=a.toElement);this.relatedTarget=c;this.data=a.data;this.source=a.source;this.origin=a.origin;this.state=a.state;this.clientX=a.clientX!==f?a.clientX:a.pageX;this.clientY=a.clientY!==f?a.clientY:a.pageY;if(a.pageX||a.pageY)this.pageX=a.pageX, 989this.pageY=a.pageY;else if((a.clientX||a.clientY)&&document.body&&document.documentElement)this.pageX=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.pageY=a.clientY+document.body.scrollTop+document.documentElement.scrollTop;this.keyCode=a.keyCode?a.keyCode:a.which;this.charCode=a.charCode||("keypress"==this.type?this.keyCode:0);this.altKey=a.altKey;this.ctrlKey=a.ctrlKey;this.shiftKey=a.shiftKey;0==this.type.indexOf("touch")&&(this.touches=a.touches,this.changedTouches= 990a.changedTouches);0==this.type.indexOf("gesture")&&(this.scale=a.scale,this.rotation=a.rotation)}};j=va.prototype;j.type="";j.target=g;j.relatedTarget=g;j.currentTarget=g;j.data=g;j.source=g;j.origin=g;j.state=g;j.keyCode=0;j.charCode=0;j.altKey=i;j.ctrlKey=i;j.shiftKey=i;j.clientX=0;j.clientY=0;j.pageX=0;j.pageY=0;j.touches=g;j.changedTouches=g;var z=m("yt.events.listeners_")||{};t("yt.events.listeners_",z);var wa=m("yt.events.counter_")||{count:0};t("yt.events.counter_",wa);var za=function(a,c){return ha(function(b){return b[0]==a&&"message"==b[1]&&b[2]==c&&b[4]==i})}
990,Aa=function(a,c){if(a&&(a.addEventListener||a.attachEvent)){var b=za(a,c);if(!b){var b=++wa.count+"",d=function(b){b=new va(b);b.currentTarget=a;return c.call(a,b)};z[b]=[a,"message",c,d,i];a.addEventListener?a.addEventListener("message",d,i):a.attachEvent("onmessage",d)}}};t("yt.config_",window.yt&&window.yt.config_||{});t("yt.globals_",window.yt&&window.yt.globals_||{});t("yt.msgs_",window.yt&&window.yt.msgs_||{});t("yt.timeouts_",window.yt&&window.yt.timeouts_||[]);var Ba=window.yt&&window.yt.intervals_||[];t("yt.intervals_",Ba);eval("/*@cc_on!@*/false");var Ca=window.YTConfig||{},R=function(a){this.p=a||{};this.c={};this.c.width=640;this.c.height=390;this.c.title="";this.c.host=("https:"==document.location.protocol?"https:":"http:")+"//www.youtube.com"},S=g,T=function(a,c){return a.p[c]||Ca[c]||a.c[c]};R.prototype.o=function(a){a.origin==T(this,"host")&&(a=JSON.parse(a.data),S[a.id].m(a))}; 991var U=function(a,c){this.b=c;this.j=this.a=g;this.i=this.id=0;this.pubsub=g;var b=n(a)?document.getElementById(a):a;if(b){if("iframe"!=b.tagName.toLowerCase()){var d=document.createElement("div");d.innerHTML+=m("YT.embed_template");d=d||document;d=d.querySelectorAll&&d.querySelector&&(!H||"CSS1Compat"==document.compatMode||N("528"))?d.querySelectorAll("IFRAME"):d.getElementsByTagName("IFRAME");for(var d=d.length?d[0]:g,e=0,h=b.attributes.length;e<h;e++)d.setAttribute(b.attributes[e].name,b.attributes[e].value); 992d.removeAttribute("width");d.removeAttribute("height");d.removeAttribute("src");d.setAttribute("title","YouTube "+T(this.b,"title"));d.height=T(this.b,"height");d.width=T(this.b,"width");d.src=this.k();this.j=b;(e=b.parentNode)&&e.replaceChild(d,b);b=d}this.a=b;this.id=this[q]||(this[q]=++aa);if(window.JSON&&window.postMessage){this.pubsub=new O;b=this.b;d=this.id;S||(S={},Aa(window,s(b.o,b)));S[d]=this;b=s(this.n,this);b=window.setInterval(b,250);Ba.push(b);this.i=b;var b=T(this.b,"events"),k;for(k in b)b.hasOwnProperty(k)&& 993this.addEventListener(k,b[k])}}};U.prototype.destroy=function(){if(this.j){var a=this.a,c=a.parentNode;c&&c.replaceChild(this.j,a)}else(a=this.a)&&a.parentNode&&a.parentNode.removeChild(a)};U.prototype.n=function(){this.a&&this.a.contentWindow?Da(this,{event:"listening"}):window.clearInterval(this.i)};U.prototype.addEventListener=function(a,c){var b=c;"string"==typeof c&&(b=function(){window[c].apply(window,arguments)});ra(this.pubsub,a,b);return this}; 994var V=function(a,c,b){a.pubsub.r(c,{target:a,data:b})},Ea=function(a,c,b){b=b||[];b=Array.prototype.slice.call(b);Da(a,{event:"command",func:c,args:b})},Da=function(a,c){c.id=a.id;var b=JSON.stringify(c),d=ta(a.a.src),e=d[1],h=d[2],k=d[3],d=d[4],r=[];e&&r.push(e,":");k&&(r.push("//"),h&&r.push(h,"@"),r.push(k),d&&r.push(":",d));a.a.contentWindow.postMessage(b,r.join(""))};U.prototype.setSize=function(a,c){this.a.width=a;this.a.height=c;return this};U.prototype.q=function(){return this.a};var Fa={"0":"onEnded",1:"onPlaying",2:"onPaused",3:"onBuffering",5:"onVideoCued"},W=function(a){R.call(this,a);this.c.title="video player";this.c.apiReady="onYouTubePlayerAPIReady";this.c.videoId=""};u(W,R);var X=function(a,c){U.call(this,a,new W(c));this.e={}};u(X,U); 995X.prototype.k=function(){var a=T(this.b,"playerVars")||[];a.enablejsapi=1;window.location.host&&(a.origin=window.location.protocol+"//"+window.location.host);var c=[],b;for(b in a)a.hasOwnProperty(b)&&c.push(b+"="+a[b]);return T(this.b,"host")+"/embed/"+T(this.b,"videoId")+"?"+c.join("&")}; 996X.prototype.m=function(a){switch(a.event){case "onReady":window.clearInterval(this.i);V(this,"onReady");break;case "onStateChange":var c=a.info.playerState;Y(this,a);V(this,"onStateChange",c);-1!=c&&V(this,Fa[c]);break;case "onPlaybackQualityChange":Y(this,a);V(this,"onPlaybackQualityChange",this.e.playbackQuality);break;case "onError":V(this,"onError",a.error);break;case "infoDelivery":Y(this,a);break;case "initialDelivery":Ga(this,a.apiInterface),Y(this,a)}}; 997var Y=function(a,c){var b=c.info||{},d;for(d in b)a.e[d]=b[d]},Ga=function(a,c){fa(c,function(a){this[a]||(this[a]=0==a.search("cue")||0==a.search("load")?function(){this.e={};Ea(this,a,arguments);return this}:0==a.search("get")||0==a.search("is")?function(){var c=this.e,e=0;0==a.search("get")?e=3:0==a.search("is")&&(e=2);return c[a.charAt(e).toLowerCase()+a.substr(e+1)]}:function(){Ea(this,a,arguments);return this})},a)}; 998X.prototype.getVideoEmbedCode=function(){var a=this.a.cloneNode(i),c=this.e.videoData,b=T(this.b,"host");a.src=c&&c.video_id?b+"/embed/"+c.video_id:a.src;c=document.createElement("div");c.appendChild(a);return c.innerHTML};var Z=function(a){R.call(this,a);this.c.title="upload widget";this.c.apiReady="onYouTubeUploadWidgetReady"};u(Z,R);var $=function(a,c){U.call(this,a,new Z(c))};u($,U);$.prototype.k=function(){return T(this.b,"host")+"/upload_embed?action_widget=1"};$.prototype.m=function(a){switch(a.event){case "onUploadSuccess":V(this,"onUploadSuccess",a.videoId)}};t("YT.PlayerState.ENDED",0);t("YT.PlayerState.PLAYING",1);t("YT.PlayerState.PAUSED",2);t("YT.PlayerState.BUFFERING",3);t("YT.PlayerState.CUED",5);t("YT.Player",X);t("YT.UploadWidget",$);X.prototype.destroy=X.prototype.destroy;X.prototype.setSize=X.prototype.setSize;X.prototype.getVideoEmbedCode=X.prototype.getVideoEmbedCode;X.prototype.getIframe=X.prototype.q;X.prototype.addEventListener=X.prototype.addEventListener;var Ha=function(a){(a=m(T(a,"apiReady")))&&a()};Ha(new W);Ha(new Z);})();
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.