%PDF- %PDF-
Direktori : /home/eirtvhdf/asbatechs.ie/order-assets/js/ |
Current File : //home/eirtvhdf/asbatechs.ie/order-assets/js/functions.js |
function order_now_value(objButton){ x = objButton.name; document.getElementById('lead_area').value = x; //document.getElementById('lead_text').innerHTML = x; document.getElementById('lead_org_price').value = "99"; } //Video Function Start function video_price() { var video_x = document.getElementById("video_seconds_select").value; var video_y = document.getElementById("prices").innerHTML = "" + video_x; var video_price_field = document.getElementById("price_field").value = "" + video_x; document.getElementById("price").style.display = "block"; //alert($("#video_seconds_select").prop('selectedIndex')); //var f = video_x + video_y; // document.getElementById("prices-org").innerHTML = f; } $(document).ready(function() { $(function() { var sliceFirst = $("#portfolio .col-md-3").slice(0, 20).show(); $(sliceFirst).css('display', 'inline-block'); $("#loadMore").on('click', function(e) { e.preventDefault(); var sliceAfter = $("#portfolio .col-md-3:hidden").slice(0, 4).slideDown(); $(sliceAfter).css('display', 'inline-block'); if ($("#portfolio .col-md-3:hidden").length == 0) { $("#loadMore").fadeOut('fast'); } $('html,body').animate({ scrollTop: $(this).offset().top }, 1500); }); }); var str=location.href.toLowerCase(); $(".header_menu li a").each(function() { if (str.indexOf(this.href.toLowerCase()) > -1) { $("li.active_nav").removeClass("active_nav"); $(this).parent().addClass("active_nav"); } }); $("li.header_menu").parents().each(function(){ if ($(this).is(".header_menu li")){ $(this).addClass("active_nav"); } }); $("#form2-validate").validate(); $("li:first-child").addClass("first"); $("li:last-child").addClass("last"); $('section.packages a, section.branding_solution .order_button, section.cta ul li a, .branding-mob-btn .order_button').click( function(){ $('.popup-form').show(300).addClass('visibleit'); $('.cus-overlay').fadeIn(300); }); $('.cus-overlay').click( function(){ $('.popup-form').css({'overflow':'hidden'}) $('.popup-form').hide(300); $(this).fadeOut(300); }); $('a.close').click( function(){ $('.cus-overlay').trigger('click'); }); //Website step Function $('#domain_name').change(function(){ $('.domain_hide').hide(); $('#' + $(this).val()).show(); }); $('#web_content').change(function(){ $('.web_hide').hide(); $('#' + $(this).val()).show(); }); //Addons Function Start $('.addon-btn input[type=checkbox]').click(function() { if(this.checked == true) { $(this).parent().parent().addClass('selected'); } else { $(this).parent().parent().removeClass('selected'); } }); //End Addon Function //Video Cut Price Function Start $('#video_seconds_select').change(function(){ var selected = $(this).find('option:selected'); //$('#text').html(selected.text()); //$('#value').html(selected.val()); $('#video_duration').val(selected.data('foo')); $('#video_org_price').html(selected.data('name')); }).change(); $(".various").click(function(){ var pkgname=$(this).attr('title'); if ($(this).attr('title') !== undefined) { $('#lead_pkg_name').html(pkgname); $('#lead_name_field').val(pkgname); return; } else { var pkgname=$(this).attr('title'); $('#lead_pkg_name').html("As Good as it Gets!"); } return false; //Second Inner Function $('#lead_pkg_name').html(function(index, curHTML) { var lead_popup_text = curHTML.split(/[\s-]/), lead_new_text = '<span class="some">' + lead_popup_text.pop() + '</span>'; return lead_popup_text.join(' ').concat(' ' + lead_new_text); }); }); $(".various").click(function(){ var orgPrice=$(this).attr('href').split('=')[1] return false; }); $( '.header_menu li, ul.nav.navbar-nav li' ).hover( function(){ $(this).children('.sub-menu').slideDown(200); }, function(){ $(this).children('.sub-menu').slideUp(200); } ); $("form.jform.validate").validate(); $(".contact_form").validate(); $('.menu li a').click(function(e) { e.preventDefault(); $('a').removeClass('active'); $(this).addClass('active'); }); /***Fancy Box POPUP***/ $('.portfolio_various').fancybox({ padding: 2 }); $('.get_quote_form').fancybox(); /**NAVIGATION**/ $(function () { $('.navigation li ul').hide().removeClass('submenu'); $('.navigation li').hover(function () { $('ul', this).stop().slideToggle(200); }); }); /***END***/ /***SLIDERS**/ $("#testimonial_slider").owlCarousel({ items : 1, autoPlay:true, pagination : true, paginationNumbers: false, responsiveClass:true, responsive:{ 0:{ items:1, nav:true }, 600:{ items:1, nav:false }, 1000:{ items:1, nav:true, loop:false } }, navigation:true, navigationText: [ "", "" ], }); var owl = $("#what_we_do_carousel"); owl.owlCarousel({ items :4, autoPlay:true, loop: true, pagination : true, paginationNumbers: false, responsiveClass:true, navigation : true, singleItem : false, transitionStyle : "fade", responsive:{ 0:{ items:1, nav:true }, 600:{ items:2, nav:false }, 1000:{ items:4, nav:true, loop:false } }, navigation:true, navigationText: [ "", "" ], }); var owl = $("#slider"); owl.owlCarousel({ items :1, autoPlay:true, loop: true, pagination : true, paginationNumbers: false, responsiveClass:true, navigation : true, singleItem : true, transitionStyle : "fade", responsive:{ 0:{ items:1, nav:true }, 600:{ items:1, nav:false }, 1000:{ items:1, nav:true, loop:false } }, navigation:true, navigationText: [ "", "" ], }); function t() { e($(".cd-headline.letters").find("b")), s($(".cd-headline")) } function e(t) { t.each(function() { var t = $(this), e = t.text().split(""), s = t.hasClass("is-visible"); for (i in e) t.parents(".rotate-2").length > 0 && (e[i] = "<em>" + e[i] + "</em>"), e[i] = s ? '<i class="in">' + e[i] + "</i>" : "<i>" + e[i] + "</i>"; var n = e.join(""); t.html(n).css("opacity", 1) }) } function s(t) { var e = c; t.each(function() { var t = $(this); if (t.hasClass("loading-bar")) e = u, setTimeout(function() { t.find(".cd-words-wrapper").addClass("is-loading") }, p); else if (t.hasClass("clip")) { var i = t.find(".cd-words-wrapper"), s = i.width() + 10; i.css("width", s) } else if (!t.hasClass("type")) { var o = t.find(".cd-words-wrapper b"), r = 0; o.each(function() { var t = $(this).width(); t > r && (r = t) }), t.find(".cd-words-wrapper").css("width", r) } setTimeout(function() { n(t.find(".is-visible").eq(0)) }, e) }) } function n(t) { var e = l(t); if (t.parents(".cd-headline").hasClass("type")) { var i = t.parent(".cd-words-wrapper"); i.addClass("selected").removeClass("waiting"), setTimeout(function() { i.removeClass("selected"), t.removeClass("is-visible").addClass("is-hidden").children("i").removeClass("in").addClass("out") }, v), setTimeout(function() { o(e, m) }, g) } else if (t.parents(".cd-headline").hasClass("letters")) { var s = t.children("i").length >= e.children("i").length ? !0 : !1; r(t.find("i").eq(0), t, s, f), a(e.find("i").eq(0), e, s, f) } else t.parents(".cd-headline").hasClass("clip") ? t.parents(".cd-words-wrapper").animate({ width: "2px" }, y, function() { d(t, e), o(e) }) : t.parents(".cd-headline").hasClass("loading-bar") ? (t.parents(".cd-words-wrapper").removeClass("is-loading"), d(t, e), setTimeout(function() { n(e) }, u), setTimeout(function() { t.parents(".cd-words-wrapper").addClass("is-loading") }, p)) : (d(t, e), setTimeout(function() { n(e) }, c)) } function o(t, e) { t.parents(".cd-headline").hasClass("type") ? (a(t.find("i").eq(0), t, !1, e), t.addClass("is-visible").removeClass("is-hidden")) : t.parents(".cd-headline").hasClass("clip") && t.parents(".cd-words-wrapper").animate({ width: t.width() + 10 }, y, function() { setTimeout(function() { n(t) }, w) }) } function r(t, e, i, s) { if (t.removeClass("in").addClass("out"), t.is(":last-child") ? i && setTimeout(function() { n(l(e)) }, c) : setTimeout(function() { r(t.next(), e, i, s) }, s), t.is(":last-child") && $("html").hasClass("no-csstransitions")) { var o = l(e); d(e, o) } } function a(t, e, i, s) { t.addClass("in").removeClass("out"), t.is(":last-child") ? (e.parents(".cd-headline").hasClass("type") && setTimeout(function() { e.parents(".cd-words-wrapper").addClass("waiting") }, 200), i || setTimeout(function() { n(e) }, c)) : setTimeout(function() { a(t.next(), e, i, s) }, s) } function l(t) { return t.is(":last-child") ? t.parent().children().eq(0) : t.next() } function h(t) { return t.is(":first-child") ? t.parent().children().last() : t.prev() } function d(t, e) { t.removeClass("is-visible").addClass("is-hidden"), e.removeClass("is-hidden").addClass("is-visible") } var c = 1e3, u = 2e3, p = u - 3e3, f = 50, m = 150, v = 250, g = v + 250, y = 200, w = 500; t() }); /***END***/ $('.colspArticle a.readBtn').click(function(){ var ths = $(this); if(!ths.hasClass('trgr')){ ths.closest('.colspArticle').find('.moreContnt').stop(0,0).slideToggle('slow'); ths.addClass('trgr').text('Read Less'); }else{ ths.closest('.colspArticle').find('.moreContnt').stop(0,0).slideToggle('slow'); ths.removeClass('trgr').text('Read More'); } }); //showcase FILTER $(function () { var filterList = { init: function () { $('#portfolio').mixitup({ showOnLoad: 'logos', targetSelector: '.col-md-4', filterSelector: '.filter', effects: ['scale'], easing: 'snap', // call the hover effect //onMixEnd: filterList.hoverEffect() }); }, }; // Run the show! filterList.init(); }); $('#sticky-header').affix({ offset: {top: 320} }); //Start Contact Form AJax form $(function() { var form = $('.contact_form'); var formMessages = $('.form-messages'); $(form).submit(function(e) { e.preventDefault(); var formData = $(form).serialize(); var cnname = $('#cn').val(); var emname = $('#em').val(); var pnname = $('#pn').val(); var msgname = $('#msg').val(); if (emname != "" && emname != "" && pnname != "" && msgname != "" ){ $.ajax({ type: 'POST', url: $(form).attr('action'), data: formData }) .done(function(response) { $(formMessages).removeClass('error'); $(formMessages).addClass('success'); $(formMessages).text(response); $('.contact_form .required').val(''); }) .fail(function(data) { $(formMessages).removeClass('success'); $(formMessages).addClass('error'); if (data.responseText !== '') { $(formMessages).text(data.responseText); } else { $(formMessages).text('Oops! An error occured and your message could not be sent.'); } }); } }); }); //End Contact form // document.write("<script id='ze-snippet' src='https://static.zdassets.com/ekr/snippet.js?key=f5b98ad1-3f94-4667-acb8-f1db1ff95064'> </script>"); // function setButtonURL() { // $zopim.livechat.window.toggle(); // } // $('.chat').click( function(){ // $zopim.livechat.window.toggle(); // });