-
Notifications
You must be signed in to change notification settings - Fork 0
/
about-kp.php
228 lines (199 loc) · 9.16 KB
/
about-kp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<?php
#include init file
//we need to do some extra checking for document root for gay inboxwork
if(strpos($_SERVER['SERVER_NAME'], 'inboxwork')){
include($_SERVER['DOCUMENT_ROOT'] . '/ub/kp/dev/init/kp-init.php');
}else{
include($_SERVER['DOCUMENT_ROOT'] . '/init/kp-init.php');
}
?>
<? $pageID = "about-kp" ?>
<?php include(DOCROOT.'include/header.php') ?>
<div id="content">
<div class="timelineContentImage" id="content-image-0"><div class="imageHolder"></div></div>
<div class="timelineContentImage" id="content-image-1"><div class="imageHolder"></div></div>
<div class="timelineContentImage" id="content-image-2"><div class="imageHolder"></div></div>
<div class="timelineContentImage" id="content-image-3"><div class="imageHolder"></div></div>
<div class="timelineContentImage" id="content-image-4"><div class="imageHolder"></div></div>
<div class="timelineContentImage" id="content-image-5"><div class="imageHolder"></div></div>
<div class="timelineContentImage" id="content-image-6"><div class="imageHolder"></div></div>
<div class="timelineContentImage" id="content-image-7"><div class="imageHolder"></div></div>
<div class="timelineContent" id="content-home" style="visibility:visible">
<h2 id="about-kp"><span class="hidden">About KP</span></h2>
<p>KP has been making tasty products for over 150 years. The letters 'KP' stand for Kenyon Produce and we also used to manufacture sweets and popcorn. You will know us best for our delicious nut snacks.</p>
<p>We source our nuts from our growers in places like Asia and South America. KP is committed to selling only the best quality products, this is why we are the UK's favourite nut brand.
</p>
<p>Why not take a trip through KP’s history using the timeline below....
</p>
</div>
<div class="timelineContent" id="content-0">
<h2><span class="hidden">1850's</span></h2>
<p>KP began life in 1853 selling sugar, confectionary, jams and pickles. Not a sign of any roasted & salted nuts in those days.</p>
<a href="#" class="backButton" id="back-button-0"><span class="hidden">Back to intro</span></a>
</div>
<div class="timelineContent" id="content-1">
<h2><span class="hidden">1940's</span></h2>
<p>In the post-war period, a demand for novel food items saw production begin at the Rotherham factory, where we still produce our nuts today. The company became known as Kenyon Produce.</p>
<a href="#" class="backButton" id="back-button-1"><span class="hidden">Back to intro</span></a>
</div>
<div class="timelineContent" id="content-2">
<h2><span class="hidden">1950's</span></h2>
<p>Kenyon Produce, now known as KP, manufactured sweets, popcorn, peanut brittle, peanut butter and peanuts. First nut production was in 1952. These were Roasted Salted Hazelnuts as they were the only nuts freely available. The first bags of peanuts launched under the Hercules brand and sold for 1d.</p>
<a href="#" class="backButton" id="back-button-2"><span class="hidden">Back to intro</span></a>
</div>
<div class="timelineContent" id="content-3">
<h2><span class="hidden">1960's</span></h2>
<p>After years of success, in 1968 KP Nuts became part of United Biscuits who today also manufacture other snacks such as Hula Hoops, McCoy’s and Mini Cheddars to name but a few.</p>
<a href="#" class="backButton" id="back-button-3"><span class="hidden">Back to intro</span></a>
</div>
<div class="timelineContent" id="content-4">
<h2><span class="hidden">1970's</span></h2>
<p>KP ceased production of peanut butter & peanut brittle to concentrate on peanuts, which is what we are famous for. </p>
<a href="#" class="backButton" id="back-button-4"><span class="hidden">Back to intro</span></a>
</div>
<div class="timelineContent" id="content-5">
<h2><span class="hidden">1980's</span></h2>
<p>We launched our first Dry Roasted Peanuts and they became an instant hit, remaining a favourite today.</p>
<a href="#" class="backButton" id="back-button-5"><span class="hidden">Back to intro</span></a>
</div>
<div class="timelineContent" id="content-6">
<h2><span class="hidden">2000's</span></h2>
<p>KP launches the first Salt & Vinegar Flavour Peanuts, these nuts have since become extremely popular.</p>
<a href="#" class="backButton" id="back-button-6"><span class="hidden">Back to intro</span></a>
</div>
<div class="timelineContent" id="content-7">
<h2><span class="hidden">Present</span></h2>
<p>KP continues to use its vast expertise to bring you the best quality nuts. We now produce over 90 million packs of nuts each year.</p>
<a href="#" class="backButton" id="back-button-7"><span class="hidden">Back to intro</span></a>
</div>
<div id="scrollPanel">
<a href="#" id="about-scroll-button-left" style="display:none;"><span class="hidden">Back</span></a>
<a href="#" id="about-scroll-button-right"><span class="hidden">Forward</span></a>
<div id="scrollContent">
<ul id="scrollList">
<li><a href="#" class="about-scroll-item" id="about-scroll-item0"><span class="hidden">Item 0</span></a></li>
<li><a href="#" class="about-scroll-item" id="about-scroll-item1"><span class="hidden">Item 1</span></a></li>
<li><a href="#" class="about-scroll-item" id="about-scroll-item2"><span class="hidden">Item 2</span></a></li>
<li><a href="#" class="about-scroll-item" id="about-scroll-item3"><span class="hidden">Item 3</span></a></li>
<li><a href="#" class="about-scroll-item" id="about-scroll-item4"><span class="hidden">Item 4</span></a></li>
<li><a href="#" class="about-scroll-item" id="about-scroll-item5"><span class="hidden">Item 5</span></a></li>
<li><a href="#" class="about-scroll-item" id="about-scroll-item6"><span class="hidden">Item 6</span></a></li>
<li><a href="#" class="about-scroll-item" id="about-scroll-item7"><span class="hidden">Item 7</span></a></li>
</ul>
<div style="clear:both"></div>
</div>
</div>
</div>
<script type="text/javascript">
/***********************************\
Setup buttons
\***********************************/
var numItems = 8; // total number of items
for (var i=0; i<numItems; i++)
{
// set ID of item
$('#about-scroll-item' + i).attr({itemID: i});
// Bind click events
$('#about-scroll-item' + i).click(function() {
var thisID = ($(this).attr("itemID"));
displayContent(thisID);
});
// Bind click events to all back buttons
$('#back-button-' + i).click(function() {
displayContentHome();
});
}
function displayContentHome()
{
// fade in home item
$('#content-home').css("visibility", "visible");
// fade out all items
for (var i=0; i<numItems; i++)
{
$('#content-' + i).css("visibility", "hidden");
$('#content-image-' + i).css("visibility", "hidden");
$('#about-scroll-item' + i).css("background-image", "url(images/about/item-thumb-"+i+".png)"); // switch thumbnail to unselected
}
}
function displayContent(id)
{
// fade out home item
$('#content-home').css("visibility", "hidden");
// fade out all items except selected
for (var i=0; i<numItems; i++)
{
if (i == id)
{
$('#content-' + i).css("visibility", "visible");
$('#content-image-' + i).css("visibility", "visible");
$('#about-scroll-item' + i).css("background-image", "url(images/about/item-thumb-"+i+"-on.png)"); // switch thumbnail to selected
}
else
{
$('#content-' + i).css("visibility", "hidden")
$('#content-image-' + i).css("visibility", "hidden")
$('#about-scroll-item' + i).css("background-image", "url(images/about/item-thumb-"+i+".png)"); // switch thumbnail to unselected
}
}
}
/***********************************\
Setup scrolling
\***********************************/
// Init vars
var currentPos = 0; // current position of scroller (which item is at the left)
var itemWidth = 141; // width of each item - used to animate to correct one.
var minPos = -2; // minimu position - basically Math.round(numItems - visibleItems)
// Set up left and right buttons
$('#about-scroll-button-left').click(function() {
scrollRight();
manageButtons();
});
$('#about-scroll-button-right').click(function() {
scrollLeft();
manageButtons();
});
function scrollLeft()
{
currentPos--;
if (currentPos <= minPos)
{
currentPos = minPos;
}
newLeft = (currentPos*itemWidth) + "px";
$('#scrollList').animate({left:newLeft},500);
}
function scrollRight()
{
currentPos++;
if (currentPos > 0)
{
currentPos = 0;
}
newLeft = (currentPos*itemWidth) + "px";
$('#scrollList').animate({left:newLeft},500);
}
/**************************************************************\
Fade left/right buttons in and out depending on scroll position
\**************************************************************/
function manageButtons()
{
if (currentPos >= 0)
{
$('#about-scroll-button-left').fadeOut();
}
else
{
$('#about-scroll-button-left').fadeIn();
}
if (currentPos <= minPos)
{
$('#about-scroll-button-right').fadeOut();
}
else
{
$('#about-scroll-button-right').fadeIn();
}
}
manageButtons();
</script>
<?php include (DOCROOT.'include/footer.php') ?>