//==========================| FIX PNG |==========================//
function fixPNG(element){if(/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){var src;if(element.tagName=='IMG'){if(/\.png$/.test(element.src)){src=element.src;element.src="blank.gif"}}else{src=element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);if(src){src=src[1];element.runtimeStyle.backgroundImage="none"}}if(src)element.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"',sizingMethod='scale')"}}
//==========================| END FIX PNG |==========================//
$(document).ready(function(){
//==========================| ICO BLOCK |==========================//
	$("#ico_block a").mouseover(function(){
		$(this).stop().animate({opacity: 1}, {duration:400});
	});
	$("#ico_block a").mouseout(function(){
		$(this).stop().animate({opacity: 0}, {duration:300});
	});
	
	$("a.zoom").fancybox();
//==========================| TOP MENU |==========================//
var query = new Object();
	window.location.search.replace(
	new RegExp( "([^?=&]+)(=([^&]*))?", 'g' ),
		function( $0, $1, $2, $3 ){
			query[ $1 ] = $3;
		}
	);
	easing = query['e'] || 'Expo';
	
	function loadEasing(e) {
		location.href = location.pathname+'?e='+e;
	}
	
	function setEasing(e) {
		loadLamps(e);
	}

// for dynamic easing changes		
	function loadLamps(easing) {
		$('#lavaLampBasicImage').lavaLamp({
			fx: 'easeIn'+easing,
			speed: 500,
			homeTop:0,
			homeLeft:0
		});
	}
	
// jquery initialize:
	$(function()  {
		$('#top_menu').lavaLamp({fx: 'swing', speed: 500});
		loadLamps(easing);
		
		$('select#easing option[value='+easing+']').attr('selected','selected');
		$('.easingLabel').text(easing);
	});
//==========================| LEFT MENU |==========================//
$(function(){
	$('#left_menu ul li#lm_0-0, #left_menu ul li#lm_0-1')
	.css( {backgroundPosition:"0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(-235px 0)"}, {duration:700})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:400, complete:function(){
				$(this).css({backgroundPosition:"0 0"})
			}})
		})
	$('#left_menu ul li#lm_0-2')
	.css( {backgroundPosition:"0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(-231px 0)"}, {duration:700})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:400, complete:function(){
				$(this).css({backgroundPosition:"0 0"})
			}})
		})
	$('#left_menu ul li#lm_0-3')
	.css( {backgroundPosition:"0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(-255px 0)"}, {duration:700})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:400, complete:function(){
				$(this).css({backgroundPosition:"0 0"})
			}})
		})
	$('#left_menu ul li#lm_0-4')
	.css( {backgroundPosition:"0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(-237px 0)"}, {duration:700})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:400, complete:function(){
				$(this).css({backgroundPosition:"0 0"})
			}})
		})
	$('#left_menu ul li#lm_0-5, #left_menu ul li#lm_0-6')
	.css( {backgroundPosition:"0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(-257px 0)"}, {duration:700})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:400, complete:function(){
				$(this).css({backgroundPosition:"0 0"})
			}})
		})
	$('#left_menu ul li#lm_0-7, #left_menu ul li#lm_0-8')
	.css( {backgroundPosition:"0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(-259px 0)"}, {duration:700})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:400, complete:function(){
				$(this).css({backgroundPosition:"0 0"})
			}})
		})
});
//==========================| END LEFT MENU |==========================//


});

