// JavaScript Document
var viewport;
var current_div = 0;
var left_attr;

var max_width = screen.width;

if (max_width == 320)
{
	max_width = 1024	
}

var selected_photo = 1;

(function ($) {
	$.preLoadImages = function(imageList,callback) {
		var pic = [], i, total, loaded = 0;
		if (typeof imageList != 'undefined') {
			if ($.isArray(imageList)) {
				total = imageList.length; // used later
					for (i=0; i < total; i++) {
						pic[i] = new Image();
						pic[i].onload = function() {
							loaded++; // should never hit a race condition due to JS's non-threaded nature
							if (loaded == total) {
								if ($.isFunction(callback)) {
									callback();
								}
							}
						};
						pic[i].src = imageList[i];
					}
			}
			else {
				pic[0] = new Image();
				pic[0].onload = function() {
					if ($.isFunction(callback)) {
						callback();
					}
				}
				pic[0].src = imageList;
			}
		}
		pic = undefined;
	};
 
	$.preLoadCSSImages = function(callback) {
		var pic = [], i, imageList = [], loaded = 0, total, regex = new RegExp("url\((.*)\)",'i'),spl;
		var cssSheets = document.styleSheets, path,myRules,Rule,match,txt,img,sheetIdx,ruleIdx;
		for (sheetIdx=0;sheetIdx < cssSheets.length;sheetIdx++){
			var sheet = cssSheets[sheetIdx];
			if (typeof sheet.href == 'string' && sheet.href.length > 0) {
				spl = sheet.href.split('/');spl.pop();path = spl.join('/')+'/';
			}
			else {
				path = './';
			}
			myRules = sheet.cssRules ? sheet.cssRules : sheet.rules;
			for (ruleIdx=0;ruleIdx < myRules.length;ruleIdx++) {
				Rule = myRules[ruleIdx];
				txt = Rule.cssText ? Rule.cssText : Rule.style.cssText;
				match = regex.exec(txt);
				if (match != null) {
					img = match[1].substring(1,match[1].indexOf(')',1));
					if (img.substring(0,4) == 'http') {
						imageList[imageList.length] = img;
					}
					else if ( match[1].substring(1,2) == '/') {
						var p2 = path.split('/');p2.pop();p2.pop();p2x = p2.join("/");
						imageList[imageList.length] = p2x+img;
					}
					else {
						imageList[imageList.length] = path+img;
					}
				}
			};
		};
 
		total = imageList.length; // used later
		for (i=0; i < total; i++) {
			pic[i] = new Image();
			pic[i].onload = function() {
				loaded++; // should never hit a race condition due to JS's non-threaded nature
				if (loaded == total) {
					if ($.isFunction(callback)) {
						callback();
					}
				}
			};
			pic[i].src = imageList[i];
		}
 
	};
	$.preLoadAllImages = function(imageList,callback) {
		if (typeof imageList != 'undefined') {
			if ($.isFunction(imageList)) {
				callback = imageList;
			}
			else if (!$.isArray(imageList)) {
				imageList = [imageList];
			}
		}
		$.preLoadCSSImages(function(){
			if (imageList.length > 0) {
				$.preLoadImages(imageList,function(){
					callback();
				});
			}
			else {
				callback();
			}
		});
	}
})(jQuery);

