$(document).ready(function() { var galleryCnt = 0; var galleryMax = parseInt($('#galleryBlockCnt').val()); $("#panel_left").click(function() { galleryCnt++; if (galleryCnt > galleryMax - 1) galleryCnt = 0; $('#panel2').html(''); $('#accordion').hide(); $('#panel2').html($('#acc_' + galleryCnt).html()); $('#panel2 div div').accordion({ width: 894, height: 382, barSize: 42, cover: false, coverAlpha: 0.5, shadow: false, shadowAlpha: 1, border: true, borderSize: 0, borderColor: "#d7e1e4", transitionTime: 0.3, autoplay: false, autoplayTime: 5000, changeType: "click", previousBtn: $("#L_" + galleryCnt), nextBtn: $("#R_" + galleryCnt) }); //setTimeout("$('#R_" + galleryCnt + "').click()", 1250); if ($('#galleryRows_' + galleryCnt).val() == '1') setTimeout("$('#R_" + galleryCnt + "').click()", 1250); if ($('#galleryRows_' + galleryCnt).val() == '2') setTimeout("$('#R_" + galleryCnt + "').click().click()", 1250); if ($('#galleryRows_' + galleryCnt).val() == '3') setTimeout("$('#R_" + galleryCnt + "').click().click().click()", 1250); if ($('#galleryRows_' + galleryCnt).val() == '4') setTimeout("$('#R_" + galleryCnt + "').click().click().click().click()", 1250); if ($('#galleryRows_' + galleryCnt).val() == '5') setTimeout("$('#R_" + galleryCnt + "').click().click().click().click().click()", 1250); }); $("#panel_right").click(function() { galleryCnt--; if (galleryCnt < 0) galleryCnt = galleryMax - 1; $('#panel2').html(''); $('#accordion').hide(); $('#panel2').html($('#acc_' + galleryCnt).html()); $('#panel2 div div').accordion({ width: 894, height: 382, barSize: 42, cover: false, coverAlpha: 0.5, shadow: false, shadowAlpha: 1, border: true, borderSize: 0, borderColor: "#d7e1e4", transitionTime: 0.3, autoplay: false, autoplayTime: 5000, changeType: "click", previousBtn: $("#L_" + galleryCnt), nextBtn: $("#R_" + galleryCnt) }); //setTimeout("$('#L_" + galleryCnt + "').click()", 1250); if ($('#galleryRows_' + galleryCnt).val() == '1') setTimeout("$('#R_" + galleryCnt + "').click()", 1250); if ($('#galleryRows_' + galleryCnt).val() == '2') setTimeout("$('#R_" + galleryCnt + "').click().click()", 1250); if ($('#galleryRows_' + galleryCnt).val() == '3') setTimeout("$('#R_" + galleryCnt + "').click().click().click()", 1250); if ($('#galleryRows_' + galleryCnt).val() == '4') setTimeout("$('#R_" + galleryCnt + "').click().click().click().click()", 1250); if ($('#galleryRows_' + galleryCnt).val() == '5') setTimeout("$('#R_" + galleryCnt + "').click().click().click().click().click()", 1250); }); $("#accordion").accordion({ width: 894, height: 372, barSize: 42, cover: false, coverAlpha: 0.5, shadow: false, shadowAlpha: 1, border: true, borderSize: 0, borderColor: "#d7e1e4", transitionTime: 0.3, autoplay: false, autoplayTime: 5000, changeType: "click", previousBtn: $("#L_"), nextBtn: $("#R_") }); if ($('#galleryRows').val() == '1') setTimeout("$('#L_').click()", 1250); if ($('#galleryRows').val() == '2') setTimeout("$('#L_').click().click()", 1250); if ($('#galleryRows').val() == '3') setTimeout("$('#L_').click().click().click()", 1250); if ($('#galleryRows').val() == '4') setTimeout("$('#L_').click().click().click().click()", 1250); if ($('#galleryRows').val() == '5') setTimeout("$('#L_').click().click().click().click().click()", 1250); if ($('#galleryRows').val() == '6') setTimeout("$('#L_').click().click().click().click().click().click()", 1250); if ($('#galleryRows').val() == '7') setTimeout("$('#L_').click().click().click().click().click().click().click()", 1250); if ($('#galleryRows').val() == '8') setTimeout("$('#L_').click().click().click().click().click().click().click().click()", 1250); if ($('#galleryRows').val() == '9') setTimeout("$('#L_').click().click().click().click().click().click().click().click().click()", 1250); if ($('#galleryRows').val() == '10') setTimeout("$('#L_').click().click().click().click().click().click().click().click().click().click()", 1250); // ACT START var actClick = 0; var actCnt = 0; var actMax = 0; var actArr = new Array(); var actTexts = new Array(); $.each($('.banner4_text span'), function(index, value) { actTexts[index] = value; if (index == 0) $(value).show(); }); $.each($('.banner4_image img'), function(index, value) { actArr[index] = value; actCnt++; }); $.each($('.banner4_image img'), function(index, value) { if (index > 0) $(value).remove(); }); actMax = actCnt - 1; $('#left_act').click(function() { $(actTexts[actClick]).hide(); $(actArr[actClick]).fadeOut(800, function () { $(actArr[actClick]).remove(); actClick++; if (actClick > actMax) actClick = 0; $(actArr[actClick]).fadeIn().appendTo($('.banner4_image')); $(actTexts[actClick]).show(); }); }); $('#right_act').click(function() { $(actTexts[actClick]).hide(); $(actArr[actClick]).fadeOut(800, function () { $(actArr[actClick]).remove(); actClick++; if (actClick > actMax) actClick = 0; $(actArr[actClick]).fadeIn().appendTo($('.banner4_image')); $(actTexts[actClick]).show(); }); }); // ACT END // PROMO START var promoClick = 0; var promoCnt = 0; var promoMax = 0; var promoArr = new Array(); var promoTexts = new Array(); $.each($('.banner3_text span'), function(index, value) { promoTexts[index] = value; if (index == 0) $(value).show(); }); $.each($('.banner3_image img'), function(index, value) { promoArr[index] = value; promoCnt++; }); $.each($('.banner3_image img'), function(index, value) { if (index > 0) $(value).remove(); }); promoMax = promoCnt - 1; $('#left_promo').click(function() { $(promoTexts[promoClick]).hide(); $(promoArr[promoClick]).fadeOut(800, function () { $(promoArr[promoClick]).remove(); promoClick++; if (promoClick > promoMax) promoClick = 0; $(promoArr[promoClick]).fadeIn().appendTo($('.banner3_image')); $(promoTexts[promoClick]).show(); }); }); $('#right_promo').click(function() { $(promoTexts[promoClick]).hide(); $(promoArr[promoClick]).fadeOut(800, function () { $(promoArr[promoClick]).remove(); promoClick++; if (promoClick > promoMax) promoClick = 0; $(promoArr[promoClick]).fadeIn().appendTo($('.banner3_image')); $(promoTexts[promoClick]).show(); }); }); // PROMO END // NEWS START var newsClick = 0; var newsCnt = 0; var newsMax = 0; var newsArr = new Array(); var newsTexts = new Array(); $.each($('.banner1_text span'), function(index, value) { newsTexts[index] = value; if (index == 0) $(value).show(); }); $.each($('.banner1_image img'), function(index, value) { newsArr[index] = value; newsCnt++; }); $.each($('.banner1_image img'), function(index, value) { if (index > 0) $(value).remove(); }); newsMax = newsCnt - 1; $('#left_new').click(function() { $(newsTexts[newsClick]).hide(); $(newsArr[newsClick]).fadeOut(800, function () { $(newsArr[newsClick]).remove(); newsClick++; if (newsClick > newsMax) newsClick = 0; $(newsArr[newsClick]).fadeIn().appendTo($('.banner1_image')); $(newsTexts[newsClick]).show(); }); }); $('#right_new').click(function() { $(newsTexts[newsClick]).hide(); $(newsArr[newsClick]).fadeOut(800, function () { $(newsArr[newsClick]).remove(); newsClick++; if (newsClick > newsMax) newsClick = 0; $(newsArr[newsClick]).fadeIn().appendTo($('.banner1_image')); $(newsTexts[newsClick]).show(); }); }); // NEWS END // RECIPES START var recipesClick = 0; var recipesCnt = 0; var recipesMax = 0; var recipesArr = new Array(); var recipesTexts = new Array(); $.each($('.banner2_text span'), function(index, value) { recipesTexts[index] = value; if (index == 0) $(value).show(); }); $.each($('.banner2_image img'), function(index, value) { recipesArr[index] = value; recipesCnt++; }); $.each($('.banner2_image img'), function(index, value) { if (index > 0) $(value).remove(); }); recipesMax = recipesCnt - 1; $('#left_recipt').click(function() { $(recipesTexts[recipesClick]).hide(); $(recipesArr[recipesClick]).fadeOut(800, function () { $(recipesArr[recipesClick]).remove(); recipesClick++; if (recipesClick > recipesMax) recipesClick = 0; $(recipesArr[recipesClick]).fadeIn().appendTo($('.banner2_image')); $(recipesTexts[recipesClick]).show(); }); }); $('#right_recipt').click(function() { $(recipesTexts[recipesClick]).hide(); $(recipesArr[recipesClick]).fadeOut(800, function () { $(recipesArr[recipesClick]).remove(); recipesClick++; if (recipesClick > recipesMax) recipesClick = 0; $(recipesArr[recipesClick]).fadeIn().appendTo($('.banner2_image')); $(recipesTexts[recipesClick]).show(); }); }); // RECIPES END $('#cow').mouseover(function() { $(this).css('margin-top', '8px'); }); $('#cow').mouseout(function() { $(this).css('margin-top', '40px'); }); $('#sheep').mouseover(function() { $(this).css('margin-top', '15px'); }); $('#sheep').mouseout(function() { $(this).css('margin-top', '40px'); }); $('#pig').mouseover(function() { $(this).css('margin-top', '30px'); }); $('#pig').mouseout(function() { $(this).css('margin-top', '40px'); }); $('#footer ul li').each(function() { $(this).mouseover(function() { if ($('#curr_mod').val() == $(this).attr('id')) $(this).css('text-decoration', 'underline'); else $(this).css('text-decoration', 'none'); }); $(this).mouseout(function() { $(this).css('text-decoration', 'none'); }); }); $('#footer_22').mouseover(function() { if ($('#curr_mod').val() == 'footer_22') $(this).css('text-decoration', 'underline'); else $(this).css('text-decoration', 'none'); }); $('#footer_22').mouseout(function() { $(this).css('text-decoration', 'none'); }); $('#' + $('#curr_mod').val()).css('text-decoration', 'underline'); });