<!DOCTYPE html>
<html lang="en">
<head>
<title>Untitled</title>
<meta charset="utf-8">
<link href="http://red-web.pp.ua/advo.dp.ua2/styles.css" rel="stylesheet" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head>
<body>
<span style="background: rgba(255,0,0,0.5);font-size: 36px;margin:auto;font-family: 'Didact Gothic', sans-serif;color:#fff;padding: 20px;">УРА!!! Товарищи!!!</span>
<script>
$(function() {
var typeLink = "http://render911.ru/textures/floor/floor",
bgNumber = 1;
numLink = 1;
maxNum = {
1: "73",
2: "61",
3: "116",
4: "36",
5: "300"
}
$(".type-switcher").change(function() {
numLink = $(this).attr("value");
typeLink = {
1: "http://render911.ru/textures/floor/floor",
2: "http://render911.ru/textures/stone/stone",
3: "http://render911.ru/textures/wood/wood",
4: "http://render911.ru/textures/leather/leather",
5: "http://server3d.ru/textures/wallpapers/wallpaper"
}[this.value];
$(this).append("("+maxNum[numLink]+")");
fn()
});
function fn() {
$("body").css("background-image", "url(" + typeLink + "_" + bgNumber + ".jpg)");
$(".nuber").html(bgNumber)
}
fn()
/*NEXT*/
$(".next").click(function() {
if(bgNumber > (maxNum[numLink]-1)) {
fn()
}else {
bgNumber++
fn()
}
$(".nuber").html(bgNumber)
fn()
});
$(".prew").click(function() {
if(bgNumber < 2) {
fn()
}else {
bgNumber--;
}
$(".nuber").html(bgNumber)
fn()
});
});
</script>
<div id="style-switcher">
<span class="title">Фон сайта</span>
<ul>
<li>
<select class="type-switcher">
<option value="1" selected="selected">Ламинат</option>
<option value="2">Камень</option>
<option value="3">Дерево</option>
<option value="4">Кожа</option>
<option value="5">Обои</option>
</select>
</li>
<li><input type="button" class="next" value=">"/></li>
<li><span class="nuber">0</span></li>
<li><input type="button" class="prew" value="<"/></li>
</ul>
</div>
</body>
</html>