$(document).ready(function() {
	viewport = screen.width;
	
	if (max_width > viewport)
	{
		left_attr = parseInt(max_width) - parseInt(viewport);
		left_attr_sum = "-";
	}
	else
	{
		left_attr = parseInt(viewport) - parseInt(max_width);
		left_attr_sum = "+";
	}

	$('.wrapper').css('left',left_attr_sum + left_attr + 'px');
	$('.wrapper').css('height', $(window).height() + 'px');

	$('.page').each(function(index) {
		var id = $(this).attr('id');
		id = parseInt(id);		
		var left_attr = id * viewport;
		
		$(this).css('position','absolute');
		$(this).css('left',left_attr + 'px');
		$(this).css('width',viewport + 'px');
	});
				
	$('.mosaic-block').bind({
		mouseover: function() {
			$(this).stop().animate({
				opacity: 1
			}, 500, function() {
	
			});
		},
		mouseout: function() {
			var if_current = $(this).hasClass('current');
			
			if (!if_current)
			{
				$(this).stop().animate({
					opacity: 0.5
				}, 500, function() {
		
				});
			}
		}
	});				
				
	$('.thumb_link').bind({
		click: function() {
			var img = $(this).attr('id');
			
			$('#mycarousel img').removeClass('current');
			$(this).find('img').addClass('current');
			$(this).find('img').css('opacity','1');
		}
	});				
								
	$('.bar').mosaic({
		animation	:	'slide',
		speed : 450
	});
	
	//setTimeout('move_div(1)',1000);
	
	/* NEWS */
	$('#newsgalleries').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	$('#newstext').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	
	$('.newsalbums').bind({
		click: function() {
			$('#newsgalleries .mosaic-block').removeClass('current');
			$('#newsgalleries .mosaic-block').css('opacity',0.5);
			
			var gallery_id = $(this).attr('id');	
			
			$('#news' + gallery_id).addClass('current');
			$('#news' + gallery_id).css('opacity',1);
			
			$.ajax({
				type: "POST",
				url: 'ajax/news_image.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.news .container').html(data);
				}
			});
			
			$.ajax({
				type: "POST",
				url: 'ajax/news_text.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.news_text').html('<div id="newstext" class="scroll-pane" onmouseover="$(\'#newstext\').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});">' + data + '</div>');
					
					$('#newstext').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
				}
			});
		}
	});
	
	/* END NEWS */
	
	/* EVENTS */
	$('#eventsgalleries').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	$('#eventstext').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	
	$('.eventsalbums').bind({
		click: function() {
			$('#eventsgalleries .mosaic-block').removeClass('current');
			$('#eventsgalleries .mosaic-block').css('opacity',0.5);
			
			var gallery_id = $(this).attr('id');	
			
			$('#event' + gallery_id).addClass('current');
			$('#event' + gallery_id).css('opacity',1);
			
			$.ajax({
				type: "POST",
				url: 'ajax/events_image.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.events .container').html(data);
				}
			});
			
			$.ajax({
				type: "POST",
				url: 'ajax/events_text.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.events_text').html('<div id="eventstext" class="scroll-pane" onmouseover="$(\'#eventstext\').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});">' + data + '</div>');
					
					$('#eventstext').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
				}
			});
		}
	});
	
	/* END EVENTS */
	
	$('#links').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	
	/* PHOTOGALLERY */
	$('#photogalleries').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	
	$("a[rel^='prettyPhoto']").prettyPhoto();
	
	jQuery('#mycarousel').jcarousel();
	
	$('#mycarousel img').animate({
		opacity: 0.5
	}, 1000, function() {

	});
	
	$('.photoalbums').bind({
		click: function() {
			$('#photogalleries .mosaic-block').removeClass('current');
			$('#photogalleries .mosaic-block').css('opacity',0.5);
			
			var gallery_id = $(this).attr('id');	
			
			$('#album' + gallery_id).addClass('current');
			$('#album' + gallery_id).css('opacity',1);
			
			$.ajax({
				type: "POST",
				url: 'ajax/photoalbums.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					$('.thumbs').html(data);
					
					jQuery('#mycarousel').jcarousel();
					
					$('#mycarousel img').animate({
						opacity: 0.5
					}, 1000, function() {
				
					});
					
					$('#mycarousel img').bind({
						click: function() {
							var img = $(this).attr('id');
							var img_big = $(this).attr('title');
							var img_desc = $(this).attr('alt');
							
							$('#mycarousel img').removeClass('current');
							$('#mycarousel img').css('opacity','0.5');
							
							$(this).addClass('current');
							$(this).css('opacity','1');
							
							$('.current_image').find('img').attr('src',img);
							$('.current_image').find('a.selected_image').attr('href',img_big);
							
							$('.img_caption p').html(img_desc);
							
							var temp_selected_link = $(this).parent().attr('id');

							temp_selected_link = temp_selected_link.replace("thumbgallery","");
							
							selected_photo = temp_selected_link;
						},
						mouseover: function() {
							$(this).stop().animate({
								opacity: 1
							}, 500, function() {
						
							});
						},
						mouseout: function() {
							var img_class = $(this).hasClass('current');
				
							if (!img_class)
							{
								$(this).stop().animate({
									opacity: 0.5
								}, 500, function() {
						
								});
							}
						}
					});				
					
					$.ajax({
						type: "POST",
						url: 'ajax/photoalbums_first.php',
						data: "aid=" + gallery_id,
						success: function(data) {
							$('.current_image').html(data);
							
							$("a[rel^='prettyPhoto']").prettyPhoto();
							
							selected_photo = 1;
						}
					});
				}
			});
		}
	});
	
	$('#mycarousel img').bind({
		click: function() {
			var img = $(this).attr('id');
			var img_big = $(this).attr('title');
			var img_desc = $(this).attr('alt');
			
			$('#mycarousel img').removeClass('current');
			$('#mycarousel img').css('opacity','0.5');
			
			$(this).find('img').addClass('current');
			$(this).find('img').css('opacity','1');
			
			$('.current_image').find('img').attr('src',img);
			$('.current_image').find('a.selected_image').attr('href',img_big);
			
			$('.img_caption p').html(img_desc);
							
			var temp_selected_link = $(this).parent().attr('id');
				
			temp_selected_link = temp_selected_link.replace("thumbgallery","");
							
			selected_photo = temp_selected_link;
		},
		mouseover: function() {
			$(this).stop().animate({
				opacity: 1
			}, 500, function() {
		
			});
		},
		mouseout: function() {
			var img_class = $(this).hasClass('current');

			if (!img_class)
			{
				$(this).stop().animate({
					opacity: 0.5
				}, 500, function() {
		
				});
			}
		}
	});				
	/* END PHOTOGALLERY */

	/* VIDEOGALLERY */
	$('#videogalleries').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	$('#video_desc').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	
	$('.videoalbums').bind({
		click: function() {
			$('#videogalleries .mosaic-block').removeClass('current');
			$('#videogalleries .mosaic-block').css('opacity',0.5);
			
			var gallery_id = $(this).attr('id');	
			
			$('#video' + gallery_id).addClass('current');
			$('#video' + gallery_id).css('opacity',1);
			
			$.ajax({
				type: "POST",
				url: 'ajax/videoalbums_video.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.current_video').html('<iframe width="627" height="382" src="http://www.youtube.com/embed/' + data + '" frameborder="0" allowfullscreen></iframe>');
				}
			});
			
			$.ajax({
				type: "POST",
				url: 'ajax/videoalbums_title.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.video_caption .details p').html(data);
				}
			});
			
			$.ajax({
				type: "POST",
				url: 'ajax/videoalbums_desc.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.video_description').html('<div id="video_desc" class="scroll-pane">' + data + '</div>');
					
					$('#video_desc').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
				}
			});
		}
	});
	/* END VIDEOGALLERY */

	/* DISCOGRAPHY */
	$('#discogalleries').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	$('#tracks').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	$('#stixoi').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
	
	$('.songalbums').bind({
		click: function() {
			$('#discogalleries .mosaic-block').removeClass('current');
			$('#discogalleries .mosaic-block').css('opacity',0.5);
			
			var gallery_id = $(this).attr('id');	
			
			$('#album' + gallery_id).addClass('current');
			$('#album' + gallery_id).css('opacity',1);
			
			$.ajax({
				type: "POST",
				url: 'ajax/songalbums_general.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.disco .general').html(data);
				}
			});
			
			$.ajax({
				type: "POST",
				url: 'ajax/songalbums_tracks.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.tracklist').html('<div id="tracks" class="scroll-pane">' + data + '</div>');
					jQuery('.lyrics').html('<div id="stixoi" class="scroll-pane"></div>');
					
					$('#tracks').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
				}
			});
		}
	});
	/* END VIDEOGALLERY */
	
});

