jQuery(document).ready(function($){

/*--- [start] equal height columns with jquery---*/
function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

$(document).ready(function() {
	equalHeight($('div.wp_bannerize_main ul li'));
});
/*--- [end] equal height columns with jquery---*/

$('div.wp_bannerize_main ul li:nth-child(1)').addClass('ban_main_firs');
$('div.wp_bannerize_main ul li:nth-child(2)').addClass('ban_main_second');
$('div.wp_bannerize_main ul li:nth-child(3)').addClass('ban_main_last');


$('div.style table').attr({cellpadding: 0, cellspacing: 0, border:0});
$('div.style table tr:nth-child(1)').addClass('tr_top');
$('div.style table tr:nth-child(even)').addClass('tr_bg'); 


$('.defaultDOMWindow').openDOMWindow({ 
eventType:'click'
}); 

$('a[href=#tour]').click(function(){
	$('div#tour').removeClass('hidden');
});

$('div.tour_box a.closeDom').click(function(){
	$('div#tour').addClass('hidden');
});

$('a[href=#vhod]').click(function(){

	$('div#vhod').removeClass('hidden');

});



$('div#vhod a.closeDom').click(function(){
$('div#vhod').addClass('hidden');
});

$('div#reg a.closeDom').click(function(){
$('div#reg').addClass('hidden');
});

$('a.register_here').click(function(){
$('div#vhod').addClass('hidden');
$('div#reg').removeClass('hidden');
});

$('.closeDom').closeDOMWindow({eventType:'click'}); 

/*
$(window).scroll(function() {
    $('.grey_left').css('top', $(this).scrollTop() + "px");
	$('.grey_right').css('top', $(this).scrollTop() +  "px");
});


$(function() {
		var offset = $(".languages").offset();
		var topPadding = 46;
		$(window).scroll(function() {
			if ($(window).scrollTop() > offset.top) {
				$(".languages").stop().animate({marginTop: $(window).scrollTop() - offset.top + topPadding});
			}
			else {$(".languages").stop().animate({marginTop: 0});};});
	});

$(function() {
		var offset = $(".senders").offset();
		var topPadding = 138;
		$(window).scroll(function() {
			if ($(window).scrollTop() > offset.top) {
				$(".senders").stop().animate({marginTop: $(window).scrollTop() - offset.top + topPadding});
			}
			else {$(".senders").stop().animate({marginTop: 0});};});
	});



$('div.str_block ul li').each(function(){
var thisID = $(this).attr('id');
 if ($('body').hasClass(thisID)){
 $(this).addClass('active-post');
 }
}); 
*/

$(window).scroll(function(){
if ($(window).height() > 700) {


  $('.languages').animate({top:$(window).scrollTop()+ 46 + "px" },{queue: false, duration: 250});
  $('.senders').animate({top:$(window).scrollTop()+ 138 + "px" },{queue: false, duration: 250});
    $('.grey_left').animate({top:$(window).scrollTop() + 1 + "px" },{queue: false, duration: 0});
	  $('.grey_right').animate({top:$(window).scrollTop() + 1 + "px" },{queue: false, duration: 0});

} else {
	
	$('.languages').animate({top:46 + "px" },{queue: false, duration: 250});
  $('.senders').animate({top:138 + "px" },{queue: false, duration: 250});
    $('.grey_left').animate({top:1 + "px" },{queue: false, duration: 0});
	  $('.grey_right').animate({top:1 + "px" },{queue: false, duration: 0});
}

});

$('.random').randomImage();






});

































