var $ = jQuery; var mail = new Object(); mail = { 'name' : "Error, fill all required fields ( name )", 'email' : "Error, fill all required fields ( email )", 'message' : "Error, fill all required fields ( message )" }; /* ================================================================================================================================================ */ /* SLIDESHOW */ /* ================================================================================================================================================ */ /* * jQuery Orbit Plugin 1.3.0 * www.ZURB.com/playground * Copyright 2010, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function($) { var ORBIT = { defaults: { animation: 'horizontal-push', // fade, horizontal-slide, vertical-slide, horizontal-push, vertical-push animationSpeed: 600, // how fast animtions are timer: true, // true or false to have the timer advanceSpeed: 4000, // if timer is enabled, time between transitions pauseOnHover: false, // if you hover pauses the slider startClockOnMouseOut: false, // if clock should start on MouseOut startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again directionalNav: true, // manual advancing directional navs captions: true, // do you want captions? captionAnimation: 'fade', // fade, slideOpen, none captionAnimationSpeed: 600, // if so how quickly should they animate in bullets: false, // true or false to activate the bullet navigation bulletThumbs: false, // thumbnails for the bullets bulletThumbLocation: '', // location from this file where thumbs will be afterSlideChange: $.noop, // empty function fluid: false, // true or ratio (ex: 4x3) to force an aspect ratio for content slides, only works from within a fluid layout centerBullets: true // center bullet nav with js, turn this off if you want to position the bullet nav manually }, activeSlide: 0, numberSlides: 0, orbitWidth: null, orbitHeight: null, locked: null, timerRunning: null, degrees: 0, wrapperHTML: '
', timerHTML: '
', captionHTML: '
', directionalNavHTML: '
RightLeft
', bulletHTML: '', init: function (element, options) { var $imageSlides, imagesLoadedCount = 0, self = this; // Bind functions to correct context this.clickTimer = $.proxy(this.clickTimer, this); this.addBullet = $.proxy(this.addBullet, this); this.resetAndUnlock = $.proxy(this.resetAndUnlock, this); this.stopClock = $.proxy(this.stopClock, this); this.startTimerAfterMouseLeave = $.proxy(this.startTimerAfterMouseLeave, this); this.clearClockMouseLeaveTimer = $.proxy(this.clearClockMouseLeaveTimer, this); this.rotateTimer = $.proxy(this.rotateTimer, this); this.options = $.extend({}, this.defaults, options); if (this.options.timer === 'false') this.options.timer = false; if (this.options.captions === 'false') this.options.captions = false; if (this.options.directionalNav === 'false') this.options.directionalNav = false; this.$element = $(element); this.$wrapper = this.$element.wrap(this.wrapperHTML).parent(); this.$slides = this.$element.children('img, a, div'); if (this.options.fluid) { this.$wrapper.addClass('fluid'); } this.$element.bind('orbit.next', function () { self.shift('next'); }); this.$element.bind('orbit.prev', function () { self.shift('prev'); }); this.$element.bind('orbit.goto', function (event, index) { self.shift(index); }); this.$element.bind('orbit.start', function (event, index) { self.startClock(); }); this.$element.bind('orbit.stop', function (event, index) { self.stopClock(); }); $imageSlides = this.$slides.filter('img'); if ($imageSlides.length === 0) { this.loaded(); } else { $imageSlides.bind('imageready', function () { imagesLoadedCount += 1; if (imagesLoadedCount === $imageSlides.length) { self.loaded(); } }); } }, loaded: function () { this.$element .addClass('orbit') .css({width: '1px', height: '1px'}); this.setDimentionsFromLargestSlide(); this.updateOptionsIfOnlyOneSlide(); this.setupFirstSlide(); if (this.options.timer) { this.setupTimer(); this.startClock(); } if (this.options.captions) { this.setupCaptions(); } if (this.options.directionalNav) { this.setupDirectionalNav(); } if (this.options.bullets) { this.setupBulletNav(); this.setActiveBullet(); } }, currentSlide: function () { return this.$slides.eq(this.activeSlide); }, setDimentionsFromLargestSlide: function () { //Collect all slides and set slider size of largest image var self = this, $fluidPlaceholder; self.$element.add(self.$wrapper).width(this.$slides.first().width()); self.$element.add(self.$wrapper).height(this.$slides.first().height()); self.orbitWidth = this.$slides.first().width(); self.orbitHeight = this.$slides.first().height(); $fluidPlaceholder = this.$slides.first().clone(); this.$slides.each(function () { var slide = $(this), slideWidth = slide.width(), slideHeight = slide.height(); if (slideWidth > self.$element.width()) { self.$element.add(self.$wrapper).width(slideWidth); self.orbitWidth = self.$element.width(); } if (slideHeight > self.$element.height()) { self.$element.add(self.$wrapper).height(slideHeight); self.orbitHeight = self.$element.height(); $fluidPlaceholder = $(this).clone(); } self.numberSlides += 1; }); if (this.options.fluid) { if (typeof this.options.fluid === "string") { $fluidPlaceholder = $('') } self.$element.prepend($fluidPlaceholder); $fluidPlaceholder.addClass('fluid-placeholder'); self.$element.add(self.$wrapper).css({width: 'inherit'}); self.$element.add(self.$wrapper).css({height: 'inherit'}); $(window).bind('resize', function () { self.orbitWidth = self.$element.width(); self.orbitHeight = self.$element.height(); }); } }, //Animation locking functions lock: function () { this.locked = true; }, unlock: function () { this.locked = false; }, updateOptionsIfOnlyOneSlide: function () { if(this.$slides.length === 1) { this.options.directionalNav = false; this.options.timer = false; this.options.bullets = false; } }, setupFirstSlide: function () { //Set initial front photo z-index and fades it in var self = this; this.$slides.first() .css({"z-index" : 3}) .fadeIn(function() { //brings in all other slides IF css declares a display: none self.$slides.css({"display":"block"}) }); }, startClock: function () { var self = this; if(!this.options.timer) { return false; } if (this.$timer.is(':hidden')) { this.clock = setInterval(function () { self.$element.trigger('orbit.next'); }, this.options.advanceSpeed); } else { this.timerRunning = true; this.$pause.removeClass('active') this.clock = setInterval(this.rotateTimer, this.options.advanceSpeed / 180); } }, rotateTimer: function () { var degreeCSS = "rotate(" + this.degrees + "deg)" this.degrees += 2; this.$rotator.css({ "-webkit-transform": degreeCSS, "-moz-transform": degreeCSS, "-o-transform": degreeCSS }); if(this.degrees > 180) { this.$rotator.addClass('move'); this.$mask.addClass('move'); } if(this.degrees > 360) { this.$rotator.removeClass('move'); this.$mask.removeClass('move'); this.degrees = 0; this.$element.trigger('orbit.next'); } }, stopClock: function () { if (!this.options.timer) { return false; } else { this.timerRunning = false; clearInterval(this.clock); this.$pause.addClass('active'); } }, setupTimer: function () { this.$timer = $(this.timerHTML); this.$wrapper.append(this.$timer); this.$rotator = this.$timer.find('.rotator'); this.$mask = this.$timer.find('.mask'); this.$pause = this.$timer.find('.pause'); this.$timer.click(this.clickTimer); if (this.options.startClockOnMouseOut) { this.$wrapper.mouseleave(this.startTimerAfterMouseLeave); this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer); } if (this.options.pauseOnHover) { this.$wrapper.mouseenter(this.stopClock); } }, startTimerAfterMouseLeave: function () { var self = this; this.outTimer = setTimeout(function() { if(!self.timerRunning){ self.startClock(); } }, this.options.startClockOnMouseOutAfter) }, clearClockMouseLeaveTimer: function () { clearTimeout(this.outTimer); }, clickTimer: function () { if(!this.timerRunning) { this.startClock(); } else { this.stopClock(); } }, setupCaptions: function () { this.$caption = $(this.captionHTML); this.$wrapper.append(this.$caption); this.setCaption(); }, setCaption: function () { var captionLocation = this.currentSlide().attr('data-caption'), captionHTML; if (!this.options.captions) { return false; } //Set HTML for the caption if it exists if (captionLocation) { captionHTML = $(captionLocation).html(); //get HTML from the matching HTML entity this.$caption .attr('id', captionLocation) // Add ID caption TODO why is the id being set? .html(captionHTML); // Change HTML in Caption //Animations for Caption entrances switch (this.options.captionAnimation) { case 'none': this.$caption.show(); break; case 'fade': this.$caption.fadeIn(this.options.captionAnimationSpeed); break; case 'slideOpen': this.$caption.slideDown(this.options.captionAnimationSpeed); break; } } else { //Animations for Caption exits switch (this.options.captionAnimation) { case 'none': this.$caption.hide(); break; case 'fade': this.$caption.fadeOut(this.options.captionAnimationSpeed); break; case 'slideOpen': this.$caption.slideUp(this.options.captionAnimationSpeed); break; } } }, setupDirectionalNav: function () { var self = this; this.$wrapper.append(this.directionalNavHTML); this.$wrapper.find('.left').click(function () { self.stopClock(); self.$element.trigger('orbit.prev'); }); this.$wrapper.find('.right').click(function () { self.stopClock(); self.$element.trigger('orbit.next'); }); }, setupBulletNav: function () { this.$bullets = $(this.bulletHTML); this.$wrapper.append(this.$bullets); this.$slides.each(this.addBullet); this.$element.addClass('with-bullets'); if (this.options.centerBullets) this.$bullets.css('margin-left', -this.$bullets.width() / 2); }, addBullet: function (index, slide) { var position = index + 1, $li = $('
  • ' + (position) + '
  • '), thumbName, self = this; if (this.options.bulletThumbs) { thumbName = $(slide).attr('data-thumb'); if (thumbName) { $li .addClass('has-thumb') .css({background: "url(" + this.options.bulletThumbLocation + thumbName + ") no-repeat"});; } } this.$bullets.append($li); $li.data('index', index); $li.click(function () { self.stopClock(); self.$element.trigger('orbit.goto', [$li.data('index')]) }); }, setActiveBullet: function () { if(!this.options.bullets) { return false; } else { this.$bullets.find('li') .removeClass('active') .eq(this.activeSlide) .addClass('active'); } }, resetAndUnlock: function () { this.$slides .eq(this.prevActiveSlide) .css({"z-index" : 1}); this.unlock(); this.options.afterSlideChange.call(this, this.$slides.eq(this.prevActiveSlide), this.$slides.eq(this.activeSlide)); }, shift: function (direction) { var slideDirection = direction; //remember previous activeSlide this.prevActiveSlide = this.activeSlide; //exit function if bullet clicked is same as the current image if (this.prevActiveSlide == slideDirection) { return false; } if (this.$slides.length == "1") { return false; } if (!this.locked) { this.lock(); //deduce the proper activeImage if (direction == "next") { this.activeSlide++; if (this.activeSlide == this.numberSlides) { this.activeSlide = 0; } } else if (direction == "prev") { this.activeSlide-- if (this.activeSlide < 0) { this.activeSlide = this.numberSlides - 1; } } else { this.activeSlide = direction; if (this.prevActiveSlide < this.activeSlide) { slideDirection = "next"; } else if (this.prevActiveSlide > this.activeSlide) { slideDirection = "prev" } } //set to correct bullet this.setActiveBullet(); //set previous slide z-index to one below what new activeSlide will be this.$slides .eq(this.prevActiveSlide) .css({"z-index" : 2}); //fade if (this.options.animation == "fade") { this.$slides .eq(this.activeSlide) .css({"opacity" : 0, "z-index" : 3}) .animate({"opacity" : 1}, this.options.animationSpeed, this.resetAndUnlock); } //horizontal-slide if (this.options.animation == "horizontal-slide") { if (slideDirection == "next") { this.$slides .eq(this.activeSlide) .css({"left": this.orbitWidth, "z-index" : 3}) .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock); } if (slideDirection == "prev") { this.$slides .eq(this.activeSlide) .css({"left": -this.orbitWidth, "z-index" : 3}) .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock); } } //vertical-slide if (this.options.animation == "vertical-slide") { if (slideDirection == "prev") { this.$slides .eq(this.activeSlide) .css({"top": this.orbitHeight, "z-index" : 3}) .animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock); } if (slideDirection == "next") { this.$slides .eq(this.activeSlide) .css({"top": -this.orbitHeight, "z-index" : 3}) .animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock); } } //horizontal-push if (this.options.animation == "horizontal-push") { if (slideDirection == "next") { this.$slides .eq(this.activeSlide) .css({"left": this.orbitWidth, "z-index" : 3}) .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock); this.$slides .eq(this.prevActiveSlide) .animate({"left" : -this.orbitWidth}, this.options.animationSpeed); } if (slideDirection == "prev") { this.$slides .eq(this.activeSlide) .css({"left": -this.orbitWidth, "z-index" : 3}) .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock); this.$slides .eq(this.prevActiveSlide) .animate({"left" : this.orbitWidth}, this.options.animationSpeed); } } //vertical-push if (this.options.animation == "vertical-push") { if (slideDirection == "next") { this.$slides .eq(this.activeSlide) .css({top: -this.orbitHeight, "z-index" : 3}) .animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock); this.$slides .eq(this.prevActiveSlide) .animate({top : this.orbitHeight}, this.options.animationSpeed); } if (slideDirection == "prev") { this.$slides .eq(this.activeSlide) .css({top: this.orbitHeight, "z-index" : 3}) .animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock); this.$slides .eq(this.prevActiveSlide) .animate({top : -this.orbitHeight}, this.options.animationSpeed); } } this.setCaption(); } } }; $.fn.orbit = function (options) { return this.each(function () { var orbit = $.extend({}, ORBIT); orbit.init(this, options); }); }; })(jQuery); /*! * jQuery imageready Plugin * http://www.zurb.com/playground/ * * Copyright 2011, ZURB * Released under the MIT License */ (function ($) { var options = {}; $.event.special.imageready = { setup: function (data, namespaces, eventHandle) { options = data || options; }, add: function (handleObj) { var $this = $(this), src; if ( this.nodeType === 1 && this.tagName.toLowerCase() === 'img' && this.src !== '' ) { if (options.forceLoad) { src = $this.attr('src'); $this.attr('src', ''); bindToLoad(this, handleObj.handler); $this.attr('src', src); } else if ( this.complete || this.readyState === 4 ) { handleObj.handler.apply(this, arguments); } else { bindToLoad(this, handleObj.handler); } } }, teardown: function (namespaces) { $(this).unbind('.imageready'); } }; function bindToLoad(element, callback) { var $this = $(element); $this.bind('load.imageready', function () { callback.apply(element, arguments); $this.unbind('load.imageready'); }); } }(jQuery));/* Foundation v2.2 http://foundation.zurb.com */ (function(a){a("a[data-reveal-id]").live("click",function(c){c.preventDefault();var b=a(this).attr("data-reveal-id");a("#"+b).reveal(a(this).data())});a.fn.reveal=function(b){var c={animation:"fadeAndPop",animationSpeed:300,closeOnBackgroundClick:true,dismissModalClass:"close-reveal-modal",open:a.noop,opened:a.noop,close:a.noop,closed:a.noop};b=a.extend({},c,b);return this.each(function(){var m=a(this),g=parseInt(m.css("top"),10),i=m.height()+g,h=false,e=a(".reveal-modal-bg"),d;if(e.length===0){e=a('
    ').insertAfter(m);e.fadeTo("fast",0.8)}function j(){h=false}function n(){h=true}function k(){if(!h){n();if(b.animation==="fadeAndPop"){m.css({top:a(document).scrollTop()-i,opacity:0,visibility:"visible"});e.fadeIn(b.animationSpeed/2);m.delay(b.animationSpeed/2).animate({top:a(document).scrollTop()+g+"px",opacity:1},b.animationSpeed,function(){m.trigger("reveal:opened")})}if(b.animation==="fade"){m.css({opacity:0,visibility:"visible",top:a(document).scrollTop()+g});e.fadeIn(b.animationSpeed/2);m.delay(b.animationSpeed/2).animate({opacity:1},b.animationSpeed,function(){m.trigger("reveal:opened")})}if(b.animation==="none"){m.css({visibility:"visible",top:a(document).scrollTop()+g});e.css({display:"block"});m.trigger("reveal:opened")}}}m.bind("reveal:open.reveal",k);function f(){if(!h){n();if(b.animation==="fadeAndPop"){m.animate({top:a(document).scrollTop()-i+"px",opacity:0},b.animationSpeed/2,function(){m.css({top:g,opacity:1,visibility:"hidden"})});e.delay(b.animationSpeed).fadeOut(b.animationSpeed,function(){m.trigger("reveal:closed")})}if(b.animation==="fade"){m.animate({opacity:0},b.animationSpeed,function(){m.css({opacity:1,visibility:"hidden",top:g})});e.delay(b.animationSpeed).fadeOut(b.animationSpeed,function(){m.trigger("reveal:closed")})}if(b.animation==="none"){m.css({visibility:"hidden",top:g});e.css({display:"none"});m.trigger("reveal:closed")}}}function l(){m.unbind(".reveal");e.unbind(".reveal");a("."+b.dismissModalClass).unbind(".reveal");a("body").unbind(".reveal")}m.bind("reveal:close.reveal",f);m.bind("reveal:opened.reveal reveal:closed.reveal",j);m.bind("reveal:closed.reveal",l);m.bind("reveal:open.reveal",b.open);m.bind("reveal:opened.reveal",b.opened);m.bind("reveal:close.reveal",b.close);m.bind("reveal:closed.reveal",b.closed);m.trigger("reveal:open");d=a("."+b.dismissModalClass).bind("click.reveal",function(){m.trigger("reveal:close")});if(b.closeOnBackgroundClick){e.css({cursor:"pointer"});e.bind("click.reveal",function(){m.trigger("reveal:close")})}a("body").bind("keyup.reveal",function(o){if(o.which===27){m.trigger("reveal:close")}})})}}(jQuery));(function(b){b.fn.findFirstImage=function(){return this.first().find("img").andSelf().filter("img").first()};var a={defaults:{animation:"horizontal-push",animationSpeed:600,timer:true,advanceSpeed:4000,pauseOnHover:false,startClockOnMouseOut:false,startClockOnMouseOutAfter:1000,directionalNav:true,directionalNavRightText:"Right",directionalNavLeftText:"Left",captions:true,captionAnimation:"fade",captionAnimationSpeed:600,bullets:false,bulletThumbs:false,bulletThumbLocation:"",afterSlideChange:b.noop,fluid:true,centerBullets:true},activeSlide:0,numberSlides:0,orbitWidth:null,orbitHeight:null,locked:null,timerRunning:null,degrees:0,wrapperHTML:'
    ',timerHTML:'
    ',captionHTML:'
    ',directionalNavHTML:'
    ',bulletHTML:'
      ',init:function(f,e){var c,g=0,d=this;this.clickTimer=b.proxy(this.clickTimer,this);this.addBullet=b.proxy(this.addBullet,this);this.resetAndUnlock=b.proxy(this.resetAndUnlock,this);this.stopClock=b.proxy(this.stopClock,this);this.startTimerAfterMouseLeave=b.proxy(this.startTimerAfterMouseLeave,this);this.clearClockMouseLeaveTimer=b.proxy(this.clearClockMouseLeaveTimer,this);this.rotateTimer=b.proxy(this.rotateTimer,this);this.options=b.extend({},this.defaults,e);if(this.options.timer==="false"){this.options.timer=false}if(this.options.captions==="false"){this.options.captions=false}if(this.options.directionalNav==="false"){this.options.directionalNav=false}this.$element=b(f);this.$wrapper=this.$element.wrap(this.wrapperHTML).parent();this.$slides=this.$element.children("img, a, div");this.$element.bind("orbit.next",function(){d.shift("next")});this.$element.bind("orbit.prev",function(){d.shift("prev")});this.$element.bind("orbit.goto",function(i,h){d.shift(h)});this.$element.bind("orbit.start",function(i,h){d.startClock()});this.$element.bind("orbit.stop",function(i,h){d.stopClock()});c=this.$slides.filter("img");if(c.length===0){this.loaded()}else{c.bind("imageready",function(){g+=1;if(g===c.length){d.loaded()}})}},loaded:function(){this.$element.addClass("orbit").css({width:"1px",height:"1px"});this.$slides.addClass("orbit-slide");this.setDimentionsFromLargestSlide();this.updateOptionsIfOnlyOneSlide();this.setupFirstSlide();if(this.options.timer){this.setupTimer();this.startClock()}if(this.options.captions){this.setupCaptions()}if(this.options.directionalNav){this.setupDirectionalNav()}if(this.options.bullets){this.setupBulletNav();this.setActiveBullet()}},currentSlide:function(){return this.$slides.eq(this.activeSlide)},setDimentionsFromLargestSlide:function(){var d=this,c;d.$element.add(d.$wrapper).width(this.$slides.first().width());d.$element.add(d.$wrapper).height(this.$slides.first().height());d.orbitWidth=this.$slides.first().width();d.orbitHeight=this.$slides.first().height();c=this.$slides.first().findFirstImage().clone();this.$slides.each(function(){var e=b(this),g=e.width(),f=e.height();if(g>d.$element.width()){d.$element.add(d.$wrapper).width(g);d.orbitWidth=d.$element.width()}if(f>d.$element.height()){d.$element.add(d.$wrapper).height(f);d.orbitHeight=d.$element.height();c=b(this).findFirstImage().clone()}d.numberSlides+=1});if(this.options.fluid){if(typeof this.options.fluid==="string"){c=b('')}d.$element.prepend(c);c.addClass("fluid-placeholder");d.$element.add(d.$wrapper).css({width:"inherit"});d.$element.add(d.$wrapper).css({height:"inherit"});b(window).bind("resize",function(){d.orbitWidth=d.$element.width();d.orbitHeight=d.$element.height()})}},lock:function(){this.locked=true},unlock:function(){this.locked=false},updateOptionsIfOnlyOneSlide:function(){if(this.$slides.length===1){this.options.directionalNav=false;this.options.timer=false;this.options.bullets=false}},setupFirstSlide:function(){var c=this;this.$slides.first().css({"z-index":3}).fadeIn(function(){c.$slides.css({display:"block"})})},startClock:function(){var c=this;if(!this.options.timer){return false}if(this.$timer.is(":hidden")){this.clock=setInterval(function(){c.$element.trigger("orbit.next")},this.options.advanceSpeed)}else{this.timerRunning=true;this.$pause.removeClass("active");this.clock=setInterval(this.rotateTimer,this.options.advanceSpeed/180)}},rotateTimer:function(){var c="rotate("+this.degrees+"deg)";this.degrees+=2;this.$rotator.css({"-webkit-transform":c,"-moz-transform":c,"-o-transform":c});if(this.degrees>180){this.$rotator.addClass("move");this.$mask.addClass("move")}if(this.degrees>360){this.$rotator.removeClass("move");this.$mask.removeClass("move");this.degrees=0;this.$element.trigger("orbit.next")}},stopClock:function(){if(!this.options.timer){return false}else{this.timerRunning=false;clearInterval(this.clock);this.$pause.addClass("active")}},setupTimer:function(){this.$timer=b(this.timerHTML);this.$wrapper.append(this.$timer);this.$rotator=this.$timer.find(".rotator");this.$mask=this.$timer.find(".mask");this.$pause=this.$timer.find(".pause");this.$timer.click(this.clickTimer);if(this.options.startClockOnMouseOut){this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer)}if(this.options.pauseOnHover){this.$wrapper.mouseenter(this.stopClock)}},startTimerAfterMouseLeave:function(){var c=this;this.outTimer=setTimeout(function(){if(!c.timerRunning){c.startClock()}},this.options.startClockOnMouseOutAfter)},clearClockMouseLeaveTimer:function(){clearTimeout(this.outTimer)},clickTimer:function(){if(!this.timerRunning){this.startClock()}else{this.stopClock()}},setupCaptions:function(){this.$caption=b(this.captionHTML);this.$wrapper.append(this.$caption);this.setCaption()},setCaption:function(){var d=this.currentSlide().attr("data-caption"),c;if(!this.options.captions){return false}if(d){c=b(d).html();this.$caption.attr("id",d).html(c);switch(this.options.captionAnimation){case"none":this.$caption.show();break;case"fade":this.$caption.fadeIn(this.options.captionAnimationSpeed);break;case"slideOpen":this.$caption.slideDown(this.options.captionAnimationSpeed);break}}else{switch(this.options.captionAnimation){case"none":this.$caption.hide();break;case"fade":this.$caption.fadeOut(this.options.captionAnimationSpeed);break;case"slideOpen":this.$caption.slideUp(this.options.captionAnimationSpeed);break}}},setupDirectionalNav:function(){var c=this,d=b(this.directionalNavHTML);d.find(".right").html(this.options.directionalNavRightText);d.find(".left").html(this.options.directionalNavLeftText);this.$wrapper.append(d);this.$wrapper.find(".left").click(function(){c.stopClock();c.$element.trigger("orbit.prev")});this.$wrapper.find(".right").click(function(){c.stopClock();c.$element.trigger("orbit.next")})},setupBulletNav:function(){this.$bullets=b(this.bulletHTML);this.$wrapper.append(this.$bullets);this.$slides.each(this.addBullet);this.$element.addClass("with-bullets");if(this.options.centerBullets){this.$bullets.css("margin-left",-this.$bullets.width()/2)}},addBullet:function(g,e){var d=g+1,h=b("
    • "+(d)+"
    • "),c,f=this;if(this.options.bulletThumbs){c=b(e).attr("data-thumb");if(c){h.addClass("has-thumb").css({background:"url("+this.options.bulletThumbLocation+c+") no-repeat"})}}this.$bullets.append(h);h.data("index",g);h.click(function(){f.stopClock();f.$element.trigger("orbit.goto",[h.data("index")])})},setActiveBullet:function(){if(!this.options.bullets){return false}else{this.$bullets.find("li").removeClass("active").eq(this.activeSlide).addClass("active")}},resetAndUnlock:function(){this.$slides.eq(this.prevActiveSlide).css({"z-index":1});this.unlock();this.options.afterSlideChange.call(this,this.$slides.eq(this.prevActiveSlide),this.$slides.eq(this.activeSlide))},shift:function(d){var c=d;this.prevActiveSlide=this.activeSlide;if(this.prevActiveSlide==c){return false}if(this.$slides.length=="1"){return false}if(!this.locked){this.lock();if(d=="next"){this.activeSlide++;if(this.activeSlide==this.numberSlides){this.activeSlide=0}}else{if(d=="prev"){this.activeSlide--;if(this.activeSlide<0){this.activeSlide=this.numberSlides-1}}else{this.activeSlide=d;if(this.prevActiveSlidethis.activeSlide){c="prev"}}}}this.setActiveBullet();this.$slides.eq(this.prevActiveSlide).css({"z-index":2});if(this.options.animation=="fade"){this.$slides.eq(this.activeSlide).css({opacity:0,"z-index":3}).animate({opacity:1},this.options.animationSpeed,this.resetAndUnlock)}if(this.options.animation=="horizontal-slide"){if(c=="next"){this.$slides.eq(this.activeSlide).css({left:this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({left:-this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock)}}if(this.options.animation=="vertical-slide"){if(c=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock)}if(c=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock)}}if(this.options.animation=="horizontal-push"){if(c=="next"){this.$slides.eq(this.activeSlide).css({left:this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({left:-this.orbitWidth},this.options.animationSpeed)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({left:-this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({left:this.orbitWidth},this.options.animationSpeed)}}if(this.options.animation=="vertical-push"){if(c=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({top:this.orbitHeight},this.options.animationSpeed)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({top:-this.orbitHeight},this.options.animationSpeed)}}this.setCaption()}}};b.fn.orbit=function(c){return this.each(function(){var d=b.extend({},a);d.init(this,c)})}})(jQuery); /*! * jQuery imageready Plugin * http://www.zurb.com/playground/ * * Copyright 2011, ZURB * Released under the MIT License */ (function(c){var b={};c.event.special.imageready={setup:function(f,e,d){b=f||b},add:function(d){var e=c(this),f;if(this.nodeType===1&&this.tagName.toLowerCase()==="img"&&this.src!==""){if(b.forceLoad){f=e.attr("src");e.attr("src","");a(this,d.handler);e.attr("src",f)}else{if(this.complete||this.readyState===4){d.handler.apply(this,arguments)}else{a(this,d.handler)}}}},teardown:function(d){c(this).unbind(".imageready")}};function a(d,f){var e=c(d);e.bind("load.imageready",function(){f.apply(d,arguments);e.unbind("load.imageready")})}}(jQuery));jQuery(document).ready(function(c){function b(d){c("form.custom input:"+d).each(function(){var f=c(this).hide(),e=f.next("span.custom."+d);if(e.length===0){e=c('').insertAfter(f)}e.toggleClass("checked",f.is(":checked"));e.toggleClass("disabled",f.is(":disabled"))})}b("checkbox");b("radio");function a(f){var g=c(f),i=g.next("div.custom.dropdown"),d=g.find("option"),e=0,h;if(i.length===0){$customSelectSize="";if(c(f).hasClass("small")){$customSelectSize="small"}else{if(c(f).hasClass("medium")){$customSelectSize="medium"}else{if(c(f).hasClass("large")){$customSelectSize="large"}else{if(c(f).hasClass("expand")){$customSelectSize="expand"}}}}i=c('"');d.each(function(){h=c("
    • "+c(this).html()+"
    • ");i.find("ul").append(h)});i.prepend(''+d.first().html()+"");g.after(i);g.hide()}else{i.find("ul").html("");d.each(function(){h=c("
    • "+c(this).html()+"
    • ");i.find("ul").append(h)})}i.toggleClass("disabled",g.is(":disabled"));d.each(function(j){if(this.selected){i.find("li").eq(j).addClass("selected");i.find(".current").html(c(this).html())}});i.find("li").each(function(){i.addClass("open");if(c(this).outerWidth()>e){e=c(this).outerWidth()}i.removeClass("open")});if(!i.is(".small, .medium, .large, .expand")){i.css("width",e+18+"px");i.find("ul").css("width",e+16+"px")}}c("form.custom select").each(function(){a(this)})});(function(c){function b(e){var f=0,g=e.next();$options=e.find("option");g.find("ul").html("");$options.each(function(){$li=c("
    • "+c(this).html()+"
    • ");g.find("ul").append($li)});$options.each(function(h){if(this.selected){g.find("li").eq(h).addClass("selected");g.find(".current").html(c(this).html())}});g.removeAttr("style").find("ul").removeAttr("style");g.find("li").each(function(){g.addClass("open");if(c(this).outerWidth()>f){f=c(this).outerWidth()}g.removeClass("open")});g.css("width",f+18+"px");g.find("ul").css("width",f+16+"px")}function a(e){var g=e.prev(),f=g[0];if(false==g.is(":disabled")){f.checked=((f.checked)?false:true);e.toggleClass("checked");g.trigger("change")}}function d(e){var g=e.prev(),f=g[0];c('input:radio[name="'+g.attr("name")+'"]').each(function(){c(this).next().removeClass("checked")});f.checked=((f.checked)?false:true);e.toggleClass("checked");g.trigger("change")}c("form.custom span.custom.checkbox").live("click",function(e){e.preventDefault();e.stopPropagation();a(c(this))});c("form.custom span.custom.radio").live("click",function(e){e.preventDefault();e.stopPropagation();d(c(this))});c("form.custom select").live("change",function(e){b(c(this))});c("form.custom label").live("click",function(f){var e=c("#"+c(this).attr("for")),h,g;if(e.length!==0){if(e.attr("type")==="checkbox"){f.preventDefault();h=c(this).find("span.custom.checkbox");a(h)}else{if(e.attr("type")==="radio"){f.preventDefault();g=c(this).find("span.custom.radio");d(g)}}}});c("form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector").live("click",function(f){var h=c(this),g=h.closest("div.custom.dropdown"),e=g.prev();f.preventDefault();if(false==e.is(":disabled")){g.toggleClass("open");if(g.hasClass("open")){c(document).bind("click.customdropdown",function(i){g.removeClass("open");c(document).unbind(".customdropdown")})}else{c(document).unbind(".customdropdown")}}});c("form.custom div.custom.dropdown li").live("click",function(h){var i=c(this),f=i.closest("div.custom.dropdown"),g=f.prev(),e=0;h.preventDefault();h.stopPropagation();i.closest("ul").find("li").removeClass("selected");i.addClass("selected");f.removeClass("open").find("a.current").html(i.html());i.closest("ul").find("li").each(function(j){if(i[0]==this){e=j}});g[0].selectedIndex=e;g.trigger("change")})})(jQuery); /*! http://mths.be/placeholder v1.8.7 by @mathias */ (function(o,m,r){var t="placeholder" in m.createElement("input"),q="placeholder" in m.createElement("textarea"),l=r.fn,k;if(t&&q){k=l.placeholder=function(){return this};k.input=k.textarea=true}else{k=l.placeholder=function(){return this.filter((t?"textarea":":input")+"[placeholder]").not(".placeholder").bind("focus.placeholder",s).bind("blur.placeholder",p).trigger("blur.placeholder").end()};k.input=t;k.textarea=q;r(function(){r(m).delegate("form","submit.placeholder",function(){var a=r(".placeholder",this).each(s);setTimeout(function(){a.each(p)},10)})});r(o).bind("unload.placeholder",function(){r(".placeholder").val("")})}function n(b){var c={},a=/^jQuery\d+$/;r.each(b.attributes,function(d,e){if(e.specified&&!a.test(e.name)){c[e.name]=e.value}});return c}function s(){var a=r(this);if(a.val()===a.attr("placeholder")&&a.hasClass("placeholder")){if(a.data("placeholder-password")){a.hide().next().show().focus().attr("id",a.removeAttr("id").data("placeholder-id"))}else{a.val("").removeClass("placeholder")}}}function p(){var d,e=r(this),c=e,a=this.id;if(e.val()===""){if(e.is(":password")){if(!e.data("placeholder-textinput")){try{d=e.clone().attr({type:"text"})}catch(b){d=r("").attr(r.extend(n(this),{type:"text"}))}d.removeAttr("name").data("placeholder-password",true).data("placeholder-id",a).bind("focus.placeholder",s);e.data("placeholder-textinput",d).data("placeholder-id",a).before(d)}e=e.removeAttr("id").hide().prev().attr("id",a).show()}e.addClass("placeholder").val(e.attr("placeholder"))}else{e.removeClass("placeholder")}}}(this,document,jQuery));(function(c){var b={bodyHeight:0,pollInterval:1000};var a={init:function(d){return this.each(function(){var f=c(".has-tip"),e=c(".tooltip"),g=function(j,i){return''+i+''},h=setInterval(a.isDomResized,b.pollInterval);if(e.length<1){f.each(function(k){var n=c(this),o="foundationTooltip"+k,l=n.attr("title"),j=n.attr("class");n.data("id",o);var m=c(g(o,l));m.addClass(j).removeClass("has-tip").appendTo("body");if(Modernizr.touch){m.append('tap to close ')}a.reposition(n,m,j);m.fadeOut(150)})}c(window).resize(function(){var i=c(".tooltip");i.each(function(){var j=c(this).data();target=f=c(".has-tip"),tip=c(this),classes=tip.attr("class");f.each(function(){(c(this).data().id==j.id)?target=c(this):target=target});a.reposition(target,tip,classes)})});if(Modernizr.touch){c(".tooltip").live("click touchstart touchend",function(i){i.preventDefault();c(this).fadeOut(150)});f.live("click touchstart touchend",function(i){i.preventDefault();c(".tooltip").hide();c("span[data-id="+c(this).data("id")+"].tooltip").fadeIn(150);f.attr("title","")})}else{f.hover(function(){c("span[data-id="+c(this).data("id")+"].tooltip").fadeIn(150);f.attr("title","")},function(){c("span[data-id="+c(this).data("id")+"].tooltip").fadeOut(150)})}})},reposition:function(g,k,e){var d=g.data("width"),l=k.children(".nub"),h=l.outerHeight(),f=l.outerWidth();function j(o,r,p,n,q){o.css({top:r,bottom:n,left:q,right:p})}k.css({top:(g.offset().top+g.outerHeight()+10),left:g.offset().left,width:d});j(l,-h,"auto","auto",10);if(c(window).width()<767){var m=g.parents(".row");k.width(m.outerWidth()-20).css("left",m.offset().left).addClass("tip-override");j(l,-h,"auto","auto",g.offset().left)}else{if(e.indexOf("tip-top")>-1){var i=g.offset().top-k.outerHeight()-h;k.css({top:i,left:g.offset().left,width:d}).removeClass("tip-override");j(l,"auto","auto",-h,"auto")}else{if(e.indexOf("tip-left")>-1){k.css({top:g.offset().top-(g.outerHeight()/2)-(h/2),left:g.offset().left-k.outerWidth()-10,width:d}).removeClass("tip-override");j(l,(k.outerHeight()/2)-(h/2),-h,"auto","auto")}else{if(e.indexOf("tip-right")>-1){k.css({top:g.offset().top-(g.outerHeight()/2)-(h/2),left:g.offset().left+g.outerWidth()+10,width:d}).removeClass("tip-override");j(l,(k.outerHeight()/2)-(h/2),"auto","auto",-h)}}}}},isDomResized:function(){$body=c("body");if(b.bodyHeight!=$body.height()){b.bodyHeight=$body.height();c(window).trigger("resize")}}};c.fn.tooltips=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{c.error("Method "+d+" does not exist on jQuery.tooltips")}}}})(jQuery); jQuery( '#featured' ).ready( function(){ /* Orbit slider */ jQuery('#featured').orbit({ animation: 'horizontal-slide', // fade, horizontal-slide, vertical-slide, horizontal-push animationSpeed: 800, // how fast animtions are timer: true, // true or false to have the timer advanceSpeed: 10000, // if timer is enabled, time between transitions pauseOnHover: true, // if you hover pauses the slider startClockOnMouseOut: false, // if clock should start on MouseOut startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again directionalNav: true, // manual advancing directional navs captions: true, // do you want captions? captionAnimation: 'slideOpen', // fade, slideOpen, none captionAnimationSpeed: 800, // if so how quickly should they animate in bullets: false, // true or false to activate the bullet navigation bulletThumbs: false, // thumbnails for the bullets bulletThumbLocation: '', // location from this file where thumbs will be afterSlideChange: function( prev, current ){ if( jQuery( prev ).find( 'div.row a img' ).length > 0 ){ jQuery( prev ).find( 'div.row a img' ).css( 'padding' , '0px 0px 0px 20px' ); } if( jQuery( current ).find( 'div.row a img' ).length > 0 ){ jQuery( current ).find( 'div.row a img' ).animate({ 'padding-left': '0px' }); } }, // empty function fluid: true }); if( jQuery( '#featured div.content' ).not( '.fluid-placeholder' ).first().find( 'a img' ).length > 0 ){ jQuery( '#featured div.content' ).not( '.fluid-placeholder' ).first().find( 'a img' ).animate({ 'padding-left': '0px' }); } }); /* ================================================================================================================================================ */ /* SUPERFISH , SUPERSUBS */ /* ================================================================================================================================================ */ /* * Superfish v1.4.8 - jQuery menu widget * Copyright (c) 2008 Joel Birch * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt */ ;(function($){ $.fn.superfish = function(op){ var sf = $.fn.superfish, c = sf.c, $arrow = $([' »'].join('')), over = function(){ var $$ = $(this), menu = getMenu($$); clearTimeout(menu.sfTimer); $$.showSuperfishUl().siblings().hideSuperfishUl(); }, out = function(){ var $$ = $(this), menu = getMenu($$), o = sf.op; clearTimeout(menu.sfTimer); menu.sfTimer=setTimeout(function(){ o.retainPath=($.inArray($$[0],o.$path)>-1); $$.hideSuperfishUl(); if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} },o.delay); }, getMenu = function($menu){ var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; sf.op = sf.o[menu.serial]; return menu; }, addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; return this.each(function() { var s = this.serial = sf.o.length; var o = $.extend({},sf.defaults,op); o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ $(this).addClass([o.hoverClass,c.bcClass].join(' ')) .filter('li:has(ul)').removeClass(o.pathClass); }); sf.o[s] = sf.op = o; $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { if (o.autoArrows) addArrow( $('>a:first-child',this) ); }) .not('.'+c.bcClass) .hideSuperfishUl(); var $a = $('a',this); $a.each(function(i){ var $li = $a.eq(i).parents('li'); $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); }); o.onInit.call(this); }).each(function() { var menuClasses = [c.menuClass]; if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); $(this).addClass(menuClasses.join(' ')); }); }; var sf = $.fn.superfish; sf.o = []; sf.op = {}; sf.IE7fix = function(){ var o = sf.op; if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined) this.toggleClass(sf.c.shadowClass+'-off'); }; sf.c = { bcClass : 'sf-breadcrumb', menuClass : 'sf-js-enabled', anchorClass : 'sf-with-ul', arrowClass : 'sf-sub-indicator', shadowClass : 'sf-shadow' }; sf.defaults = { hoverClass : 'sfHover', pathClass : 'overideThisToUse', pathLevels : 1, delay : 800, animation : {opacity:'show'}, speed : 'normal', autoArrows : true, dropShadows : true, disableHI : false, // true disables hoverIntent detection onInit : function(){}, // callback functions onBeforeShow: function(){}, onShow : function(){}, onHide : function(){} }; $.fn.extend({ hideSuperfishUl : function(){ var o = sf.op, not = (o.retainPath===true) ? o.$path : ''; o.retainPath = false; var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) .find('>ul').hide().css('visibility','hidden'); o.onHide.call($ul); return this; }, showSuperfishUl : function(){ var o = sf.op, sh = sf.c.shadowClass+'-off', $ul = this.addClass(o.hoverClass) .find('>ul:hidden').css('visibility','visible'); sf.IE7fix.call($ul); o.onBeforeShow.call($ul); $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); return this; } }); })(jQuery); /* * Supersubs v0.2b - jQuery plugin * Copyright (c) 2008 Joel Birch * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of * their longest list item children. If you use this, please expect bugs and report them * to the jQuery Google Group with the word 'Superfish' in the subject line. * */ ;(function($){ // $ will refer to jQuery within this closure $.fn.supersubs = function(options){ var opts = $.extend({}, $.fn.supersubs.defaults, options); // return original object to support chaining return this.each(function() { // cache selections var $$ = $(this); // support metadata var o = $.meta ? $.extend({}, opts, $$.data()) : opts; // get the font size of menu. // .css('fontSize') returns various results cross-browser, so measure an em dash instead var fontsize = $('').css({ 'padding' : 0, 'position' : 'absolute', 'top' : '-999em', 'width' : 'auto' }).appendTo($$).width(); //clientWidth is faster, but was incorrect here // remove em dash $('#menu-fontsize').remove(); // cache all ul elements $ULs = $$.find('ul'); // loop through each ul in menu $ULs.each(function(i) { // cache this ul var $ul = $ULs.eq(i); // get all (li) children of this ul var $LIs = $ul.children(); // get all anchor grand-children var $As = $LIs.children('a'); // force content to one line and save current float property var liFloat = $LIs.css('white-space','nowrap').css('float'); // remove width restrictions and floats so elements remain vertically stacked var emWidth = $ul.add($LIs).add($As).css({ 'float' : 'none', 'width' : 'auto' }) // this ul will now be shrink-wrapped to longest li due to position:absolute // so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer .end().end()[0].clientWidth / fontsize; // add more width to ensure lines don't turn over at certain sizes in various browsers emWidth += o.extraWidth; // restrict to at least minWidth and at most maxWidth if (emWidth > o.maxWidth) { emWidth = o.maxWidth; } else if (emWidth < o.minWidth) { emWidth = o.minWidth; } emWidth += 'em'; // set ul to width in ems $ul.css('width',emWidth); // restore li floats to avoid IE bugs // set li width to full width of this ul // revert white-space to normal $LIs.css({ 'float' : liFloat, 'width' : '100%', 'white-space' : 'normal' }) // update offset position of descendant ul to reflect new width of parent .each(function(){ var $childUl = $('>ul',this); var offsetDirection = $childUl.css('left')!==undefined ? 'left' : 'right'; $childUl.css(offsetDirection,emWidth); }); }); }); }; // expose defaults $.fn.supersubs.defaults = { minWidth : 9, // requires em unit. maxWidth : 25, // requires em unit. extraWidth : 0 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values }; })(jQuery); // plugin code ends /** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Create a cookie with the given name and value and other optional parameters. * * @example $.cookie('the_cookie', 'the_value'); * @desc Set the value of a cookie. * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); * @desc Create a cookie with all available options. * @example $.cookie('the_cookie', 'the_value'); * @desc Create a session cookie. * @example $.cookie('the_cookie', null); * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain * used when the cookie was set. * * @param String name The name of the cookie. * @param String value The value of the cookie. * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. * If set to null or omitted, the cookie will be a session cookie and will not be retained * when the the browser exits. * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will * require a secure protocol (like HTTPS). * @type undefined * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ /** * Get the value of a cookie with the given name. * * @example $.cookie('the_cookie'); * @desc Get the value of a cookie. * * @param String name The name of the cookie. * @return The value of the cookie. * @type String * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE } // CAUTION: Needed to parenthesize options.path and options.domain // in the following expressions, otherwise they evaluate to undefined // in the packed version for some reason... var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { // only name given, get cookie var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } };/* Mosaic - Sliding Boxes and Captions jQuery Plugin Version 1.0.1 www.buildinternet.com/project/mosaic By Sam Dunn / One Mighty Roar (www.onemightyroar.com) Released under MIT License / GPL License */ (function(a){if(!a.omr){a.omr=new Object()}a.omr.mosaic=function(c,b){var d=this;d.$el=a(c);d.el=c;d.$el.data("omr.mosaic",d);d.init=function(){d.options=a.extend({},a.omr.mosaic.defaultOptions,b);d.load_box()};d.load_box=function(){if(d.options.preload){a(d.options.backdrop,d.el).hide();a(d.options.overlay,d.el).hide();a(window).load(function(){if(d.options.options.animation=="fade"&&a(d.options.overlay,d.el).css("opacity")==0){a(d.options.overlay,d.el).css("filter","alpha(opacity=0)")}a(d.options.overlay,d.el).fadeIn(200,function(){a(d.options.backdrop,d.el).fadeIn(200)});d.allow_hover()})}else{a(d.options.backdrop,d.el).show();a(d.options.overlay,d.el).show();d.allow_hover()}};d.allow_hover=function(){switch(d.options.animation){case"fade":a(d.el).hover(function(){a(d.options.overlay,d.el).stop().fadeTo(d.options.speed,d.options.opacity)},function(){a(d.options.overlay,d.el).stop().fadeTo(d.options.speed,0)});break;case"slide":startX=a(d.options.overlay,d.el).css(d.options.anchor_x)!="auto"?a(d.options.overlay,d.el).css(d.options.anchor_x):"0px";startY=a(d.options.overlay,d.el).css(d.options.anchor_y)!="auto"?a(d.options.overlay,d.el).css(d.options.anchor_y):"0px";var f={};f[d.options.anchor_x]=d.options.hover_x;f[d.options.anchor_y]=d.options.hover_y;var e={};e[d.options.anchor_x]=startX;e[d.options.anchor_y]=startY;a(d.el).hover(function(){a(d.options.overlay,d.el).stop().animate(f,d.options.speed)},function(){a(d.options.overlay,d.el).stop().animate(e,d.options.speed)});break}};d.init()};a.omr.mosaic.defaultOptions={animation:"fade",speed:150,opacity:1,preload:0,anchor_x:"left",anchor_y:"bottom",hover_x:"0px",hover_y:"0px",overlay:".mosaic-overlay",backdrop:".mosaic-backdrop"};a.fn.mosaic=function(b){return this.each(function(){(new a.omr.mosaic(this,b))})}})(jQuery); /* ================================================================================================================================================ */ /* SHOPPING CART */ /* ================================================================================================================================================ */ jQuery(document).ready(function( ){ jQuery('.confirm_payment').click(function() { jQuery('#ajax-indicator').show(); jQuery.post( ajaxurl , { "action" : 'confirm_payment' } , function( data ){ json = eval("(" + data + ")"); if(json['error_msg'] && json['error_msg'] != ''){ jQuery('.response_msg').html('
      '+json['error_msg']+'x
      '); jQuery('#ajax-indicator').hide(); }else{ /*save all data about transaction*/ save_transaction(json); } }); }); jQuery('.addtocart_btn').click(function() { postId = jQuery(this).data('id'); AddToCart(1,postId,'add_item'); }); }); function save_transaction(response_data){ jQuery('.confirm_payment').hide(); jQuery('#shopping_cart_details').hide(); jQuery.post( ajaxurl , { "action" : 'save_transaction', "response_data" : response_data } , function( data ){ json = eval("(" + data + ")"); if(json['success_msg'] && json['success_msg'] != ''){ jQuery('.response_msg').html(json['transaction_details']); //jQuery('.response_msg').html(json['success_msg']); } jQuery('#ajax-indicator').hide(); }); } function AddToCart(qty,post_id,cart_action){ jQuery('#ajax-indicator').show(); jQuery.post( ajaxurl , { "action" : 'add_to_cart' , //"item_id" : item_id, "qty" : qty, "post_id" : post_id, "cart_action" : cart_action } , function( data ){ json = eval("(" + data + ")"); if(json['error_msg'] && json['error_msg'] != ''){ alert(json['error_msg']); jQuery('#ajax-indicator').hide(); }else{ if(cart_action == 'update_cart'){ get_shopping_cart_details(); }else{ /*redirect to shopping cart page*/ jQuery.post( ajaxurl , { "action" : 'redirect_shopping_cart' } , function( data ){ jQuery('#ajax-indicator').hide(); window.location = data; }); /*jQuery.post( ajaxurl , { "action" : 'get_cart_total' } , function( data ){ jQuery('#shopping-cart').html(data); jQuery('#ajax-indicator').hide(); });*/ } } }); } /*this fnction is triggered when user changes the qty value from the input, on ht e shopping cart page*/ function update_shopping_cart( obj, post_id){ jQuery('#ajax-indicator').show(); if(obj.val() == ''){ obj.val('1'); } AddToCart(obj.val(),post_id,'update_cart'); //we want to run get_shopping_cart_details() function after AddToCart() window.setTimeout("get_shopping_cart_details();", 1); } function get_shopping_cart_details(){ var btn = jQuery('#agreeck').html(); jQuery('#ajax-indicator').show(); jQuery.post( ajaxurl , { "action" : 'get_cart_details_updated' } , function( data ){ json = eval("(" + data + ")"); if(json['payment_amount'] == 0){ jQuery('#paypal_btn').hide(); } jQuery('#shopping_cart_details').html(json['content'] + "
      " + btn + "
      "); jQuery('#ajax-indicator').hide(); }); } function remove_cart_item(item_id,confirm_msg){ if(confirm(confirm_msg)) { jQuery('#ajax-indicator').show(); jQuery.post( ajaxurl , { "action" : 'remove_cart_item' , "item_id" : item_id, "is_ajax" : true } , function( ){ get_shopping_cart_details(); }); } } function registerFree(qty,post_id){ /*alert(1); jQuery('.confirm_payment').hide(); jQuery('#shopping_cart_details').hide();*/ jQuery('#ajax-indicator').show(); jQuery.post( ajaxurl , { "action" : 'save_free_transaction', "qty" : qty, "post_id" : post_id } , function( data ){ json = eval("(" + data + ")"); if(json['success_msg'] && json['success_msg'] != ''){ if(json['redirect_link'] && json['redirect_link'] != ''){ document.location = json['redirect_link']; /*redirect to my payments page*/ }else{ jQuery('.response_msg').html(json['transaction_details']); } }else if(json['error_msg'] && json['error_msg'] != ''){ jQuery('.response_msg').html(json['error_msg']); } jQuery('#ajax-indicator').hide(); }); } /* ================================================================================================================================================ */ /* PRETTY PHOTO */ /* ================================================================================================================================================ */ /* ------------------------------------------------------------------------ Class: prettyPhoto Use: Lightbox clone for jQuery Author: Stephane Caron (http://www.no-margin-for-errors.com) Version: 3.1.6 ------------------------------------------------------------------------- */ !function(e){function t(){var e=location.href;return hashtag=-1!==e.indexOf("#prettyPhoto")?decodeURI(e.substring(e.indexOf("#prettyPhoto")+1,e.length)):!1,hashtag&&(hashtag=hashtag.replace(/<|>/g,"")),hashtag}function i(){"undefined"!=typeof theRel&&(location.hash=theRel+"/"+rel_index+"/")}function p(){-1!==location.href.indexOf("#prettyPhoto")&&(location.hash="prettyPhoto")}function o(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+e+"=([^&#]*)",p=new RegExp(i),o=p.exec(t);return null==o?"":o[1]}e.prettyPhoto={version:"3.1.6"},e.fn.prettyPhoto=function(a){function s(){e(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(I/2-f.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:f.contentHeight,width:f.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left:j/2-f.containerWidth/2<0?0:j/2-f.containerWidth/2,width:f.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(f.height).width(f.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==h(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(f.resized?e("a.pp_expand,a.pp_contract").show():e("a.pp_expand").hide()),!settings.autoplay_slideshow||P||v||e.prettyPhoto.startSlideshow(),settings.changepicturecallback(),v=!0}),m(),a.ajaxcallback()}function n(t){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){e(".pp_loaderIcon").show(),t()})}function r(t){t>1?e(".pp_nav").show():e(".pp_nav").hide()}function l(e,t){if(resized=!1,d(e,t),imageWidth=e,imageHeight=t,(k>j||b>I)&&doresize&&settings.allow_resize&&!$){for(resized=!0,fitting=!1;!fitting;)k>j?(imageWidth=j-200,imageHeight=t/e*imageWidth):b>I?(imageHeight=I-200,imageWidth=e/t*imageHeight):fitting=!0,b=imageHeight,k=imageWidth;(k>j||b>I)&&l(k,b),d(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(b),containerWidth:Math.floor(k)+2*settings.horizontal_padding,contentHeight:Math.floor(y),contentWidth:Math.floor(w),resized:resized}}function d(t,i){t=parseFloat(t),i=parseFloat(i),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(t),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(t),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(e("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),y=i+detailsHeight,w=t,b=y+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),k=t}function h(e){return e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)?"youtube":e.match(/vimeo\.com/i)?"vimeo":e.match(/\b.mov\b/i)?"quicktime":e.match(/\b.swf\b/i)?"flash":e.match(/\biframe=true\b/i)?"iframe":e.match(/\bajax=true\b/i)?"ajax":e.match(/\bcustom=true\b/i)?"custom":"#"==e.substr(0,1)?"inline":"image"}function c(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=_(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=I/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>I)return;$pp_pic_holder.css({top:projectedTop,left:j/2+scroll_pos.scrollLeft-contentwidth/2})}}function _(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function g(){I=e(window).height(),j=e(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(e(document).height()).width(j)}function m(){isSet&&settings.overlay_gallery&&"image"==h(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((f.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject),$pp_pic_holder.find("#pp_full_res").after(toInject),$pp_gallery=e(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").click(function(){return e.prettyPhoto.changeGalleryPage("next"),e.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").click(function(){return e.prettyPhoto.changeGalleryPage("previous"),e.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()}),itemWidth=57,$pp_gallery_li.each(function(t){e(this).find("a").click(function(){return e.prettyPhoto.changePage(t),e.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('Play'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){return e.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:e(document).height(),width:e(window).width()}).bind("click",function(){settings.modal||e.prettyPhoto.close()}),e("a.pp_close").bind("click",function(){return e.prettyPhoto.close(),!1}),settings.allow_expand&&e("a.pp_expand").bind("click",function(){return e(this).hasClass("pp_expand")?(e(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(e(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),n(function(){e.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){return e.prettyPhoto.changePage("previous"),e.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){return e.prettyPhoto.changePage("next"),e.prettyPhoto.stopSlideshow(),!1}),c()}a=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'
       
      ',gallery_markup:'',image_markup:'',flash_markup:'',quicktime_markup:'',iframe_markup:'',inline_markup:'
      {content}
      ',custom_markup:"",social_tools:''},a);var f,v,y,w,b,k,P,x=this,$=!1,I=e(window).height(),j=e(window).width();return doresize=!0,scroll_pos=_(),e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){c(),g()}),a.keyboard_shortcuts&&e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(t){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(t.keyCode){case 37:e.prettyPhoto.changePage("previous"),t.preventDefault();break;case 39:e.prettyPhoto.changePage("next"),t.preventDefault();break;case 27:settings.modal||e.prettyPhoto.close(),t.preventDefault()}}),e.prettyPhoto.initialize=function(){return settings=a,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=e(this).attr(settings.hook),galleryRegExp=/\[(?:.*)\]/,isSet=galleryRegExp.exec(theRel)?!0:!1,pp_images=isSet?jQuery.map(x,function(t){return-1!=e(t).attr(settings.hook).indexOf(theRel)?e(t).attr("href"):void 0}):e.makeArray(e(this).attr("href")),pp_titles=isSet?jQuery.map(x,function(t){return-1!=e(t).attr(settings.hook).indexOf(theRel)?e(t).find("img").attr("alt")?e(t).find("img").attr("alt"):"":void 0}):e.makeArray(e(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(x,function(t){return-1!=e(t).attr(settings.hook).indexOf(theRel)?e(t).attr("title")?e(t).attr("title"):"":void 0}):e.makeArray(e(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(e(this).attr("href"),pp_images),rel_index=isSet?set_position:e("a["+settings.hook+"^='"+theRel+"']").index(e(this)),u(this),settings.allow_resize&&e(window).bind("scroll.prettyphoto",function(){c()}),e.prettyPhoto.open(),!1},e.prettyPhoto.open=function(t){return"undefined"==typeof settings&&(settings=a,pp_images=e.makeArray(arguments[0]),pp_titles=e.makeArray(arguments[1]?arguments[1]:""),pp_descriptions=e.makeArray(arguments[2]?arguments[2]:""),isSet=pp_images.length>1?!0:!1,set_position=arguments[3]?arguments[3]:0,u(t.target)),settings.hideflash&&e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),r(e(pp_images).size()),e(".pp_loaderIcon").show(),settings.deeplinking&&i(),settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link)),$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+e(pp_images).size()),"undefined"!=typeof pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(o("width",pp_images[set_position]))?o("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(o("height",pp_images[set_position]))?o("height",pp_images[set_position]):settings.default_height.toString(),$=!1,-1!=movie_height.indexOf("%")&&(movie_height=parseFloat(e(window).height()*parseFloat(movie_height)/100-150),$=!0),-1!=movie_width.indexOf("%")&&(movie_width=parseFloat(e(window).width()*parseFloat(movie_width)/100-150),$=!0),$pp_pic_holder.fadeIn(function(){switch($ppt.html(settings.show_title&&""!=pp_titles[set_position]&&"undefined"!=typeof pp_titles[set_position]?unescape(pp_titles[set_position]):" "),imgPreloader="",skipInjection=!1,h(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="http://www.youtube.com/embed/"+movie_id,movie+=o("rel",pp_images[set_position])?"?rel="+o("rel",pp_images[set_position]):"?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":f=l(movie_width,movie_height),movie_id=pp_images[set_position];var t=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/,i=movie_id.match(t);movie="http://player.vimeo.com/video/"+i[3]+"?title=0&byline=0&portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=f.width+"/embed/?moog_width="+f.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,f.height).replace(/{path}/g,movie);break;case"quicktime":f=l(movie_width,movie_height),f.height+=15,f.contentHeight+=15,f.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":f=l(movie_width,movie_height),flash_vars=pp_images[set_position],flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length),filename=pp_images[set_position],filename=filename.substring(0,filename.indexOf("?")),toInject=settings.flash_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":f=l(movie_width,movie_height),frame_url=pp_images[set_position],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=settings.iframe_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,f=l(movie_width,movie_height),doresize=!0,skipInjection=!0,e.get(pp_images[set_position],function(e){toInject=settings.inline_markup.replace(/{content}/g,e),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,s()});break;case"custom":f=l(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=e(pp_images[set_position]).clone().append('
      ').css({width:settings.default_width}).wrapInner('
      ').appendTo(e("body")).show(),doresize=!1,f=l(e(myClone).width(),e(myClone).height()),doresize=!0,e(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,e(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,s())}),!1},e.prettyPhoto.changePage=function(t){currentGalleryPage=0,"previous"==t?(set_position--,set_position<0&&(set_position=e(pp_images).size()-1)):"next"==t?(set_position++,set_position>e(pp_images).size()-1&&(set_position=0)):set_position=t,rel_index=set_position,doresize||(doresize=!0),settings.allow_expand&&e(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),n(function(){e.prettyPhoto.open()})},e.prettyPhoto.changeGalleryPage=function(e){"next"==e?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==e?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=e,slide_speed="next"==e||"previous"==e?settings.animation_speed:0,slide_to=currentGalleryPage*itemsPerPage*itemWidth,$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},e.prettyPhoto.startSlideshow=function(){"undefined"==typeof P?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){return e.prettyPhoto.stopSlideshow(),!1}),P=setInterval(e.prettyPhoto.startSlideshow,settings.slideshow)):e.prettyPhoto.changePage("next")},e.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){return e.prettyPhoto.startSlideshow(),!1}),clearInterval(P),P=void 0},e.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(e.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){e(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),e(this).remove(),e(window).unbind("scroll.prettyphoto"),p(),settings.callback(),doresize=!0,v=!1,delete settings}))},!pp_alreadyInitialized&&t()&&(pp_alreadyInitialized=!0,hashIndex=t(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){e("a["+a.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.unbind("click.prettyphoto").bind("click.prettyphoto",e.prettyPhoto.initialize)}}(jQuery);var pp_alreadyInitialized=!1;jQuery(document).ready(function(){ /* show images inserted in gallery */ jQuery("a[rel^='prettyPhoto']").prettyPhoto({ autoplay_slideshow: false, theme: 'light_rounded' }); /* show images inserted into post in LightBox */ jQuery("[class*='wp-image-']").parents('a').prettyPhoto({ autoplay_slideshow: false, theme: 'light_rounded' }); jQuery("a[rel^='keyboardtools']").prettyPhoto({ autoplay_slideshow: false, theme: 'light_rounded', social_tools : '' }); }); /* ================================================================================================================================================ */ /* JSCROLL PANEL */ /* ================================================================================================================================================ */ function removePost( postID , homeUrl ){ jQuery(function(){ jQuery.post( ajaxurl , { 'action': 'remove_post', 'post_id': postID } , function (data) { document.location = homeUrl; }); }); } jQuery( window ).load( function(){ jQuery( '.orbit-wrapper .slider-nav' ).hide(); jQuery( '.orbit-wrapper' ).hover( function(){ jQuery( '.orbit-wrapper .slider-nav' ).show(); }); jQuery( '.orbit-wrapper' ).mouseleave( function(){ jQuery( '.orbit-wrapper .slider-nav' ).hide(); }); }); jQuery(document).ready(function(){ /* digit text field */ jQuery('input[type="text"].digit').bind( 'keyup' , function(){ var value = jQuery( this ).val() jQuery( this ).val( value.replace( /[^\d|\.|\,]/g , '' ) ); }); /* Superfish menu */ jQuery("ul.sf-menu").supersubs({ minWidth: 12, maxWidth: 32, extraWidth: 1 }).superfish({ delay: 200, speed: 250 }); /* Deatils div on hover */ jQuery(".hovermore a").hover(function() { var e = this; jQuery(e).find("div").stop().animate({ marginTop: "-8px" }, 250, function() { jQuery(e).find("div").animate({ marginTop: "-8px" }, 250); }); },function(){ var e = this; jQuery(e).find("div").stop().animate({ marginTop: "0px" }, 250, function() { jQuery(e).find("div").animate({ marginTop: "0px" }, 250); }); }); /* Social-media icons annimation */ jQuery(".social-media li").hover(function() { var e = this; jQuery(e).find("a").stop().animate({ marginTop: "-8px" }, 250, function() { jQuery(e).find("a").animate({ marginTop: "-8px" }, 250); }); },function(){ var e = this; jQuery(e).find("a").stop().animate({ marginTop: "0px" }, 250, function() { jQuery(e).find("a").animate({ marginTop: "0px" }, 250); }); }); /*Sponsors images annimation */ /* $(".whitey .cosmo-sponsors li").hover(function() { var e = this; $(e).find("a").stop().animate({ marginTop: "-8px" }, 250, function() { $(e).find("a").animate({ marginTop: "-8px" }, 250); }); },function(){ var e = this; $(e).find("a").stop().animate({ marginTop: "0px" }, 250, function() { $(e).find("a").animate({ marginTop: "0px" }, 250); }); }); */ /* Widget tabber */ jQuery( 'ul.widget_tabber li a' ).click(function(){ jQuery(this).parent('li').parent('ul').find('li').removeClass('active'); jQuery(this).parent('li').parent('ul').parent('div').find( 'div.tab_menu_content.tabs-container').fadeTo( 200 , 0 ); jQuery(this).parent('li').parent('ul').parent('div').find( 'div.tab_menu_content.tabs-container').hide(); jQuery( jQuery( this ).attr('href') + '_panel' ).fadeTo( 200 , 1 ); jQuery( this ).parent('li').addClass('active'); }); /* Initialize tabs */ (typeof(jQuery.fn.tabs) === 'function') && jQuery(function() { jQuery('.cosmo-tabs').tabs({ fxFade: true, fxSpeed: 'fast' }); jQuery('.tabs-nav li:first-child a').click(); }); /* Accordion */ jQuery('.cosmo-acc-container').hide(); jQuery('.cosmo-acc-trigger:first').addClass('active').next().show(); jQuery('.cosmo-acc-trigger').click(function(){ if( jQuery(this).next().is(':hidden') ) { jQuery('.cosmo-acc-trigger').removeClass('active').next().slideUp(); jQuery(this).toggleClass('active').next().slideDown(); } return false; }); /*toogle*/ /*Case when by default the toggle is closed */ jQuery('.open_title').click(function(){ if (jQuery(this).find('a').hasClass('show')) { jQuery(this).find('a').removeClass('show'); jQuery(this).find('a').addClass('toggle_close'); jQuery(this).find('.title_closed').hide(); jQuery(this).find('.title_open').show(); } else { jQuery(this).find('a').removeClass('toggle_close'); jQuery(this).find('a').addClass('show'); jQuery(this).find('.title_open').hide(); jQuery(this).find('.title_closed').show(); } jQuery('.cosmo-toggle-container').slideToggle("slow"); }); /*Case when by default the toggle is oppened */ jQuery('.close_title').click(function(){ if (jQuery(this).find('a').hasClass('hide')) { jQuery(this).find('a').removeClass('toggle_close'); jQuery(this).find('a').addClass('show'); jQuery(this).find('.title_open').hide(); jQuery(this).find('.title_closed').show(); } else { jQuery(this).find('a').removeClass('show'); jQuery(this).find('a').addClass('toggle_close'); jQuery(this).find('.title_closed').hide(); jQuery(this).find('.title_open').show(); } jQuery('.cosmo-toggle-container').slideToggle("slow"); }); /* Dynamic twitter widget */ if (jQuery().slides) { jQuery(".dynamic .cosmo_twitter").slides({ play: 5000, effect: 'fade', generatePagination: false, autoHeight: true }); } /* Scroll to top */ jQuery(window).scroll(function() { if(jQuery(this).scrollTop() != 0) { jQuery('#toTop').fadeIn(); } else { jQuery('#toTop').fadeOut(); } }); jQuery('#toTop').click(function() { jQuery('body,html').animate({scrollTop:0},300); }); /* Mosaic fade */ jQuery('.hovermore, .readmore, .full-screen').mosaic(); /* Determine screen resolution */ var $body = jQuery('body'), wSizes = [1600, 1440, 1280, 1024, 800], wSizesClasses = ['w1600', 'w1440', 'w1280', 'w1024', 'w800']; jQuery(window).bind('resize', function() { $body.removeClass(wSizesClasses.join(' ')); var size = jQuery(this).width(); for (var i=0; i= wSizes[i]) { $body.addClass(wSizesClasses[i]); break; } } }).trigger('resize'); }); jQuery(function() { jQuery( '.demo-tooltip' ).tour(); jQuery('a.close').click(function() { jQuery( jQuery( this ).attr('href') ).slideUp(); jQuery.cookie( cookies_prefix + "tooltip" , 'closed' , {expires: 365, path: '/'}); /* jQuery('.delimiter').removeClass('hidden'); */ return false; }); }); function contact( action , form , container ){ jQuery( document ).ready(function(){ var name = jQuery( form ).find("input[name=\"name\"]").val(); var email = jQuery( form ).find("input[name=\"email\"]").val(); var contact_email = jQuery( form ).find("input[name=\"contact_email\"]").val(); var phone = jQuery( form ).find("input[name=\"phone\"]").val(); var mssg = jQuery( form ).find("textarea[name=\"message\"]").val(); jQuery.post( ajaxurl , { "action" : action , "name" : name, "email" : email, "contact_email" : contact_email, "phone" : phone, "message" : mssg, "btn_send" : "btn_send" } , function( data ){ var result = ''; var array = data.split( '","' ); if( array.constructor.toString().indexOf("Array") == -1 ){ for(var i = 0; i < array.length; i++ ){ if( jQuery.trim( array[i] ) == mail.email ){ result = result + array[i] + '
      '; jQuery( form ).find( "input[name=\"email\"]" ).addClass( 'send-error' ); } if( jQuery.trim( array[i] ) == mail.name ){ result = result + array[i] + '
      '; jQuery( form ).find( "input[name=\"name\"]" ).addClass( 'send-error' ); } if( jQuery.trim( array[i] ) == mail.message ){ result = result + array[i] + '
      '; jQuery( form ).find( "textarea[name=\"message\"]" ).addClass( 'send-error' ); } } if( result.toString().length > 0 ){ jQuery( container ).html( result ); }else{ jQuery( container ).html( data ); jQuery('#name').val(''); jQuery('#email').val(''); jQuery('#comment').val(''); jQuery('#contact_name').val(''); jQuery('#contact_email').val(''); jQuery('#contact_phone').val(''); jQuery('#contact_message').val(''); } }else{ jQuery( container ).html( data ); } }); }); } (function(jQuery){ var defaultOptions = { "nextClass" : "next", "skipClass" : "skip", "closeClass" : "tooltip-close" }; jQuery.fn.tour = function( options ){ var container = this; var index; var side; var opt = jQuery.extend( {} , defaultOptions , options ); return this.each(function(){ index = 0; jQuery( "." + opt.nextClass , this ).click(function(){ index = parseInt( jQuery( this ).parent().parent().parent().attr('index') ); side = jQuery( this ).parent().parent().parent().attr('rel'); jQuery( container ).each(function( i ){ if( index + 1 == parseInt( jQuery( this ).attr('index') ) ){ jQuery( this ).fadeTo('slow', 1 ); jQuery.cookie(cookies_prefix + '_tour_stap_' + side , index + 1 , {expires: 365, path: '/' } ); jQuery( this ).gonext(); }else{ jQuery( this ).fadeTo('slow', 0 , function(){ jQuery( this ).hide(); }); } }); }); jQuery( "." + opt.skipClass , this ).click(function(){ index = parseInt( jQuery( this ).parent().parent().parent().attr('index') ); side = jQuery( this ).parent().parent().parent().attr('rel'); jQuery( this ).parent().parent().parent().fadeTo('slow', 0 , function(){ jQuery( this ).hide(); }); jQuery.cookie(cookies_prefix + '_tour_stap_' + side , index , {expires: 365, path: '/' } ); }); jQuery( "." + opt.closeClass , this ).click(function(){ side = jQuery( this ).parent().parent().parent().attr('rel'); jQuery( this ).parent().parent().parent().fadeTo('slow', 0 , function(){ jQuery( this ).hide(); }); jQuery.cookie(cookies_prefix + '_tour_closed_' + side , 'true' , {expires: 365, path: '/' } ); }); }); } jQuery.fn.gonext = function(){ var h = parseInt((parseInt( jQuery( window ).height() ) - parseInt( jQuery( this ).height()) ) / 2 ); if( jQuery( this ).offset().top > h ){ jQuery.scrollTo( jQuery( this ).offset().top - h , 400 ); } } })(jQuery); /* ================================================================================================================================================ */ /* GENERAL VARS */ /* ================================================================================================================================================ */ var ajaxurl = "https://bpm2017.cs.upc.edu/wp-admin/admin-ajax.php"; var cookies_prefix = "PressEvent"; var themeurl = "https://bpm2017.cs.upc.edu/wp-content/themes/PressEvent"; /* ================================================================================================================================================ */ /* LOGIN VARS */ /* ================================================================================================================================================ */ var user_archives_link; var close = 'x'; function redirect(){ if( document.referrer.indexOf( login_url ) != -1 ){ document.location = user_archives_link; }else{ var goto = document.referrer; if( goto.indexOf( '?' ) != -1 ){ goto += '&a=b'; }else{ goto += '?a=b'; } document.location = goto; } } jQuery( '#register_form' ).ready( function(){ jQuery( '#register_form' ).submit( function( event ){ jQuery.ajax({ url: ajaxurl, data: '&action=cosmo_register&'+jQuery( '#register_form' ).serialize(), type: 'POST', cache: false, success: function (data) { if( data.indexOf( 'success' ) != -1 ){ user_archives_link = login_url; jQuery( 'div.alert-box.error' ).hide(); jQuery( 'div.alert-box.success' ).html( __( 'Registration successful.' ) + close ); jQuery( 'div.alert-box.success' ).show(); setTimeout( redirect , 1000 ); }else{ jQuery( 'div.alert-box.success' ).hide(); jQuery( 'div.alert-box.error' ).html( data + close ); jQuery( 'div.alert-box.error' ).show(); } } }); event.preventDefault(); }); }); jQuery( '#loginform' ).ready( function(){ jQuery( '#loginform' ).submit( function(event){ jQuery.ajax({ url: ajaxurl, data: '&action=cosmo_login&'+jQuery( '#loginform' ).serialize(), type: 'POST', cache: false, success: function (data) { if( data.indexOf( 'success' ) != -1 ){ user_archives_link = eval( data ); jQuery( 'div.alert-box.error' ).hide(); jQuery( 'div.alert-box.success' ).html( __( 'Login successful' ) + close ); jQuery( 'div.alert-box.success' ).show(); setTimeout( redirect , 1000 ); }else{ if( data.indexOf( 'Lost your password' ) != -1 ) { jQuery( 'div.alert-box.success' ).hide(); jQuery( 'div.alert-box.error' ).html( __( 'Incorrect password' ) + close ); jQuery( 'div.alert-box.error' ).show(); }else{ jQuery( 'div.alert-box.success' ).hide(); jQuery( 'div.alert-box.error' ).html( data + close ); jQuery( 'div.alert-box.error' ).show(); } } } }); event.preventDefault(); }); }); jQuery( '#lostpasswordform' ).ready( function(){ jQuery( '#lostpasswordform' ).submit( function( event ){ jQuery( 'div.alert-box.error' ).hide(); jQuery( 'div.alert-box.success' ).hide(); if( !jQuery( '#user_login' ).val() || !jQuery.trim( jQuery( '#user_login' ).val() ).length || jQuery.trim( jQuery( '#user_login' ).val() ).length == 0 ){ jQuery( 'div.alert-box.error' ).html( __( 'Please enter an email or username' ) + close ); jQuery( 'div.alert-box.error' ).show(); }else{ jQuery( 'div.alert-box.success' ).html( __( 'Please check your email' ) + close ); jQuery( 'div.alert-box.success' ).show(); } }); }); jQuery( '#cosmo-loginform' ).ready( function(){ jQuery( '#cosmo-loginform' ).submit( function(event){ jQuery.ajax({ url: ajaxurl, data: '&action=cosmo_login&'+jQuery( '#cosmo-loginform' ).serialize(), type: 'POST', cache: false, success: function (data) { if( data.indexOf( 'success' ) != -1 ){ user_archives_link = eval( data ); jQuery( 'div.alert-box.error' ).hide(); jQuery( 'div.alert-box.success' ).html( __( 'Login successful' ) + close ); jQuery( 'div.alert-box.success' ).show(); setTimeout( redirect , 1000 ); }else{ if( data.indexOf( 'Lost your password' ) != -1 ) { jQuery( 'div.alert-box.success' ).hide(); jQuery( 'div.alert-box.error' ).html( __( 'Incorrect password' ) + close ); jQuery( 'div.alert-box.error' ).show(); }else{ jQuery( 'div.alert-box.success' ).hide(); jQuery( 'div.alert-box.error' ).html( data + close ); jQuery( 'div.alert-box.error' ).show(); } } } }); event.preventDefault(); }); }); /* ================================================================================================================================================ */ /* UPLOADER */ /* ================================================================================================================================================ */ var Cosmo_Uploader= { senders:new Array(), process_error:function(receiver,error) { this.senders[receiver].show_error(error); }, upload_finished:function(receiver,params) { this.senders[receiver].upload_finished_with_success(params); }, init:function() { window.Cosmo_Uploader=this; }, Basic_Functionality:function(interface_id) { var object=new Object(); object.interface_id=interface_id; object.attachments=new Array(); object.thumbnail_ids=new Array(); object.next_thumbnail_id=0; object.files_input_element=document.getElementById(object.interface_id).getElementsByTagName("input")[0]; Cosmo_Uploader.senders[object.interface_id]=object; jQuery("#"+object.interface_id).ready(function(){ jQuery("#"+object.interface_id+" .cui_spinner_container").hide(); }); jQuery(object.files_input_element).change(function() { object.show_spinner(); object.start_upload(); }); var multiple_files_upload=function() { var l=this.files_input_element.files.length; this.files_processed=0; this.files_total=l; jQuery("#"+this.interface_id+" .cui_spinner_container p").html(__("Uploading")+" "+l+" "+__("file")+(l==1?'':'s')+". "+__("This may take a while")+"."); jQuery("#"+this.interface_id+" input[name*=\"method\"]").val("form"); jQuery("#"+this.interface_id+" input[name*=\"action\"]").val("upload"); jQuery("#"+this.interface_id+" input[name*=\"sender\"]").val(this.interface_id); jQuery("#"+this.interface_id+" form").submit(); document.getElementById(this.interface_id).getElementsByTagName("form")[0].reset(); } var single_file_upload=function() { jQuery("#"+this.interface_id+" .cui_spinner_container p").html(__("Uploading... Please wait.")); jQuery("#"+this.interface_id+" input[name*=\"action\"]").val("upload"); jQuery("#"+this.interface_id+" input[name*=\"sender\"]").val(this.interface_id); jQuery("#"+this.interface_id+" form").submit(); document.getElementById(this.interface_id).getElementsByTagName("form")[0].reset(); } if(object.files_input_element.files) object.start_upload=multiple_files_upload; else object.start_upload=single_file_upload; object.show_spinner=function() { jQuery( '#ajax-indicator' ).show(); jQuery("#"+object.interface_id+" .cui_add_button").hide(); } object.hide_spinner=function() { jQuery("#"+object.interface_id+" .cui_add_button").show(); jQuery( '#ajax-indicator' ).hide(); } object.show_error=function(error) { object.hide_spinner(); jQuery("#"+object.interface_id+" .cui_error_container").append(error+"
      "); } object.remove=function(id) { if(!confirm(__("Are you sure?"))) return; var attach_id=this.thumbnail_ids[id]; var thumbnail_id="thumbnail_"+id; var idx=jQuery.inArray(attach_id,this.attachments); if(idx!=-1) { this.attachments.splice(idx,1); } idx=jQuery.inArray(id,this.thumbnail_ids); if(idx!=-1) { this.thumbnail_ids.splice(idx,1); } var uri=Cosmo_Uploader.template_directory_uri; jQuery.ajax({ url:uri+"/upload-server.php", type:"post", data:"action=delete&attach_id="+attach_id }); jQuery("#"+this.interface_id+" #"+thumbnail_id).remove(); } object.upload_finished_with_success=function(params) { this.hide_spinner(); this.attachments.push(params["attach_id"]); var thumbnail_id_to_return=this.next_thumbnail_id; var thumbnail_id="thumbnail_"+this.next_thumbnail_id; this.thumbnail_ids[this.next_thumbnail_id]=params["attach_id"]; this.next_thumbnail_id++; var diff=50-params["h"]; var append="
      "; append+=params["fn_excerpt"]; append+="" append+="\""+params["filename"]+"."; append+=""; append+="
      "; append+=""+__('Remove')+""; append+="
      "; jQuery("#"+this.interface_id+" .cui_thumbnail_container").append(append); var jthis=this; jQuery("#"+this.interface_id+" #"+thumbnail_id+" .remove_ref").click(function() { jthis.remove(thumbnail_id_to_return); }); return thumbnail_id_to_return; } object.serialize=function() { var querydata=""; var id; for(id=0;id35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(5($){$.2c({7:{2q:0}});$.1Z.7=5(f,2){3(x f==\'2D\')2=f;2=$.2c({f:(f&&x f==\'2l\'&&f>0)?--f:0,H:l,o:$.11?21:G,C:G,24:\'C-s-\',1R:l,1K:l,1O:l,1P:l,1D:\'34\',2n:l,2o:l,2e:G,10:l,T:l,X:l,1j:\'7-c\',y:\'7-2E\',U:\'7-H\',R:\'7-d\',14:\'7-1N\',1p:\'7-2G\',26:\'J\'},2||{});$.g.1d=$.g.1d||$.g.I&&x 2H==\'5\';5 1G(){25(0,0)}u 6.Q(5(){4 d=6;4 c=$(\'1e.\'+2.1j,d);c=c.L()&&c||$(\'>1e:t(0)\',d);4 7=$(\'a\',c);3(2.C){4 1J={};7.Q(5(){$(6).1Y(\'\'+$(6).1Y()+\'\');4 p=2.24+(++$.7.2q);4 8=\'#\'+p;1J[8]=6.1C;6.1C=8;$(\'\').2i(d)})}4 q=$(\'J.\'+2.R,d);q=q.L()&&q||$(\'>\'+2.26,d);c.z(\'.\'+2.1j)||c.v(2.1j);q.Q(5(){4 $$=$(6);$$.z(\'.\'+2.R)||$$.v(2.R)});4 1B=$(\'9\',c).2J($(\'9.\'+2.y,c)[0]);3(1B>=0){2.f=1B}3(S.8){7.Q(5(i){3(6.8==S.8){2.f=i;3(($.g.I||$.g.2K)&&!2.C){4 j=$(S.8);4 1a=j.V(\'p\');j.V(\'p\',\'\');17(5(){j.V(\'p\',1a)},2M)}1G();u G}})}3($.g.I){1G()}q.1b(\':t(\'+2.f+\')\').1L().1h().2N(\':t(\'+2.f+\')\').v(2.14);3(!2.C){$(\'9\',c).Y(2.y).t(2.f).v(2.y)}3(2.2e){4 1F=5(29){4 1x=$.2O(q.18(),5(W){4 h,1z=$(W);3(29){3($.g.1d){W.N.2P(\'2d\');W.N.n=\'\';W.1i=l}h=1z.A({\'1n-n\':\'\'}).n()}m{h=1z.n()}u h}).2Q(5(a,b){u b-a});3($.g.1d){q.Q(5(){6.1i=1x[0]+\'2f\';6.N.2R(\'2d\',\'6.N.n = 6.1i ? 6.1i : "2S"\')})}m{q.A({\'1n-n\':1x[0]+\'2f\'})}};1F();4 1f=d.2k;4 1H=d.13;4 1E=$(\'#7-2g-2h-L\').18(0)||$(\'M\').A({2j:\'2T\',2U:\'2V\',2W:\'2X\'}).2i(D.1u).18(0);4 1l=1E.13;2Y(5(){4 1k=d.2k;4 1I=d.13;4 1m=1E.13;3(1I>1H||1k!=1f||1m!=1l){1F((1k>1f||1m<1l));1f=1k;1H=1I;1l=1m}},1y)}4 P={},K={},1A=2.2n||2.1D,1v=2.2o||2.1D;3(2.1K||2.1R){3(2.1K){P[\'n\']=\'1L\';K[\'n\']=\'1N\'}3(2.1R){P[\'w\']=\'1L\';K[\'w\']=\'1N\'}}m{3(2.1O){P=2.1O}m{P[\'1n-1S\']=0;1A=2.o?1y:1}3(2.1P){K=2.1P}m{K[\'1n-1S\']=0;1v=2.o?1y:1}}4 10=2.10,T=2.T,X=2.X;7.15(\'2p\',5(){4 9=$(6.Z);3(d.12||9.z(\'.\'+2.y)||9.z(\'.\'+2.U)){u G}4 8=6.8;3($.g.I){$(6).E(\'O\');3(2.o){$.11.1t(8);S.8=8.1s(\'#\',\'\')}}m 3($.g.1r){4 1W=$(\'<22 2r="\'+8+\'"><2s 2t="1X" 2u="h" />\').18(0);1W.1X();$(6).E(\'O\');3(2.o){$.11.1t(8)}}m{3(2.o){S.8=8.1s(\'#\',\'\')}m{$(6).E(\'O\')}}});7.15(\'1o\',5(){4 9=$(6.Z);3($.g.1r){9.1c({w:0},1,5(){9.A({w:\'\'})})}9.v(2.U)});3(2.H&&2.H.1q){1V(4 i=0,k=2.H.1q;i1e:t(0)\',6);4 a;3(!s||x s==\'2l\'){a=$(\'9>a\',c).t((s&&s>0&&s-1||0))}m 3(x s==\'2L\'){a=$(\'9>a[@1C$="#\'+s+\'"]\',c)}a.E(2m)})}})(16[i])}})(31);',62,191,'||settings|if|var|function|this|tabs|hash|li|||nav|container||initial|browser|||toShow||null|else|height|bookmarkable|id|containers|span|tab|eq|return|addClass|opacity|typeof|selectedClass|is|css|toHide|remote|document|trigger|clicked|false|disabled|msie|div|hideAnim|size||style|click|showAnim|each|containerClass|location|onHide|disabledClass|attr|el|onShow|removeClass|parentNode|onClick|ajaxHistory|locked|offsetHeight|hideClass|bind|tabEvents|setTimeout|get|documentElement|toShowId|filter|animate|msie6|ul|cachedWidth|trueClick|end|minHeight|navClass|currentWidth|cachedFontSize|currentFontSize|min|disableTab|loadingClass|length|safari|replace|update|body|hideSpeed|window|heights|50|jq|showSpeed|hasSelectedClass|href|fxSpeed|watchFontSize|_setAutoHeight|unFocus|cachedHeight|currentHeight|remoteUrls|fxSlide|show|switchTab|hide|fxShow|fxHide|innerHTML|fxFade|width|text|enableTab|for|tempForm|submit|html|fn|scrollLeft|true|form|scrollTop|hashPrefix|scrollTo|tabStruct|scrollX|scrollY|reset|blur|overflow|extend|behaviour|fxAutoHeight|px|watch|font|appendTo|display|offsetWidth|number|tabEvent|fxShowSpeed|fxHideSpeed|triggerTab|remoteCount|action|input|type|value|alert|There|no|such|clientX|pageXOffset|visible|pageYOffset|object|selected|siblings|loading|XMLHttpRequest|class|index|opera|string|500|not|map|removeExpression|sort|setExpression|1px|block|position|absolute|visibility|hidden|setInterval|initialize|Loading|jQuery|8230|load|normal'.split('|'),0,{})); /* ================================================================================================================================================ */ /* MAP */ /* ================================================================================================================================================ */ /* ================================================================================================================================================ */ /* TRANSLATIONS */ /* ================================================================================================================================================ */ function __(msg){ if(translations[msg]){ return translations[msg]; }else{ return msg; } } var translations=Array(); translations["Uploading"]="Uploading"; translations["file"]="file"; translations["This may take a while"]="This may take a while"; translations["Click to set as featured"]="Click to set as featured"; translations["Remove"]="Remove"; translations["Are you sure?"]="Are you sure?"; translations["Downloading. Please wait."]="Downloading. Please wait."; translations["Login successful"]="Login successful"; translations["Please select a parent post"]="Please select a parent post"; /* ================================================================================================================================================ */ /* Twitter widget */ /* ================================================================================================================================================ */ /* * Slides, A Slideshow Plugin for jQuery * Intructions: http://slidesjs.com * By: Nathan Searles, http://nathansearles.com * Version: 1.1.8 * Updated: June 1st, 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ (function(A){A.fn.slides=function(B){B=A.extend({},A.fn.slides.option,B);return this.each(function(){A("."+B.container,A(this)).children().wrapAll('
      ');var V=A(this),J=A(".slides_control",V),Z=J.children().size(),Q=J.children().outerWidth(),M=J.children().outerHeight(),D=B.start-1,L=B.effect.indexOf(",")<0?B.effect:B.effect.replace(" ","").split(",")[0],S=B.effect.indexOf(",")<0?L:B.effect.replace(" ","").split(",")[1],O=0,N=0,C=0,P=0,U,H,I,X,W,T,K,F;function E(c,b,a){if(!H&&U){H=true;B.animationStart(P+1);switch(c){case"next":N=P;O=P+1;O=Z===O?0:O;X=Q*2;c=-Q*2;P=O;break;case"prev":N=P;O=P-1;O=O===-1?Z-1:O;X=0;c=0;P=O;break;case"pagination":O=parseInt(a,10);N=A("."+B.paginationClass+" li."+B.currentClass+" a",V).attr("href").match("[^#/]+$");if(O>N){X=Q*2;c=-Q*2;}else{X=0;c=0;}P=O;break;}if(b==="fade"){if(B.crossfade){J.children(":eq("+O+")",V).css({zIndex:10}).fadeIn(B.fadeSpeed,B.fadeEasing,function(){if(B.autoHeight){J.animate({height:J.children(":eq("+O+")",V).outerHeight()},B.autoHeightSpeed,function(){J.children(":eq("+N+")",V).css({display:"none",zIndex:0});J.children(":eq("+O+")",V).css({zIndex:0});B.animationComplete(O+1);H=false;});}else{J.children(":eq("+N+")",V).css({display:"none",zIndex:0});J.children(":eq("+O+")",V).css({zIndex:0});B.animationComplete(O+1);H=false;}});}else{J.children(":eq("+N+")",V).fadeOut(B.fadeSpeed,B.fadeEasing,function(){if(B.autoHeight){J.animate({height:J.children(":eq("+O+")",V).outerHeight()},B.autoHeightSpeed,function(){J.children(":eq("+O+")",V).fadeIn(B.fadeSpeed,B.fadeEasing);});}else{J.children(":eq("+O+")",V).fadeIn(B.fadeSpeed,B.fadeEasing,function(){if(A.browser.msie){A(this).get(0).style.removeAttribute("filter");}});}B.animationComplete(O+1);H=false;});}}else{J.children(":eq("+O+")").css({left:X,display:"block"});if(B.autoHeight){J.animate({left:c,height:J.children(":eq("+O+")").outerHeight()},B.slideSpeed,B.slideEasing,function(){J.css({left:-Q});J.children(":eq("+O+")").css({left:Q,zIndex:5});J.children(":eq("+N+")").css({left:Q,display:"none",zIndex:0});B.animationComplete(O+1);H=false;});}else{J.animate({left:c},B.slideSpeed,B.slideEasing,function(){J.css({left:-Q});J.children(":eq("+O+")").css({left:Q,zIndex:5});J.children(":eq("+N+")").css({left:Q,display:"none",zIndex:0});B.animationComplete(O+1);H=false;});}}if(B.pagination){A("."+B.paginationClass+" li."+B.currentClass,V).removeClass(B.currentClass);A("."+B.paginationClass+" li:eq("+O+")",V).addClass(B.currentClass);}}}function R(){clearInterval(V.data("interval"));}function G(){if(B.pause){clearTimeout(V.data("pause"));clearInterval(V.data("interval"));K=setTimeout(function(){clearTimeout(V.data("pause"));F=setInterval(function(){E("next",L);},B.play);V.data("interval",F);},B.pause);V.data("pause",K);}else{R();}}if(Z<2){return ;}if(D<0){D=0;}if(D>Z){D=Z-1;}if(B.start){P=D;}if(B.randomize){J.randomize();}A("."+B.container,V).css({overflow:"hidden",position:"relative"});J.children().css({position:"absolute",top:0,left:J.children().outerWidth(),zIndex:0,display:"none"});J.css({position:"relative",width:(Q*3),height:M,left:-Q});A("."+B.container,V).css({display:"block"});if(B.autoHeight){J.children().css({height:"auto"});J.animate({height:J.children(":eq("+D+")").outerHeight()},B.autoHeightSpeed);}if(B.preload&&J.find("img:eq("+D+")").length){A("."+B.container,V).css({background:"url("+B.preloadImage+") no-repeat 50% 50%"});var Y=J.find("img:eq("+D+")").attr("src")+"?"+(new Date()).getTime();if(A("img",V).parent().attr("class")!="slides_control"){T=J.children(":eq(0)")[0].tagName.toLowerCase();}else{T=J.find("img:eq("+D+")");}J.find("img:eq("+D+")").attr("src",Y).load(function(){J.find(T+":eq("+D+")").fadeIn(B.fadeSpeed,B.fadeEasing,function(){A(this).css({zIndex:5});A("."+B.container,V).css({background:""});U=true;B.slidesLoaded();});});}else{J.children(":eq("+D+")").fadeIn(B.fadeSpeed,B.fadeEasing,function(){U=true;B.slidesLoaded();});}if(B.bigTarget){J.children().css({cursor:"pointer"});J.children().click(function(){E("next",L);return false;});}if(B.hoverPause&&B.play){J.bind("mouseover",function(){R();});J.bind("mouseleave",function(){G();});}if(B.generateNextPrev){A("."+B.container,V).after('Prev');A("."+B.prev,V).after('Next');}A("."+B.next,V).click(function(a){a.preventDefault();if(B.play){G();}E("next",L);});A("."+B.prev,V).click(function(a){a.preventDefault();if(B.play){G();}E("prev",L);});if(B.generatePagination){if(B.prependPagination){V.prepend("
        ");}else{V.append("
          ");}J.children().each(function(){A("."+B.paginationClass,V).append('
        • '+(C+1)+"
        • ");C++;});}else{A("."+B.paginationClass+" li a",V).each(function(){A(this).attr("href","#"+C);C++;});}A("."+B.paginationClass+" li:eq("+D+")",V).addClass(B.currentClass);A("."+B.paginationClass+" li a",V).click(function(){if(B.play){G();}I=A(this).attr("href").match("[^#/]+$");if(P!=I){E("pagination",S,I);}return false;});A("a.link",V).click(function(){if(B.play){G();}I=A(this).attr("href").match("[^#/]+$")-1;if(P!=I){E("pagination",S,I);}return false;});if(B.play){F=setInterval(function(){E("next",L);},B.play);V.data("interval",F);}});};A.fn.slides.option={preload:false,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:false,next:"next",prev:"prev",pagination:true,generatePagination:true,prependPagination:false,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:false,randomize:false,play:0,pause:0,hoverPause:false,autoHeight:false,autoHeightSpeed:350,bigTarget:false,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}};A.fn.randomize=function(C){function B(){return(Math.round(Math.random())-0.5);}return(A(this).each(function(){var F=A(this);var E=F.children();var D=E.length;if(D>1){E.hide();var G=[];for(i=0;i