$(window).resize(function() {
	/*viewport = screen.width
	
	left_attr = parseInt(max_width) - parseInt(viewport);
	final_left_attr = parseInt($('.wrapper').attr('id')) +  left_attr;
	
	$('.wrapper').css('left',"-" + final_left_attr + 'px');

	$('.page').each(function(index) {
		$(this).css('width',viewport + 'px');
		$(this).css('left',left_attr + 'px');
	});*/
});

function move_div(id)
{
	jQuery('.page').css('visibility','hidden');
	
	var i;
	var gap;
	
	viewport = screen.width
	
	if (max_width > viewport)
	{
		left_attr = parseInt(max_width) - parseInt(viewport);
	}
	else
	{
		left_attr = parseInt(viewport) - parseInt(max_width);
	}
	
	gap = (parseInt(id)) * parseInt(left_attr);

	if (id > current_div)
	{
		if (max_width > viewport)
		{
			var div_left = parseInt($('#' + id).css('left')) +  parseInt(gap);
		}
		else
		{
			var div_left = parseInt($('#' + id).css('left')) -  parseInt(gap);
		}
		
		left_attr_sum = "-";
		
		$('.wrapper').animate({
			left: left_attr_sum + div_left
		}, 2000, function() {
			$('.wrapper').attr('id',div_left);
			jQuery('.page').css('visibility','visible');
		});
	}
	else
	{
		var div_left = left_attr_sum + parseInt($('#' + id).css('left')) - parseInt(gap);
		left_attr_sum = "+";
		
		if (id == 0)
		{
			div_left = left_attr;	
			
			if (max_width > viewport)
			{
				left_attr_sum ="-";
			}
			else
			{
				left_attr_sum ="+";
			}
			
			div_left = left_attr_sum + div_left;	
		}
		
		$('.wrapper').animate({
			left: div_left
		}, 2000, function() {
			$('.wrapper').attr('id',div_left);
			jQuery('.page').css('visibility','visible');
		});
	}
}

