Created
May 20, 2019 14:57
-
-
Save denisz/4f285c1442e4da4d578c77ed062dd3a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).ready(function() { | |
setTimeout(function() { | |
$('body').addClass('loaded'); | |
}, 200); | |
}); | |
$(window).load(function() { | |
if (location.hash === '#tickets') { | |
openBuyPopup(); | |
} | |
$(document).on('click', '.buylink', openBuyPopup); | |
}); | |
function openBuyPopup() { | |
var opt = { id: 453795, forgetOriginalHash: true, mobileUse: true }; | |
radario.openBuyPopup(opt); | |
} | |
$.fn.ntabs = function() { | |
var selector = this; | |
this.each(function() { | |
var obj = $(this); | |
$(obj.attr('href')).hide(); | |
obj.click(function() { | |
$(selector).removeClass('selected'); | |
$(this).addClass('selected'); | |
$($(this).attr('href')).fadeIn(); | |
$(selector).not(this).each(function(i, element) { | |
$($(element).attr('href')).hide(); | |
}); | |
return false; | |
}); | |
}); | |
$(this).show(); | |
$(this).first().click(); | |
}; | |
$(function() { | |
$("#tabs li > a").ntabs(); | |
}); | |
$(window).scroll(function(){ | |
if ($(window).scrollTop() > 50){ | |
$("body").addClass('pushed'); | |
} else { | |
$("body").removeClass('pushed'); | |
} | |
}); | |
$('.arrow').click(function() { | |
$('html, body').animate({ | |
scrollTop: 100 | |
}, 400); | |
}); | |
$('.open-menu').click(function() { | |
$('.panel').addClass('opened'); | |
}); | |
$('#close-menu').click(function() { | |
$('.panel').removeClass('opened'); | |
}); | |
Share = { | |
vkontakte: function (purl, ptitle, pimg, text) { | |
url = 'http://vk.com/share.php?'; | |
url += 'url=' + encodeURIComponent(purl); | |
url += '&title=' + encodeURIComponent(ptitle); | |
url += '&description=' + encodeURIComponent(text); | |
url += '&image=' + encodeURIComponent(pimg); | |
url += '&noparse=true'; | |
Share.popup(url); | |
}, | |
facebook: function (purl, ptitle, pimg, text) { | |
url = 'http://www.facebook.com/sharer.php?s=100'; | |
url += '&p[title]=' + encodeURIComponent(ptitle); | |
url += '&p[summary]=' + encodeURIComponent(text); | |
url += '&p[url]=' + encodeURIComponent(purl); | |
url += '&p[images][0]=' + encodeURIComponent(pimg); | |
Share.popup(url); | |
}, | |
twitter: function (purl, ptitle) { | |
url = 'http://twitter.com/share?'; | |
url += 'text=' + encodeURIComponent(ptitle); | |
url += '&url=' + encodeURIComponent(purl); | |
url += '&counturl=' + encodeURIComponent(purl); | |
Share.popup(url); | |
}, | |
popup: function (url) { | |
window.open(url, '', 'toolbar=0,status=0,width=626,height=436'); | |
} | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment