/* plugin: jquery parallax version 1.1.3 author: ian lunn twitter: @ianlunn author url: http://www.ianlunn.co.uk/ plugin url: http://www.ianlunn.co.uk/plugins/jquery-parallax/ dual licensed under the mit and gpl licenses: http://www.opensource.org/licenses/mit-license.php http://www.gnu.org/licenses/gpl.html */ (function( $ ){ var $window = $(window); var windowheight = $window.height(); $window.resize(function () { windowheight = $window.height(); }); $.fn.parallax = function(xpos, speedfactor, outerheight) { var $this = $(this); var getheight; var firsttop; var paddingtop = 0; //get the starting position of each element to have parallax applied to it $this.each(function(){ firsttop = $this.offset().top; }); if (outerheight) { getheight = function(jqo) { return jqo.outerheight(true); }; } else { getheight = function(jqo) { return jqo.height(); }; } // setup defaults if arguments aren't specified if (arguments.length < 1 || xpos === null) xpos = "50%"; if (arguments.length < 2 || speedfactor === null) speedfactor = 0.1; if (arguments.length < 3 || outerheight === null) outerheight = true; // function to be called whenever the window is scrolled or resized function update(){ var pos = $window.scrolltop(); $this.each(function(){ var $element = $(this); var top = $element.offset().top; var height = getheight($element); // check if totally above or totally below viewport if (top + height < pos || top > pos + windowheight) { return; } $this.css('backgroundposition', xpos + " " + math.round((firsttop - pos) * speedfactor) + "px"); }); } $window.bind('scroll', update).resize(update); update(); }; })(jquery); /* * jquery owlcarousel v1.3.3 * * copyright (c) 2013 bartosz wojciechowski * http://www.owlgraphic.com/owlcarousel/ * * licensed under mit * */ /*js lint helpers: */ /*global dragmove: false, dragend: false, $, jquery, alert, window, document */ /*jslint nomen: true, continue:true */ if (typeof object.create !== "function") { object.create = function (obj) { function f() {} f.prototype = obj; return new f(); }; } (function ($, window, document) { var carousel = { init : function (options, el) { var base = this; base.$elem = $(el); base.options = $.extend({}, $.fn.owlcarousel.options, base.$elem.data(), options); base.useroptions = options; base.loadcontent(); }, loadcontent : function () { var base = this, url; function getdata(data) { var i, content = ""; if (typeof base.options.jsonsuccess === "function") { base.options.jsonsuccess.apply(this, [data]); } else { for (i in data.owl) { if (data.owl.hasownproperty(i)) { content += data.owl[i].item; } } base.$elem.html(content); } base.login(); } if (typeof base.options.beforeinit === "function") { base.options.beforeinit.apply(this, [base.$elem]); } if (typeof base.options.jsonpath === "string") { url = base.options.jsonpath; $.getjson(url, getdata); } else { base.login(); } }, login : function () { var base = this; base.$elem.data("owl-originalstyles", base.$elem.attr("style")); base.$elem.data("owl-originalclasses", base.$elem.attr("class")); base.$elem.css({opacity: 0}); base.orignalitems = base.options.items; base.checkbrowser(); base.wrapperwidth = 0; base.checkvisible = null; base.setvars(); }, setvars : function () { var base = this; if (base.$elem.children().length === 0) {return false; } base.baseclass(); base.eventtypes(); base.$useritems = base.$elem.children(); base.itemsamount = base.$useritems.length; base.wrapitems(); base.$owlitems = base.$elem.find(".owl-item"); base.$owlwrapper = base.$elem.find(".owl-wrapper"); base.playdirection = "next"; base.previtem = 0; base.prevarr = [0]; base.currentitem = 0; base.customevents(); base.onstartup(); }, onstartup : function () { var base = this; base.updateitems(); base.calculateall(); base.buildcontrols(); base.updatecontrols(); base.response(); base.moveevents(); base.stoponhover(); base.owlstatus(); if (base.options.transitionstyle !== false) { base.transitiontypes(base.options.transitionstyle); } if (base.options.autoplay === true) { base.options.autoplay = 5000; } base.play(); base.$elem.find(".owl-wrapper").css("display", "block"); if (!base.$elem.is(":visible")) { base.watchvisibility(); } else { base.$elem.css("opacity", 1); } base.onstartup = false; base.eachmoveupdate(); if (typeof base.options.afterinit === "function") { base.options.afterinit.apply(this, [base.$elem]); } }, eachmoveupdate : function () { var base = this; if (base.options.lazyload === true) { base.lazyload(); } if (base.options.autoheight === true) { base.autoheight(); } base.onvisibleitems(); if (typeof base.options.afteraction === "function") { base.options.afteraction.apply(this, [base.$elem]); } }, updatevars : function () { var base = this; if (typeof base.options.beforeupdate === "function") { base.options.beforeupdate.apply(this, [base.$elem]); } base.watchvisibility(); base.updateitems(); base.calculateall(); base.updateposition(); base.updatecontrols(); base.eachmoveupdate(); if (typeof base.options.afterupdate === "function") { base.options.afterupdate.apply(this, [base.$elem]); } }, reload : function () { var base = this; window.settimeout(function () { base.updatevars(); }, 0); }, watchvisibility : function () { var base = this; if (base.$elem.is(":visible") === false) { base.$elem.css({opacity: 0}); window.clearinterval(base.autoplayinterval); window.clearinterval(base.checkvisible); } else { return false; } base.checkvisible = window.setinterval(function () { if (base.$elem.is(":visible")) { base.reload(); base.$elem.animate({opacity: 1}, 200); window.clearinterval(base.checkvisible); } }, 500); }, wrapitems : function () { var base = this; base.$useritems.wrapall("