function show_bio() {
	$.ajax({
		type: "POST",
		url: 'ajax/bio.php',
		success: function(data) {
			jQuery('#bio').css('display','block');
			jQuery('#bio').css('height','423px');
			
			jQuery('#bio').html(data);
			
			$('#bio').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
		}
	});
}
function playmp3(mp3ID,id) {
	$.ajax({
		type: "POST",
		data: "aid=" + mp3ID,
		url: 'ajax/lyrics.php',
		success: function(data) {
			jQuery('.lyrics').html('<div id="stixoi" class="scroll-pane">' + data + '</div>');
					
			$('#stixoi').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
		}
	});
	
	$.ajax({
		type: "POST",
		data: "aid=" + mp3ID,
		url: 'ajax/song.php',
		success: function(data) {
			playSong(mp3ID,data,id)
		}
	});
}

function show_play(mp3ID,song) {
	var current_num_class = jQuery('#number' + mp3ID).hasClass("playing");
	
	if (!current_num_class)
	{
		jQuery('#number' + mp3ID).html('<img src="images/1325805687_player_play.jpg" align="absmiddle" border="0"/>');
	}
}
function hide_play(mp3ID) {
	var current_num_class = jQuery('#number' + mp3ID).hasClass("playing");
	
	if (!current_num_class)
	{
		jQuery('#number' + mp3ID).html('<img src="images/1325805737_player_stop.jpg" align="absmiddle" border="0"/>');
		jQuery('#number' + mp3ID).html(mp3ID + '.');
	}
}

