$(document).ready(function() {
						   
	 
						   
	$(".right-column .class-article").mouseenter(function () {
			$(".attribute-short,.num, h2 a, p", this).css({'color':'#dff22c'});
		}).mouseleave(function () {
			$(".attribute-short, h2 a, p", this).css({'color':'#EBEBEB'});
			$(".num", this).css({'color':'#292929'});
		});
	
	$(".right-column .class-article").click(function(){
		var href = $('h2 a',this).attr('href');
		location=href;
	});
	
	
	$('.about .right .acc h2').click(function(){
	
		$(this).parent().find('.attribute-short').slideToggle(500);
		$(this).parent().toggleClass('acc-show','');
		return false;
	});
	
	
	
});

jQuery(document).ready(function() {
	
	$('div#topmenu a span.chosen').each(function(){
		$(this).width($(this).width());
	});
	
	$('div#topmenu a span.default').each(function(){
		var span_width = $(this).width();
		$(this).width(span_width);
		$(this).parent().width((span_width+10)*2);
		$(this).parent().parent().width(span_width+10);
	});

						   
	var ie = getInternetExplorerVersion();
	
	if(ie!=7.0)
	{
						   
		$("#topmenu ul li a").mouseenter(function () {
			
			var left = $(this).width()/2;
			//$('span.chosen',this).show();
			$(this).animate({ left: '-'+left+'px' }, 200);
			$(this).dequeue();
			
		}).mouseleave(function () {
			$(this).animate({ left: '0px' }, 200);
			$(this).dequeue();
		});
		
	}
});

function resize_gallery()
{
	var browser_width = $(window).width();
	var browser_height = $(window).height();

	var width = browser_width - 450;
	var height = browser_height-100;


	$('#supersized').css("max-width",width);
	$('.gallery-right').css("height",height);
	$('.thumbs').css("width",width);
	$('#controls-wrapper').css("width",width);
	$('#controls-wrapper').css("margin-left",450);
	$('#controls-wrapper').css("top",height-130);
	$('#supersized-loader').css("width",width);
	$('#supersized').css("height",height-150);
	
	$('.gallery-right').width(width);
}

function resize_stretcher(container,except)
{
	var browser_width = $(window).width();
	var browser_height = $(window).height();

	var stretch_width = browser_width - except;
	$(container).width(stretch_width);
}

function getInternetExplorerVersion()
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}

function changeImg(num)
{
			api.goTo(num);
}

