﻿$(document).ready(function() {
	$(".inner_left .mmdata h4").mouseover(function() {
		if ($(this).attr("class")=="activ" || $(this).attr("class").indexOf("activ", -1)==0) {
			$(this).attr("class", "over");
		}
	});
	
	$(".inner_left .mmdata h4").mouseout(function() {
		if ($(this).attr("class")=="over" || $(this).attr("class").indexOf("over", -1)==0) {
			$(this).attr("class", "activ");
		}
	});
	
	$(".p_str").fadeOut("0");
	
	$(".div_part_main").mouseover(function(){
		$(".p_str").fadeIn("500");
	});
	
	$(".footer, .mt45").mouseover(function(){
		$(".p_str").fadeOut("500");
	});
	
	$(".pdata img").mouseover(function(){
		black = $(this).attr("src");
		color = $(this).attr("color");
		$(this).attr("src", color);
		$(this).attr("color", black);
	});
	
	$(".pdata img").mouseout(function(){
		color = $(this).attr("src");
		black = $(this).attr("color");
		$(this).attr("src", black);
		$(this).attr("color", color);
	});
	
	$(".p_str .fr").click(function() {
		change_slients("right");
	});
	
	$(".p_str .fl").click(function() {
		change_slients("left");
	});
});

$(window).resize(function() {

});


function change_slients(type) {
	$(".pdata ul").stop();
	all_width = $(".pdata ul").width()-$(".pdata").width()+150;
	margin = parseInt($(".pdata ul").css("margin-left"));
	if (type == "right") {
		margin-=150;
		margin-margin-margin > (all_width-50) ? margin = 0 : '';
	} else {
		margin+=150;
		margin > 0 ? margin = 0 : '';
	}
	$(".pdata ul").animate({marginLeft:margin});
}