function OnSendEmail()
{
	if(window.XMLHttpRequest)
	{
		oRequest = new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
		oRequest = new ActiveXObject("Microsoft.XMLHTTP");
	}

	oRequest.open("POST", "module/send_email.php", true);
	oRequest.onreadystatechange = UpdateEmail;

	oRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	oRequest.send("strCmd=send_email&fullname=" + document.getElementById('contact_name').value + "&tel=" + document.getElementById('contact_tel').value + "&email=" + document.getElementById('contact_email').value + "&message=" + document.getElementById('contact_message').value);
}

function UpdateEmail()
{
	if(oRequest.readyState == 4)
	{ 
		if(oRequest.status == 200)
		{
			alert(oRequest.responseText);
		}
		else
		{
			alert("Asychronous Error. Please try again...");
		}
	}
}

function show_next() {
	
	selected_photo = selected_photo + 1;
	
	var length_element = $('.jcarousel-item-' + selected_photo).length;
	
	if (length_element > 0)
	{
		var img =$('.jcarousel-item-' + selected_photo).find('img').attr('id');
		var img_big = $('.jcarousel-item-' + selected_photo).find('img').attr('title');
		var img_desc = $('.jcarousel-item-' + selected_photo).find('img').attr('alt');
								
		$('#mycarousel img').removeClass('current');
		$('#mycarousel img').css('opacity','0.5');
								
		$('.jcarousel-item-' + selected_photo).find('img').addClass('current');
		$('.jcarousel-item-' + selected_photo).find('img').css('opacity','1');
								
		$('.current_image').find('img').attr('src',img);
		$('.current_image').find('a.selected_image').attr('href',img_big);
								
		$('.img_caption p').html(img_desc);
	}
}

function show_prev() {
	
	selected_photo = selected_photo - 1;
	
	var length_element = $('.jcarousel-item-' + selected_photo).length;
	
	if (length_element > 0)
	{
		var img =$('.jcarousel-item-' + selected_photo).find('img').attr('id');
		var img_big = $('.jcarousel-item-' + selected_photo).find('img').attr('title');
		var img_desc = $('.jcarousel-item-' + selected_photo).find('img').attr('alt');
								
		$('#mycarousel img').removeClass('current');
		$('#mycarousel img').css('opacity','0.5');
								
		$('.jcarousel-item-' + selected_photo).find('img').addClass('current');
		$('.jcarousel-item-' + selected_photo).find('img').css('opacity','1');
								
		$('.current_image').find('img').attr('src',img);
		$('.current_image').find('a.selected_image').attr('href',img_big);
								
		$('.img_caption p').html(img_desc);
	}
}

function show_news(id) {
			$('#newsgalleries .mosaic-block').removeClass('current');
			$('#newsgalleries .mosaic-block').css('opacity',0.5);
			
			var gallery_id = id;	
			
			$('#news' + gallery_id).addClass('current');
			$('#news' + gallery_id).css('opacity',1);
			
			$.ajax({
				type: "POST",
				url: 'ajax/news_image.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.news .container').html(data);
				}
			});
			
			$.ajax({
				type: "POST",
				url: 'ajax/news_text.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.news_text').html('<div id="newstext" class="scroll-pane" onmouseover="$(\'#newstext\').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});">' + data + '</div>');
					
					$('#newstext').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
				}
			});
	
}

function show_events(id) {
			$('#eventsgalleries .mosaic-block').removeClass('current');
			$('#eventsgalleries .mosaic-block').css('opacity',0.5);
			
			var gallery_id = id;	
			
			$('#event' + gallery_id).addClass('current');
			$('#event' + gallery_id).css('opacity',1);
			
			$.ajax({
				type: "POST",
				url: 'ajax/events_image.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.events .container').html(data);
				}
			});
			
			$.ajax({
				type: "POST",
				url: 'ajax/events_text.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.events_text').html('<div id="eventstext" class="scroll-pane" onmouseover="$(\'#eventstext\').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});">' + data + '</div>');
					
					$('#eventstext').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
				}
			});
	
}

