Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function include(url){
- document.write('<script src="'+url+'"></script>');
- return false ;
- }
- /* cookie.JS
- ========================================================*/
- include('js/jquery.cookie.js');
- /* DEVICE.JS
- ========================================================*/
- include('js/device.min.js');
- /* Stick up menu
- ========================================================*/
- include('js/tmstickup.js');
- $(window).load(function() {
- if ($('html').hasClass('desktop')) {
- $('#stuck_container').TMStickUp({
- })
- }
- });
- /* Easing library
- ========================================================*/
- include('js/jquery.easing.1.3.js');
- /* ToTop
- ========================================================*/
- include('js/jquery.ui.totop.js');
- $(function () {
- $().UItoTop({ easingType: 'easeOutQuart' });
- });
- /* DEVICE.JS AND SMOOTH SCROLLIG
- ========================================================*/
- include('js/jquery.mousewheel.min.js');
- include('js/jquery.simplr.smoothscroll.min.js');
- $(function () {
- if ($('html').hasClass('desktop')) {
- $.srSmoothscroll({
- step:150,
- speed:800
- });
- }
- });
- /* Stellar.js
- ========================================================*/
- include('js/stellar/jquery.stellar.js');
- $(document).ready(function() {
- if ($('html').hasClass('desktop')) {
- $.stellar({
- horizontalScrolling: false,
- verticalOffset: 20
- });
- }
- });
- /* Copyright Year
- ========================================================*/
- var currentYear = (new Date).getFullYear();
- $(document).ready(function() {
- $("#copyright-year").text( (new Date).getFullYear() );
- });
- /* Superfish menu
- ========================================================*/
- include('js/superfish.js');
- include('js/jquery.mobilemenu.js');
- /* Orientation tablet fix
- ========================================================*/
- $(function(){
- // IPad/IPhone
- var viewportmeta = document.querySelector && document.querySelector('meta[name="viewport"]'),
- ua = navigator.userAgent,
- gestureStart = function () {viewportmeta.content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6, initial-scale=1.0";},
- scaleFix = function () {
- if (viewportmeta && /iPhone|iPad/.test(ua) && !/Opera Mini/.test(ua)) {
- viewportmeta.content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
- document.addEventListener("gesturestart", gestureStart, false);
- }
- };
- scaleFix();
- // Menu Android
- if(window.orientation!=undefined){
- var regM = /ipod|ipad|iphone/gi,
- result = ua.match(regM)
- if(!result) {
- $('.sf-menu li').each(function(){
- if($(">ul", this)[0]){
- $(">a", this).toggle(
- function(){
- return false;
- },
- function(){
- window.location.href = $(this).attr("href");
- }
- );
- }
- })
- }
- }
- });
- var ua=navigator.userAgent.toLocaleLowerCase(),
- regV = /ipod|ipad|iphone/gi,
- result = ua.match(regV),
- userScale="";
- if(!result){
- userScale=",user-scalable=0"
- }
- document.write('<meta name="viewport" content="width=device-width,initial-scale=1.0'+userScale+'">');
- /* Camera
- ========================================================*/
- $(document).ready(function () {
- var camera = $('#camera_wrap_1');
- if(camera.length > 0 ){
- camera.camera({
- minHeight: '392px',
- height: '48%',
- loader: 'none',
- pagination: true,
- thumbnails: false,
- overlayer: true,
- fx: 'simpleFade',
- playPause: false,
- navigation: false
- });
- }
- });
- /* Parallax
- ========================================================*/
- (function ($) {
- var o = $('.parallax');
- if (o.length > 0 && $('html').hasClass('desktop')) {
- include('js/jquery.rd-parallax.js');
- }
- })(jQuery);
- /* Carousel
- ========================================================*/
- $(document).ready(function(){
- var carousel = $('.owl-carousel');
- if(carousel.length > 0 ) {
- carousel.owlCarousel({
- loop:true,
- margin:10000,
- autoWidth: false,
- stagePadding: 10,
- items: 1,
- center: true,
- nav: true,
- navText: [ '', '' ],
- navClass: [ 'owl-prev', 'owl-next' ]
- });
- }
- });
- /* Google Map
- ========================================================*/
- ;
- (function ($) {
- var o = document.getElementById("google-map");
- if (o) {
- include('//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false');
- $(document).ready(function () {
- var mapOptions = {
- zoom: 14,
- center: new google.maps.LatLng(parseFloat(40.646197), parseFloat(-73.9724068, 14)),
- scrollwheel: false
- }
- new google.maps.Map(o, mapOptions);
- });
- }
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement