var ieFixPngImagePath = 'img/pix.gif';

function fixIePngScale(c) {
	return fixIePng(c, 'scale');
}
function fixIePngCrop(c) {
	return fixIePng(c, 'crop');
}
function fixIePngImage(c) {
	return fixIePng(c, 'image');
}
function fixIePng(c, method) {
	if (!(/MSIE (5\.5|6).+Win/.test(navigator.userAgent))) {
		return;
	}
	var f;
	if ("IMG"==c.tagName||("INPUT"==c.tagName&&"image"==c.type)) {
		if (/\.png$/.test(c.src)) {
			f=c.src;
			c.src=ieFixPngImagePath;
		}
	} else {
		f=c.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);
		if (f) {
			f=f[1];
			c.runtimeStyle.backgroundImage="none";
		}
	}
	var b=/iesizing\-(\w+)/;
	//var a=b.exec(c.className);
	if (f) {
		//var d="crop";
		//if (a) {
		//	d=a[1];
		//}
		c.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+f+"',sizingMethod='"+method+"')";
	}
}

$(function(){
	var self = this;
	
	$('.element').hover(function(){
	  $(this).addClass('hover');
	}, function() {
	  $(this).removeClass('hover');
	});
	
	$('#mainblock6 .next').hover(function(){
	  $(this).addClass('hoverNext');
	}, function(){
	  $(this).removeClass('hoverNext');
	});
	$('#mainblock6 .prev').hover(function(){
	  $(this).addClass('hoverPrev');
	},function(){
	  $(this).removeClass('hoverPrev');
	});
	
	$('#mainblock7 .next').hover(function(){
	  $(this).addClass('hoverNext');
	}, function(){
	  $(this).removeClass('hoverNext');
	});
	$('#mainblock7 .prev').hover(function(){
	  $(this).addClass('hoverPrev');
	},function(){
	  $(this).removeClass('hoverPrev');
	});
});