function show_photo(id) {
			$('#photogalleries .mosaic-block').removeClass('current');
			$('#photogalleries .mosaic-block').css('opacity',0.5);
			
			var gallery_id = id;	
			
			$('#album' + gallery_id).addClass('current');
			$('#album' + gallery_id).css('opacity',1);
			
			$.ajax({
				type: "POST",
				url: 'ajax/photoalbums.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					$('.thumbs').html(data);
					
					jQuery('#mycarousel').jcarousel();
					
					$('#mycarousel img').animate({
						opacity: 0.5
					}, 1000, function() {
				
					});
					
					$('#mycarousel img').bind({
						click: function() {
							var img = $(this).attr('id');
							var img_big = $(this).attr('title');
							var img_desc = $(this).attr('alt');
							
							$('#mycarousel img').removeClass('current');
							$('#mycarousel img').css('opacity','0.5');
							
							$(this).addClass('current');
							$(this).css('opacity','1');
							
							$('.current_image').find('img').attr('src',img);
							$('.current_image').find('a.selected_image').attr('href',img_big);
							
							$('.img_caption p').html(img_desc);
							
							var temp_selected_link = $(this).parent().attr('id');

							temp_selected_link = temp_selected_link.replace("thumbgallery","");
							
							selected_photo = temp_selected_link;
						},
						mouseover: function() {
							$(this).stop().animate({
								opacity: 1
							}, 500, function() {
						
							});
						},
						mouseout: function() {
							var img_class = $(this).hasClass('current');
				
							if (!img_class)
							{
								$(this).stop().animate({
									opacity: 0.5
								}, 500, function() {
						
								});
							}
						}
					});				
					
					$.ajax({
						type: "POST",
						url: 'ajax/photoalbums_first.php',
						data: "aid=" + gallery_id,
						success: function(data) {
							$('.current_image').html(data);
							
							$("a[rel^='prettyPhoto']").prettyPhoto();
							
							selected_photo = 1;
						}
					});
				}
			});
	
}

function show_video(id) {
			$('#videogalleries .mosaic-block').removeClass('current');
			$('#videogalleries .mosaic-block').css('opacity',0.5);
			
			var gallery_id = id;	
			
			$('#video' + gallery_id).addClass('current');
			$('#video' + gallery_id).css('opacity',1);
			
			$.ajax({
				type: "POST",
				url: 'ajax/videoalbums_video.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.current_video').html('<iframe width="627" height="382" src="http://www.youtube.com/embed/' + data + '" frameborder="0" allowfullscreen></iframe>');
				}
			});
			
			$.ajax({
				type: "POST",
				url: 'ajax/videoalbums_title.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.video_caption .details p').html(data);
				}
			});
			
			$.ajax({
				type: "POST",
				url: 'ajax/videoalbums_desc.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.video_description').html('<div id="video_desc" class="scroll-pane">' + data + '</div>');
					
					$('#video_desc').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
				}
			});
	
}

function show_disco(id) {
			$('#discogalleries .mosaic-block').removeClass('current');
			$('#discogalleries .mosaic-block').css('opacity',0.5);
			
			var gallery_id = id;	
			
			$('#album' + gallery_id).addClass('current');
			$('#album' + gallery_id).css('opacity',1);
			
			$.ajax({
				type: "POST",
				url: 'ajax/songalbums_general.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.disco .general').html(data);
				}
			});
			
			$.ajax({
				type: "POST",
				url: 'ajax/songalbums_tracks.php',
				data: "aid=" + gallery_id,
				success: function(data) {
					jQuery('.tracklist').html('<div id="tracks" class="scroll-pane">' + data + '</div>');
					jQuery('.lyrics').html('<div id="stixoi" class="scroll-pane"></div>');
					
					$('#tracks').jScrollPane({scrollbarWidth:6, scrollbarMargin:10});
				}
			});
	
}
