jQuery.noConflict();
(function($) {

$(document).ready(function(){
	$(function() {
		// banners
		$.get('/images/banner/banners.html',function(data){
			$(data).find('#joypalbanners').appendTo('body');
			$('#joypalbannerstag').click(toggleJoypalBanner).hover(function(){
				var src = $(this).attr('src');
				$(this).attr('src',src.replace(/(\.\w+)$/,'_o$1'));
			},function(){
				var src = $(this).attr('src');
				$(this).attr('src',src.replace(/_o(\.\w+)$/,'$1'));
			});
		});
	});
});

var joypalbannersview = true;
function toggleJoypalBanner() {
	if (!joypalbannersview) {
		showJoypalBanner();
	} else {
		hideJoypalBanner();
	}
}
function showJoypalBanner() {
	$('#joypalbannerstag').attr('src','/images/banner/close.png');
	$('#joypalbanners').stop().animate({bottom:'0'},500);
	joypalbannersview = true;
	//joypelbannertimer = null;
}
function hideJoypalBanner() {
	$('#joypalbannerstag').attr('src','/images/banner/open.png');
	$('#joypalbanners').stop().animate({bottom:'-78px'},500);
	joypalbannersview = false;
}

})(jQuery);

