jQuery(document).ready(function($){
	
	$('#head, #mn, #page, #foot, img').css('behavior','url(iepngfix/iepngfix.htc)')
	
	// efx menu
	var mn = $('#mn a, #page .home li a, #page .prodsTop li a')
	mn.each(function(){
		$(this).hover(
			function(){
				$(this).stop().animate({'opacity':0},500)
			},
			function(){
				$(this).stop().animate({'opacity':1},500)
			}
		)
	})
	
	var roll = $('.roll')
	roll.css('opacity',0.5).each(function(){
		$(this).hover(
			function(){
				$(this).stop().animate({'opacity':1})
			},
			function(){
				$(this).stop().animate({'opacity':0.5})
			}
		)
	})
	
	var prods = $('#page .itemProd').css('cursor','pointer')
	prods.each(function(){
		var a = $(this).find('a')
		var href = a.attr('href')
		$(this)
		.hover(function(){
			a.css('text-decoration','underline')	
		},function(){
			a.css('text-decoration','none')	
		})
		.click(function(){
			location.href = href
		})
	})
	
	var news = $('#page .news .item, #page .boxNews').css('cursor','pointer')
	news.each(function(){
		var a = $(this).find('a')
		a.css('opacity',0.4)
		var href = a.attr('href')
		$(this).hover(function(){
			a.stop().animate({'opacity':1})
		},function(){
			a.stop().animate({'opacity':0.4})
		})
		.click(function(){
			location.href = href
		})

	})
	
	/*
	$imgBig = $('#page .imgBigCont')
	var height = $imgBig.find('.img').height() + 20
	$imgBig.css('height',height+'px')
	*/

	/*
	var src = $('#page .imgBigCont .img').attr('src')
	var _h = $('#page .imgBigCont .img').height()
	alert(_h)
	var img = new Image();
	$(img).load(function () {
		$('#page .imgBigCont').hide()
		$('#page .imgBigCont').css('height',_h+20)
		$('#page .imgBigCont').show()
	}).error(function () {
		// notify the user that the image could not be loaded
	}).attr('src', src)
	*/

	var splashLang = $('#splashLang a')
	$('#splashLang').find('.const').css('opacity',0)
	splashLang.each(function(){
		$(this).hover(function(){
			if($(this).hasClass('es')) {
				$('#splashLang').find('.const').stop().animate({'opacity':1})
			}else{
				splashLang.not(this).stop().animate({'opacity':0.2})
			}
		},function(){
			if($(this).hasClass('es')) {
				$('#splashLang').find('.const').stop().animate({'opacity':0})
			}else{
				splashLang.not(this).stop().animate({'opacity':1})
			}
		})
	})
})
