function db_modosit(db,id)
{
document.location.href='/shop/kosar/&f=kosarba&db='+db+'&id='+id;
}
$(function() {
$('#mitkeres').on("click",function(){
if ($(this).val() == "keresés a website-on" ) { $(this).val(''); }
});
$('.diszkografialista .cont').hover(function(){
$(this).css('background-color','#383838');
},
function() {
$(this).css('background-color','#222222');
});
});
$(document).ready(function() {
$('.tovabb').on('click',function(){
});
$('iframe').each(function() {
var url = $(this).attr("src");
if ($(this).attr("src").indexOf("?") > 0) {
$(this).attr({
"src" : url + "&wmode=transparent",
"wmode" : "Opaque"
});
}
else {
$(this).attr({
"src" : url + "?wmode=transparent",
"wmode" : "Opaque"
});
}
});
$('#albumcarousel').jcarousel();
$('#dalszovegList').listnav();
var idezetbe = 0;
var magassag1 = 0;
var magassag2 = 0;
var magassag3 = 0;
var magassag4 = 0;
var atlatszosag = 1;
var atlatszosag2 = 1;
var atlatszosag4 = 1;
var szelesseg1 = 0;
$(window).scroll(function(){
if( $(window).scrollTop() >= 130 ) {
// $('.menucont').css('padding-top',30-(30/$(window).scrollTop() * 30)+'px');
$('.menucont').css('height',55-(55/$(window).scrollTop())+'px');
$('.menucont').css('padding-top',40-parseInt(40/$(window).scrollTop())+'px');
//console.log('---'+(55-(55/$(window).scrollTop())));
//console.log('---'+(40-parseInt(40/$(window).scrollTop())));
//console.log('---'+$(window).scrollTop()+'|');
// $('.menucont').css('padding-top','30px');
//console.log('----'+$(window).scrollTop());
if( $(window).scrollTop() < 370 ) {
magassag1 = 125-(125/$(window).scrollTop() * 125)+10;
magassag3 = (40/$(window).scrollTop()*60)*2;
szelesseg1 = 150*($(window).scrollTop()/370);
magassag4 = (370/$(window).scrollTop())*17.4;
$('.mplogo .mpimgcont').css('position','absolute');
$('.mplogo .mpimgcont').css('top',(150/$(window).scrollTop())*17.4+'px');
$('.mplogo .mptxtcont').css('top',magassag4-38+'px');
//console.log('mag='+magassag4);
$('#idezet').css('position','absolute');
$('#idezet').css('height',magassag1+'px');
$('#cont').css('padding-top',magassag1+0+'px');
// $('.orizztxt').css('padding-top',20+magassag3+'px');
$('#idezet').css('top','');
} else {
$('.mplogo .mpimgcont').css('position','');
magassag4 = (370/$(window).scrollTop())*17.4;
// $('.mplogo .mpimgcont').css('position','absolute');
// $('.mplogo .mpimgcont').css('top',magassag4+'px');
$('.mplogo .mptxtcont').css('top',magassag4-40+'px');
$('.mplogo .mpimgcont').css('top','0px');
$('#idezet').css('position','fixed');
$('#idezet').css('top','79px');
}
} else {
$('.mplogo .mpimglogo').css('position','fixed');
magassag4 = (130/$(window).scrollTop()*17.4);
$('.mplogo .mpimgcont').css('position','');
$('.mplogo .mpimgcont').css('top','50px');
$('.mplogo .mptxtcont').css('top','3px');
$('#idezet').css('height','0px');
magassag2 = 100-($(window).scrollTop()/10)+($(window).scrollTop()/1.3);
atlatszosag2 = 1-$(window).scrollTop()/100;
atlatszosag4 = $(window).scrollTop()/100;
$('#logonagy').css('position','relative');
$('#logonagy').css('top',magassag2-130+'px');
$('#logonagy').css('opacity',atlatszosag2);
$('#elore').css('position','relative');
$('#elore').css('top',magassag2-130+'px');
$('#elore').css('opacity',atlatszosag2);
$('.menucont').css('padding-top','15px');
$('.menucont').css('height','35px');
// $('.menucont').css('height',(35/$(window).scrollTop() * 35)+20+'px');
// $('.menucont').css('padding-top',(15/$(window).scrollTop() * 15)+'px');
//console.log((15/$(window).scrollTop() * 15)+'px');
}
});
$('#intro').parallax("50%", 0.1);
$('#idezet').parallax("50%", 0.1);
$('#logonagy').parallax("50%", 0);
$('#elore').parallax("50%", 0);
});
/*
// touch
function touchStartHandler(e) {
//e.preventDefault();
touchStart.x = e.touches[0].pageX;
// Store the position of finger on swipe begin:
touchStart.y = e.touches[0].pageY;
// Store scroll val on swipe begin:
scrollStart = scrollTop;
};
function touchEndHandler(e) {
}
function touchMoveHandler(e) {
e.preventDefault();
offset = {};
offset.x = touchStart.x - e.touches[0].pageX;
// Get distance finger has moved since swipe begin:
offset.y = touchStart.y - e.touches[0].pageY;
// Add finger move dist to original scroll value
scrollTop = Math.max(0, scrollStart + offset.y);
checkScrollExtents();
}
function isTouch() {
return 'ontouchstart' in window;
}
function checkScrollExtents() {
if (scrollTop < 0)
scrollTop = 0;
else if (scrollTop > settings.maxScroll)
scrollTop = settings.maxScroll;
}
touch = isTouch();
if (touch) {
alert('touch');
var container = settings.container[0];
container.addEventListener('touchstart', touchStartHandler, true);
container.addEventListener('touchmove', touchMoveHandler, true);
container.addEventListener('touchend', touchEndHandler, true);
}
*/
document.addEventListener("touchmove", ScrollStart, false);
document.addEventListener("scroll", Scroll, false);
function ScrollStart() {
//start of scroll event for iOS
}
function Scroll() {
//end of scroll event for iOS
//and
//start/end of scroll event for other browsers
}
function keres()
{
document.location.href='/kereso/?mitkeres='+jQuery('#mitkeres').val()
}