// source --> http://www.buchananjoinery.co.uk/wp-content/plugins/sugar-slider/includes/js/jquery.sexyslider.js?ver=4.9.8
/*!
* SexySlider v1.4 - for jQuery 1.3+
* http://codecanyon.net/item/sexy-slider/87148
*
* Copyright 2010, Eduardo Daniel Sada
* You need to buy a license if you want use this script.
* http://codecanyon.net/wiki/buying/howto-buying/licensing/
*
* Date: Jun 01 2010
* SexySlider is a JQuery plugin that lets you easily
* create powerful javascript Sliders with very nice
* transition effects. Inspirated in jqFancyTransitions.
* Developed in OOP.
*/
(function($) {
var ie6 = (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7 && parseInt(jQuery.browser.version, 10) > 4);
if (ie6)
{
try { document.execCommand("BackgroundImageCache", false, true); } catch(err) {}
};
if ($.proxy === undefined) // proxy is included in jquery 1.4+
{
$.extend({
proxy: function( fn, thisObject ) {
if ( fn )
{
proxy = function() { return fn.apply( thisObject || this, arguments ); };
};
return proxy;
}
});
};
var SSPrototype = function() { };
$.extend(SSPrototype.prototype, {
init: function(el, options) {
var defaults = {
navigation : '',
control : '',
width : 500,
height : 332,
strips : 20,
auto : true,
autopause : true,
delay : 3000, // in ms
stripSpeed : 400, // in ms
titleOpacity : 0.7,
titleSpeed : 700, // in ms
//titlePosition : 'bottom', // top, right, bottom, left
titleStyle : 'auto',
direction : 'alternate', // left, right, alternate, random
effect : 'random', // curtain, zipper, wave, fountain, cascade, fade, random
onComplete : function() {},
onSlideshowEnd : function() {},
onTitleShow : function() {},
onTitleHide : function() {}
};
this.dom = {};
this.img = [];
this.titles = [];
this.links = [];
this.imgInc = 0;
this.imgInterval = 0;
this.inc = 0;
this.order = [];
this.controls = [];
this.direction = 0;
this.options = $.extend({}, defaults, options);
this.element = el;
var params = this.options;
var self = this;
$('img', el).each(function(i) {
var item = $(this);
self.img[i] = item.attr('src');
self.titles[i] = item.attr('alt') ? item.attr('alt') : (item.attr('title') ? item.attr('title') : '');
self.links[i] = item.parent().is('a') ? item.parent().attr('href') : false;
if (self.options.control)
{
self.controls[i] = $(''+(i+1)+'');
$(self.options.control).append(self.controls[i]);
if (i==0)
{
self.controls[i].addClass('active');
}
self.controls[i].click(function(event) {
self.transition($(this).attr('rel'));
event.preventDefault();
});
};
item.hide();
});
$(this.element).css({
'background-image' : 'url('+this.img[0]+')',
'background-position' : 'top left',
'position' : 'relative',
'overflow' : 'hidden',
'width' : params.width,
'height' : params.height
});
this.dom.title = $("
"+this.titles[0]+"
");
if (params.titleStyle == 'auto') {
this.dom.title.css({
'background-color' : '#000000',
'color' : '#FFFFFF',
'position' : 'absolute',
'z-index' : 5
});
}
if (params.titlePosition=='bottom') {
this.dom.title.css({ 'bottom' : 0, 'left' : 0, 'width' : params.width - 20 });
} else if (params.titlePosition=='top') {
this.dom.title.css({ 'top' : 0, 'left' : 0, 'width' : params.width - 20 });
} else if (params.titlePosition=='right') {
this.dom.title.css({ 'top' : 0, 'right' : 0, 'width' : parseInt(params.width * 30 / 100), 'height' : params.height });
} else if (params.titlePosition=='left') {
this.dom.title.css({ 'top' : 0, 'left' : 0, 'width' : parseInt(params.width * 30 / 100), 'height' : params.height });
};
$(this.element).append(this.dom.title);
if (this.titles[this.imgInc])
{
$(this.dom.title).css({
'opacity' : params.titleOpacity
});
}
else
{
$(this.dom.title).css({
'opacity' : 0
});
};
var sWidth = parseInt(params.width / params.strips);
var sobrante = params.width - sWidth * params.strips; // lo que sobra, se lo vamos comiendo de a uno.
var sLeft = 0;
this.dom.strip = [];
// creating strips
for (i=0; i < params.strips; i++)
{
if ( sobrante > 0)
{
tsWidth = sWidth + 1;
sobrante--;
}
else
{
tsWidth = sWidth;
}
var eachStrip = $("").get(0);
$(eachStrip).css({
'background-position': -sLeft +'px top',
'width' : tsWidth + "px",
'height' : params.height + "px",
'position': 'absolute',
'left' : sLeft
});
this.dom.strip.push ( eachStrip );
sLeft += tsWidth;
this.order[i] = i;
}; // end for
$(this.element).append(this.dom.strip);
this.dom.link = $("");
this.dom.link.css({
'text-decoration' : 'none',
'position' : 'absolute',
'top' : 0,
'left' : 0,
'border' : 0,
'z-index' : 8,
'width' : params.width,
'height' : params.height
});
$(this.element).append(this.dom.link);
if (this.links[this.imgInc])
{
this.dom.link.attr('href', this.links[this.imgInc]);
}
else
{
this.dom.link.css({'display':'none'});
};
// add events
if (params.navigation)
{
var prev = $('prev');
var next = $('next');
prev.click($.proxy(function(event) { this.transition("prev"); event.preventDefault(); }, this));
next.click($.proxy(function(event) { this.transition("next"); event.preventDefault(); }, this));
$(params.navigation).append(prev, next);
};
$(el).bind('mouseover', $.proxy(function() { this.setpause(true) }, this));
$(el).bind('mouseout', $.proxy(function() { this.setpause(false) }, this));
$(this.dom.title).bind('mouseover', $.proxy(function() { this.setpause(true) }, this));
$(this.dom.title).bind('mouseout', $.proxy(function() { this.setpause(false)}, this));
params.onComplete.call(this);
if (params.auto)
{
this.slideshow();
}
return this;
},
slideshow: function() {
clearInterval(this.imgInterval);
this.imgInterval = setInterval($.proxy(function() {this.transition();}, this ), this.options.delay+((this.options.stripSpeed / 6)*this.options.strips)+this.options.stripSpeed);
},
setpause: function(val) {
this.pause = val;
},
transition: function(dir) {
if (this.pause == true || dir == this.imgInc)
{
return false;
};
this.pause = true;
this.stripInterval = setInterval($.proxy(function() { this.strips(this.order[this.inc]); }, this), this.options.stripSpeed / 6);
$(this.element).css({
'background-image' : 'url('+this.img[this.imgInc]+')'
});
switch (dir)
{
case "next":
this.imgInc = (this.imgInc+1 >= this.img.length) ? 0 : this.imgInc+1;
break;
case "prev":
this.imgInc = (this.imgInc-1 < 0) ? this.img.length-1 : this.imgInc-1;
break;
case "first":
this.imgInc = 0;
break;
case "last":
this.imgInc = this.img.length-1;
break;
default:
if (!isNaN(parseFloat(dir)) && isFinite(dir)) //is numeric
{
this.imgInc = parseInt(dir);
}
else // for auto
{
this.imgInc = (this.imgInc+1 >= this.img.length) ? 0 : this.imgInc+1;
};
break;
}; //end switch
if (dir !== undefined)
{
if (this.options.autopause)
{
clearInterval(this.imgInterval);
}
else
{
this.slideshow();
}
}
if (this.titles[this.imgInc]!='')
{
$(this.dom.title).animate({ 'opacity' : 0 }, this.options.titleSpeed, $.proxy(function() { $(this.dom.title).html(this.titles[this.imgInc]); this.options.onTitleHide.call(this); }, this));
opacity = this.options.titleOpacity;
}
else
{
opacity = 0;
};
$(this.dom.title).animate({ 'opacity' : opacity }, this.options.titleSpeed, $.proxy(function() {this.options.onTitleShow.call(this)}, this));
if (this.links[this.imgInc])
{
this.dom.link.attr('href', this.links[this.imgInc]);
this.dom.link.css({'display':'block'});
}
else
{
this.dom.link.css({'display':'none'});
};
if (this.options.control)
{
$.each(this.controls, function(i, el) {
$(el).removeClass('active');
});
$(this.controls[this.imgInc]).addClass('active');
}
this.inc = 0;
switch (this.options.effect) // ordenar strips
{
case 'fountain':
$.proxy(this.effects.fountain, this)();
break;
case 'wave':
$.proxy(this.effects.wave, this)();
break;
case 'zipper':
$.proxy(this.effects.zipper, this)();
break;
case 'cascade':
$.proxy(this.effects.cascade, this)();
break;
case 'curtain':
$.proxy(this.effects.curtain, this)();
break;
case 'fade':
$.proxy(this.effects.fade, this)();
break;
case 'smoothFade':
$.proxy(this.effects.smoothFade, this)();
break;
case 'random':
$.proxy(this.effects.random, this)();
break;
}; // end switch
// left, right, alternate, random
if ((this.options.direction == 'right' && this.order[0] == 1))
{
this.order.reverse();
this.direction = 1;
}
else if (this.options.direction == 'random')
{
this.order = this.shuffle(this.order);
}
else if (this.options.direction == 'alternate')
{
if (this.direction == 0)
{
this.direction = 1;
}
else
{
this.order.reverse();
this.direction = 0;
};
}
else
{
this.direction = 0;
};
},
shuffle: function(arr) {
for(
var j, x, i = arr.length; i;
j = parseInt(Math.random() * i),
x = arr[--i], arr[i] = arr[j], arr[j] = x
);
return arr;
},
effects: {
cascade: function() {
var odd = 1;
var total = this.order.length;
var mitad = parseInt(this.options.strips/2);
for (i=0; i < total; i++) {
$(this.dom.strip[i]).css( 'bottom', 'auto' );
this.order[i] = mitad - (parseInt((i+1)/2)*odd);
odd *= -1;
};
this.order[this.options.strips-1] = 0;
},
curtain: function() {
$.proxy(this.effects.wave, this)();
},
wave: function() {
for (i=0; i < this.order.length; i++) {
$(this.dom.strip[i]).css( 'bottom', 'auto' );
this.order[i] = i;
};
},
zipper: function() {
for (i=0; i < this.order.length; i++) {
if (i%2 == 0) {
$(this.dom.strip[i]).css( 'bottom', 0 );
} else {
$(this.dom.strip[i]).css( 'bottom', 'auto' );
};
this.order[i] = i;
};
},
fountain: function() {
var odd = 1;
var total = this.order.length;
var mitad = parseInt(this.options.strips/2);
for (i=0; i < total; i++) {
$(this.dom.strip[i]).css( 'bottom', 0 );
this.order[i] = mitad - (parseInt((i+1)/2)*odd);
odd *= -1;
};
this.order[this.options.strips-1] = 0;
},
fade: function() {
$.proxy(this.effects.wave, this)();
},
smoothFade: function() {
$.proxy(this.effects.wave, this)();
},
random: function() {
var i = parseInt(Math.random() * 4);
switch (i) {
case 0:
$.proxy(this.effects.fountain, this)();
this.options.usewidth = false;
break;
case 1:
$.proxy(this.effects.wave, this)();
this.options.usewidth = false;
break;
case 2:
$.proxy(this.effects.fountain, this)();
$.proxy(this.effects.wave, this)();
$.proxy(this.effects.zipper, this)();
this.options.usewidth = false;
break;
case 3:
$.proxy(this.effects.wave, this)();
this.options.usewidth = true;
break;
case 4:
$.proxy(this.effects.cascade, this)();
this.options.usewidth = false;
break;
}
}
},
strips: function(itemId) {
if (this.inc == this.options.strips) {
// end animation
clearInterval(this.stripInterval);
// call event
this.options.onSlideshowEnd.call(this);
setTimeout($.proxy(function() {this.pause = false;}, this), this.options.stripSpeed);
return false;
};
this.pause = true;
var strip = $(this.dom.strip[itemId]);
if (!ie6 || this.options.effect == 'fade') {
strip.css({ 'opacity' : 0 });
};
if (this.options.effect == 'curtain' || this.options.usewidth == true)
{
currWidth = strip.width();
strip.css({
'width' : 0,
'background-image' : 'url('+this.img[this.imgInc]+')'
});
strip.animate({
'width' : currWidth,
'opacity' : 1
}, this.options.stripSpeed);
}
else if (this.options.effect == 'fade')
{
strip.css({
'background-image' : 'url('+this.img[this.imgInc]+')'
});
strip.animate({
'opacity' : 1
}, this.options.stripSpeed);
}
else
{
strip.css({
'height' : 0,
'background-image' : 'url('+this.img[this.imgInc]+')'
});
strip.animate({
'height' : this.options.height,
'opacity' : 1
}, this.options.stripSpeed);
}
this.inc++;
}
});
$.fn.SexySlider = function(options) {
this.each(function() {
if (!this.SSObject) {
this.SSObject = new SSPrototype().init(this, options);
};
return this.SSObject;
});
};
})(jQuery);
// source --> http://www.buchananjoinery.co.uk/wp-content/plugins/sugar-slider/includes/js/slidedeck.jquery.lite.js?ver=4.9.8
/**
* SlideDeck 1.2.1 Lite - 2011-01-18
* Copyright (c) 2011 digital-telepathy (http://www.dtelepathy.com)
*
* Support the developers by purchasing the Pro version at http://www.slidedeck.com/download
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* More information on this project:
* http://www.slidedeck.com/
*
* Requires: jQuery v1.3+
*
* Full Usage Documentation: http://www.slidedeck.com/usage-documentation
* Usage:
* $(el).slidedeck(opts);
*
* @param {HTMLObject} el The element to extend as a SlideDeck
* @param {Object} opts An object to pass custom override options to
*/
var SlideDeck;
(function($){
SlideDeck = function(el,opts){
var self = this,
el = $(el);
var VERSION = "1.2.1";
this.options = {
speed: 500,
transition: 'swing',
start: 1,
activeCorner: true,
index: true,
scroll: true,
keys: true,
autoPlay: false,
autoPlayInterval: 5000,
hideSpines: false,
cycle: false
};
this.classes = {
slide: 'slide',
spine: 'spine',
label: 'label',
index: 'index',
active: 'active',
indicator: 'indicator',
activeCorner: 'activeCorner',
disabled: 'disabled',
vertical: 'slidesVertical',
previous: 'previous',
next: 'next'
};
this.current = 1;
this.deck = el;
this.spines = el.children('dt');
this.slides = el.children('dd');
this.controlTo = 1;
this.session = [];
this.disabledSlides = [];
this.pauseAutoPlay = false;
this.isLoaded = false;
var UA = navigator.userAgent.toLowerCase();
this.browser = {
chrome: UA.match(/chrome/) ? true : false,
firefox: UA.match(/firefox/) ? true : false,
firefox2: UA.match(/firefox\/2/) ? true : false,
firefox30: UA.match(/firefox\/3\.0/) ? true : false,
msie: UA.match(/msie/) ? true : false,
msie6: (UA.match(/msie 6/) && !UA.match(/msie 7|8/)) ? true : false,
msie7: UA.match(/msie 7/) ? true : false,
msie8: UA.match(/msie 8/) ? true : false,
chromeFrame: (UA.match(/msie/) && UA.match(/chrome/)) ? true : false,
opera: UA.match(/opera/) ? true : false,
safari: (UA.match(/safari/) && !UA.match(/chrome/)) ? true : false
};
for(var b in this.browser){
if(this.browser[b] === true){
this.browser._this = b;
}
}
if(this.browser.chrome === true) {
this.browser.version = UA.match(/chrome\/([0-9\.]+)/)[1];
}
if(this.browser.firefox === true) {
this.browser.version = UA.match(/firefox\/([0-9\.]+)/)[1];
}
if(this.browser.msie === true) {
this.browser.version = UA.match(/msie ([0-9\.]+)/)[1];
}
if(this.browser.opera === true) {
this.browser.version = UA.match(/version\/([0-9\.]+)/)[1];
}
if(this.browser.safari === true) {
this.browser.version = UA.match(/version\/([0-9\.]+)/)[1];
}
var width;
var height;
var spine_inner_width,
spine_outer_width,
slide_width,
spine_half_width;
var FixIEAA = function(spine){
if(self.browser.msie && !self.browser.chromeFrame){
var bgColor = spine.css('background-color');
var sBgColor = bgColor;
if(sBgColor == "transparent"){
bgColor = "#ffffff";
} else {
if(sBgColor.match('#')){
// Hex, convert to RGB
if(sBgColor.length < 7){
var t = "#" + sBgColor.substr(1,1) + sBgColor.substr(1,1) + sBgColor.substr(2,1) + sBgColor.substr(2,1) + sBgColor.substr(3,1) + sBgColor.substr(3,1);
bgColor = t;
}
}
}
bgColor = bgColor.replace("#","");
cParts = {
r: bgColor.substr(0,2),
g: bgColor.substr(2,2),
b: bgColor.substr(4,2)
};
var bgRGB = "#";
var hexVal = "01234567890ABCDEF";
for(var k in cParts){
cParts[k] = Math.max(0,(parseInt(cParts[k],16) - 1));
cParts[k] = hexVal.charAt((cParts[k] - cParts[k]%16)/16) + hexVal.charAt(cParts[k]%16);
bgRGB += cParts[k];
}
spine.find('.' + self.classes.index).css({
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(rotation=1) chroma(color=' + bgRGB + ')',
backgroundColor: bgRGB
});
}
};
var autoPlay = function(){
gotoNext = function(){
if(self.pauseAutoPlay === false){
if(self.options.cycle === false && self.current == self.slides.length){
self.pauseAutoPlay = true;
} else {
self.next();
}
}
};
setInterval(gotoNext,self.options.autoPlayInterval);
};
var buildDeck = function(){
if($.inArray(el.css('position'),['position','absolute','fixed'])){
el.css('position', 'relative');
}
el.css('overflow', 'hidden');
for(var i=0; i i){
var spine = $(self.spines[i]);
}
var sPad = {
top: parseInt(slide.css('padding-top'),10),
right: parseInt(slide.css('padding-right'),10),
bottom: parseInt(slide.css('padding-bottom'),10),
left: parseInt(slide.css('padding-left'),10)
};
var sBorder = {
top: parseInt(slide.css('border-top-width'),10),
right: parseInt(slide.css('border-right-width'),10),
bottom: parseInt(slide.css('border-bottom-width'),10),
left: parseInt(slide.css('border-left-width'),10)
};
for(var k in sBorder){
sBorder[k] = isNaN(sBorder[k]) ? 0 : sBorder[k];
}
if(i < self.current) {
if(i == self.current - 1){
if(self.options.hideSpines !== true){
spine.addClass(self.classes.active);
}
slide.addClass(self.classes.active);
}
offset = i * spine_outer_width;
if(self.options.hideSpines === true){
if(i == self.current - 1){
offset = 0;
} else {
offset = 0 - (self.options.start - i - 1) * el.width();
}
}
} else {
offset = i * spine_outer_width + slide_width;
if(self.options.hideSpines === true){
offset = (i + 1 - self.options.start) * el.width();
}
}
self.slide_width = (slide_width - sPad.left - sPad.right - sBorder.left - sBorder.right);
slide.css({
position: 'absolute',
left: offset,
zIndex: 1,
height: (height - sPad.top - sPad.bottom - sBorder.top - sBorder.bottom) + "px",
width: self.slide_width + "px",
margin: 0,
paddingLeft: sPad.left + spine_outer_width + "px"
}).addClass(self.classes.slide).addClass(self.classes.slide + "_" + (i + 1));
if (self.options.hideSpines !== true) {
var spinePad = {
top: parseInt(spine.css('padding-top'),10),
right: parseInt(spine.css('padding-right'),10),
bottom: parseInt(spine.css('padding-bottom'),10),
left: parseInt(spine.css('padding-left'),10)
};
for(var k in spinePad) {
if(spinePad[k] < 10 && (k == "left" || k == "right")){
spinePad[k] = 10;
}
}
var spinePadString = spinePad.top + "px " + spinePad.right + "px " + spinePad.bottom + "px " + spinePad.left + "px";
spine.css({
position: 'absolute',
zIndex: 3,
display: 'block',
left: offset,
width: (height - spinePad.left - spinePad.right) + "px",
height: spine_inner_width + "px",
rotation: '270deg',
'-webkit-transform': 'rotate(270deg)',
'-webkit-transform-origin': spine_half_width + 'px 0px',
'-moz-transform': 'rotate(270deg)',
'-moz-transform-origin': spine_half_width + 'px 0px',
'-o-transform': 'rotate(270deg)',
'-o-transform-origin': spine_half_width + 'px 0px',
textAlign: 'right',
top: (self.browser.msie && !self.browser.chromeFrame) ? 0 : (height - spine_half_width) + "px",
marginLeft: ((self.browser.msie && !self.browser.chromeFrame) ? 0 : (0 - spine_half_width)) + "px",
filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=3)'
}).addClass(self.classes.spine).addClass(self.classes.spine + "_" + (i + 1));
} else {
if(typeof(spine) != "undefined"){
spine.hide();
}
}
if(i == self.slides.length-1){
slide.addClass('last');
if(self.options.hideSpines !== true){
spine.addClass('last');
}
}
// Add slide active corners
if(self.options.activeCorner === true && self.options.hideSpines === false){
var corner = document.createElement('DIV');
corner.className = self.classes.activeCorner + ' ' + (self.classes.spine + '_' + (i + 1));
spine.after(corner);
spine.next('.' + self.classes.activeCorner).css({
position: 'absolute',
top: '25px',
left: offset + spine_outer_width + "px",
overflow: "hidden",
zIndex: "20000"
}).hide();
if(spine.hasClass(self.classes.active)){
spine.next('.' + self.classes.activeCorner).show();
}
}
if (self.options.hideSpines !== true) {
// Add spine indexes, will always be numerical if unlicensed
var index = document.createElement('DIV');
index.className = self.classes.index;
if(self.options.index !== false){
var textNode;
if(typeof(self.options.index) != 'boolean'){
textNode = self.options.index[i%self.options.index.length];
} else {
textNode = "" + (i + 1);
}
index.appendChild(document.createTextNode(textNode));
}
spine.append(index);
spine.find('.' + self.classes.index).css({
position: 'absolute',
zIndex: 2,
display: 'block',
width: spine_inner_width + "px",
height: spine_inner_width + "px",
textAlign: 'center',
bottom: ((self.browser.msie && !self.browser.chromeFrame) ? 0 : (0 - spine_half_width)) + "px",
left: ((self.browser.msie && !self.browser.chromeFrame) ? 5 : 20) + "px",
rotation: "90deg",
'-webkit-transform': 'rotate(90deg)',
'-webkit-transform-origin': spine_half_width + 'px 0px',
'-moz-transform': 'rotate(90deg)',
'-moz-transform-origin': spine_half_width + 'px 0px',
'-o-transform': 'rotate(90deg)',
'-o-transform-origin': spine_half_width + 'px 0px'
});
FixIEAA(spine);
}
}
if(self.options.hideSpines !== true){
// Setup Click Interaction
self.spines.bind('click', function(event){
event.preventDefault();
self.goTo(self.spines.index(this)+1);
});
}
// Setup Keyboard Interaction
if(self.options.keys !== false){
$(document).bind('keydown', function(event){
if($(event.target).parents().index(self.deck) == -1){
if(event.keyCode == 39) {
self.pauseAutoPlay = true;
self.next();
} else if(event.keyCode == 37) {
self.pauseAutoPlay = true;
self.prev();
}
}
});
}
// Setup Mouse Wheel Interaction
if(typeof($.event.special.mousewheel) != "undefined"){
el.bind("mousewheel", function(event){
if(self.options.scroll !== false){
var delta = event.detail ? event.detail : event.wheelDelta;
if(self.browser.msie || self.browser.safari || self.browser.chrome){
delta = 0 - delta;
}
var internal = false;
if($(event.originalTarget).parents(self.deck).length){
if($.inArray(event.originalTarget.nodeName.toLowerCase(),['input','select','option','textarea']) != -1){
internal = true;
}
}
if (internal !== true) {
if (delta > 0) {
switch (self.options.scroll) {
case "stop":
event.preventDefault();
break;
case true:
default:
if (self.current < self.slides.length || self.options.cycle == true) {
event.preventDefault();
}
break;
}
self.pauseAutoPlay = true;
self.next();
}
else {
switch (self.options.scroll) {
case "stop":
event.preventDefault();
break;
case true:
default:
if (self.current != 1 || self.options.cycle == true) {
event.preventDefault();
}
break;
}
self.pauseAutoPlay = true;
self.prev();
}
}
}
});
}
$(self.spines[self.current - 2]).addClass(self.classes.previous);
$(self.spines[self.current]).addClass(self.classes.next);
if(self.options.autoPlay === true){
autoPlay();
}
self.isLoaded = true;
};
var getValidSlide = function(ind){
ind = Math.min(self.slides.length,Math.max(1,ind));
return ind;
};
var slide = function(ind,params){
ind = getValidSlide(ind);
// Determine if we are moving forward in the SlideDeck or backward,
// this is used to determine when the callback should be run
var forward = true;
if(ind < self.current){
forward = false;
}
var classReset = [self.classes.active, self.classes.next, self.classes.previous].join(' ');
self.current = ind;
self.spines.removeClass(classReset);
self.slides.removeClass(classReset);
el.find('.' + self.classes.activeCorner).hide();
$(self.spines[self.current - 2]).addClass(self.classes.previous);
$(self.spines[self.current]).addClass(self.classes.next);
for (var i = 0; i < self.slides.length; i++) {
var pos = 0;
if(self.options.hideSpines !== true){
var spine = $(self.spines[i]);
}
var slide = $(self.slides[i]);
if (i < self.current) {
if (i == (self.current - 1)) {
slide.addClass(self.classes.active);
if(self.options.hideSpines !== true){
spine.addClass(self.classes.active);
spine.next('.' + self.classes.activeCorner).show();
}
}
pos = i * spine_outer_width;
} else {
pos = i * spine_outer_width + slide_width;
}
if(self.options.hideSpines === true){
pos = (i - self.current + 1) * el.width();
}
var animOpts = {
duration: self.options.speed,
easing: self.options.transition
};
slide.stop().animate({
left: pos + "px",
width: self.slide_width + "px"
}, animOpts);
if(self.options.hideSpines !== true){
FixIEAA(spine);
if(spine.css('left') != pos+"px"){
spine.stop().animate({
left: pos + "px"
},{
duration: self.options.speed,
easing: self.options.transition
});
spine.next('.' + self.classes.activeCorner).stop().animate({
left: pos + spine_outer_width + "px"
},{
duration: self.options.speed,
easing: self.options.transition
});
}
}
}
};
var setOption = function(opts, val){
var newOpts = opts;
if(typeof(opts) === "string"){
newOpts = {};
newOpts[opts] = val;
}
for(var key in newOpts){
val = newOpts[key];
switch(key){
case "speed":
case "start":
val = parseFloat(val);
if(isNaN(val)){
val = self.options[key];
}
break;
case "scroll":
case "keys":
case "activeCorner":
case "hideSpines":
case "autoPlay":
case "cycle":
if(typeof(val) !== "boolean"){
val = self.options[key];
}
break;
case "transition":
if(typeof(val) !== "string"){
val = self.options[key];
}
break;
case "complete":
case "before":
if(typeof(val) !== "function"){
val = self.options[key];
}
break;
case "index":
if(typeof(val) !== "boolean"){
if(!$.isArray(val)){
val = self.options[key];
}
}
break;
}
self.options[key] = val;
}
};
var setupDimensions = function(){
height = el.height();
width = el.width();
el.css('height', height + "px");
spine_inner_width = 0;
spine_outer_width = 0;
if(self.options.hideSpines !== true && self.spines.length > 0){
spine_inner_width = $(self.spines[0]).height();
spine_outer_width = $(self.spines[0]).outerHeight();
}
slide_width = width - spine_outer_width*self.spines.length;
if(self.options.hideSpines === true){
slide_width = width;
}
spine_half_width = Math.ceil(spine_inner_width/2);
};
var initialize = function(opts){
if((self.browser.opera && self.browser.version < "10.5") || self.browser.msie6 || self.browser.firefox2 || self.browser.firefox30){
if(typeof(console) != "undefined"){
if(typeof(console.error) == "function"){
console.error("This web browser is not supported by SlideDeck. Please view this page in a modern, CSS3 capable browser or a current version of Inernet Explorer");
}
}
return false;
}
if(typeof(opts) != "undefined"){
for(var key in opts){
self.options[key] = opts[key];
}
}
if(self.spines.length < 1){
self.options.hideSpines = true;
}
if(self.options.hideSpines === true){
self.options.activeCorner = false;
}
self.current = Math.min(self.slides.length,Math.max(1,self.options.start));
if(el.height() > 0){
setupDimensions();
buildDeck();
} else {
var startupTimer;
startupTimer = setTimeout(function(){
setupDimensions();
if(el.height() > 0){
clearInterval(startupTimer);
setupDimensions();
buildDeck();
}
}, 20);
}
};
var loaded = function(func){
var thisTimer;
thisTimer = setInterval(function(){
if(self.isLoaded == true){
clearInterval(thisTimer);
func();
}
}, 20);
};
this.loaded = function(func){
loaded(func);
return self;
};
this.next = function(params){
var nextSlide = Math.min(self.slides.length,(self.current + 1));
if(self.options.cycle === true){
if(self.current + 1 > self.slides.length){
nextSlide = 1;
}
}
slide(nextSlide,params);
return self;
};
this.prev = function(params){
var prevSlide = Math.max(1,(self.current - 1));
if(self.options.cycle === true){
if(self.current - 1 < 1){
prevSlide = self.slides.length;
}
}
slide(prevSlide,params);
return self;
};
this.goTo = function(ind,params){
self.pauseAutoPlay = true;
slide(Math.min(self.slides.length,Math.max(1,ind)),params);
return self;
};
this.setOption = function(opts,val){
setOption(opts,val);
return self;
};
initialize(opts);
};
$.fn.slidedeck = function(opts){
var returnArr = [];
for(var i=0; i 1 ? returnArr : returnArr[0];
};
})(jQuery);
// source --> http://www.buchananjoinery.co.uk/wp-content/plugins/ckeditor-for-wordpress/ckeditor/ckeditor.js?t=F7J8&ver=4.5.3.3
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(){if(!window.CKEDITOR||!window.CKEDITOR.dom)window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,e={timestamp:"F7J8",version:"4.5.3 (Full)",revision:"6c70c82",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),e=0;e=0;p--)if(g[p].priority<=f){g.splice(p+1,0,h);return{removeListener:k}}g.unshift(h)}return{removeListener:k}},once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,
arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},i=0,j=function(){i=1};return function(f,h,k){var g=e(this)[f],f=a,m=i;a=i=0;if(g){var p=g.listeners;if(p.length)for(var p=p.slice(0),q,o=0;o=0&&i.listeners.splice(j,1)}},removeAllListeners:function(){var a=e(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=e(this)[a])&&a.listeners.length>0}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),e=a.match(/edge[ \/](\d+.?\d*)/),b=a.indexOf("trident/")>-1,b=!(!e&&!b),b={ie:b,edge:!!e,webkit:!b&&
a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,b=window.location.hostname;return a!=b&&a!="["+b+"]"},secure:location.protocol=="https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.ie;if(b.webkit)a.indexOf("chrome")>-1?b.chrome=
true:b.safari=true;var c=0;if(b.ie){c=e?parseFloat(e[1]):b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=c==9;b.ie8Compat=c==8;b.ie7Compat=c==7;b.ie6Compat=c<7||b.quirks}if(b.gecko)if(e=a.match(/rv:([\d\.]+)/)){e=e[1].split(".");c=e[0]*1E4+(e[1]||0)*100+(e[2]||0)*1}b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=!(b.ie&&c<7)&&!(b.gecko&&c<4E4)&&!(b.webkit&&
c<534);b.hidpi=window.devicePixelRatio>=2;b.needsBrFiller=b.gecko||b.webkit||b.ie&&c>10;b.needsNbspFiller=b.ie&&c<11;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.webkit?"webkit":"unknown");if(b.quirks)b.cssClass=b.cssClass+" cke_browser_quirks";if(b.ie)b.cssClass=b.cssClass+(" cke_browser_ie"+(b.quirks?"6 cke_browser_iequirks":b.version));if(b.air)b.cssClass=b.cssClass+" cke_browser_air";if(b.iOS)b.cssClass=b.cssClass+" cke_browser_ios";if(b.hidpi)b.cssClass=b.cssClass+" cke_hidpi";return b}()),
"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=
CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},e*1E3)}})})();CKEDITOR.status="basic_loaded"}(),CKEDITOR.dom={},function(){var a=[],e=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,d=/",amp:"&",quot:'"',nbsp:" ",shy:""},h=function(a,g){return g[0]=="#"?
String.fromCharCode(parseInt(g.slice(1),10)):f[g]};CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,g){if(!a&&!g)return true;if(!a||!g||a.length!=g.length)return false;for(var b=0;b"+g+""):b.push('');return b.join("")},htmlEncode:function(a){return a===void 0||a===null?"":(""+a).replace(b,"&").replace(c,
">").replace(d,"<")},htmlDecode:function(a){return a.replace(j,h)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(i,""")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},transformPlainTextToHtml:function(a,g){var b=g==CKEDITOR.ENTER_BR,f=this.htmlEncode(a.replace(/\r\n/g,"\n")),f=f.replace(/\t/g," "),h=g==CKEDITOR.ENTER_P?"p":"div";if(!b){var c=/\n{2}/g;if(c.test(f))var d="<"+h+">",e=""+h+">",f=d+f.replace(c,function(){return e+
d})+e}f=f.replace(/\n/g,"
");b||(f=f.replace(RegExp("
(?="+h+">)"),function(a){return CKEDITOR.tools.repeat(a,2)}));f=f.replace(/^ | $/g," ");return f=f.replace(/(>|\s) /g,function(a,g){return g+" "}).replace(/ (?=<)/g," ")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",g=0;g<8;g++)a=a+Math.floor((1+Math.random())*65536).toString(16).substring(1);return a},override:function(a,
g){var b=g(a);b.prototype=a.prototype;return b},setTimeout:function(a,g,b,f,h){h||(h=window);b||(b=h);return h.setTimeout(function(){f?a.apply(b,[].concat(f)):a.apply(b)},g||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(g){return g.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(g){return g.replace(a,"")}}(),indexOf:function(a,g){if(typeof g=="function")for(var b=
0,f=a.length;b=0?a[b]:null},bind:function(a,g){return function(){return a.apply(g,arguments)}},createClass:function(a){var g=a.$,b=a.base,f=a.privates||a._,h=a.proto,a=a.statics;!g&&(g=function(){b&&this.base.apply(this,arguments)});if(f)var c=g,g=function(){var a=this._||(this._={}),g;for(g in f){var b=f[g];a[g]=
typeof b=="function"?CKEDITOR.tools.bind(b,this):b}c.apply(this,arguments)};if(b){g.prototype=this.prototypedCopy(b.prototype);g.prototype.constructor=g;g.base=b;g.baseProto=b.prototype;g.prototype.base=function(){this.base=b.prototype.base;b.apply(this,arguments);this.base=arguments.callee}}h&&this.extend(g.prototype,h,true);a&&this.extend(g,a,true);return g},addFunction:function(b,g){return a.push(function(){return b.apply(g||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var g=
a[b];return g&&g.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,g;return function(b){g=CKEDITOR.tools.trim(b+"")+"px";return a.test(g)?g:b||""}}(),convertToPx:function(){var a;return function(g){if(!a){a=CKEDITOR.dom.element.createFromHtml('',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(g)){a.setStyle("width",g);return a.$.clientWidth}return g}}(),
repeat:function(a,g){return Array(g+1).join(a)},tryThese:function(){for(var a,g=0,b=arguments.length;g]*?>)|^/i,'$&\n