/**\r
* @return string\r
*/\r
- public function simeoxDocuments() {\r
- $res='';\r
- \r
- return $res;\r
+ public function simeoxDocuments($documents) {\r
+ $res = array();\r
+ foreach ($documents as $doc) {\r
+ $res[] = $this->_document($doc);\r
+ }\r
+ return $this->listUnordered($res, array('class' => 'documents'));\r
+ }\r
+\r
+ protected function _document($doc) {\r
+ $res = $this->imageProcess($doc['thumbnail'], '', 101, 100000, array(), 'R', 'C', 'M');\r
+ $res .= $this->htmlElement($doc['title'], 'h4');\r
+\r
+ return $this->linkTruePopupFullscreen($res, $doc['url']);\r
}\r
}
\ No newline at end of file
* @return string\r
*/\r
public function simeoxVideos($videos) {\r
+ $this->headScript()->addFeatherlight();\r
$res = array();\r
foreach ($videos as $video) {\r
- for ($i = 0; $i < 6; $i++) {\r
- $res[] = $this->_video($video);\r
- }\r
+ $res[] = $this->_video($video);\r
}\r
return $this->listUnordered($res, array('class' => 'videos'));\r
}\r
$res = $this->imageProcess($v['thumbnail'], '', 165, 96, array(), 'C', 'C', 'M');\r
$res .= $this->htmlElement($v['title'], 'h4');\r
\r
- return $this->link($res, CubeIT_Util_WebVideo::getIframeUrl($v['url']), array('data-video' => $v['url']));\r
+ return $this->link($res, CubeIT_Util_WebVideo::getIframeUrl($v['url'], null, array('autoplay' => 1, 'modestbranding' => 1, 'rel' => 0, 'cc_load_policy' => 0,'')));\r
}\r
}
\ No newline at end of file
//$('a').click(function() {
// if(!localScrollInitialised) { // Only initalise localscroll after first click
- $('header.site').localScroll({
- axis: 'y',
- duration: 1000,
- //hash: true,
- offset: -65 // For fixed header height
- });
+ $('header.site').localScroll({
+ axis: 'y',
+ duration: 1000,
+ //hash: true,
+ offset: -65 // For fixed header height
+ });
//
// localScrollInitialised = true;
// }
//});
// Shrinking fixed header
- $(window).scroll(function() {
+ $(window).scroll(function () {
shrinkHeader();
});
shrinkHeader(); // Trigger even when no scroll (eg. page refresh)
$('.partners .logos').imagefit(); // Make sure logos fit onto one line
+
+
+ $(document).on('click', '.videos a', function () {
+ var iw = $(window).width() * 0.8;
+ var ih = Math.round(iw / 16 * 9);
+ iw = Math.round(iw);
+ $.featherlight($('<iframe src="' + $(this).attr('href') + '" width="' + iw + '" height="' + ih + '" ></iframe>'));
+ return false;
+ });
}
function shrinkHeader() {
function cookieBanner() {
- if($('#cookieBanner').length) {
+ if ($('#cookieBanner').length) {
var cookieBannerHeight = $('#cookieBanner').outerHeight();
* Original code inspired by: http://www.ollicle.com/eg/jquery/imagefit/
*
*/
-(function($) {
- $.fn.imagefit = function(options) {
+(function ($) {
+ $.fn.imagefit = function (options) {
var fit = {
- scale: function(scaleFactor, imgs) {
- imgs.each(function(){
+ scale: function (scaleFactor, imgs) {
+ imgs.each(function () {
var newWidth = Math.round(scaleFactor * $(this).width());
var newHeight = Math.round(scaleFactor * $(this).height());
$(this).width(newWidth);
}
};
- this.each(function(){
+ this.each(function () {
var container = this;
// Get list of contained images
var totalWidth = 0;
// Calculate total width of all contained images
- imgs.each(function(){
+ imgs.each(function () {
totalWidth += $(this).width();
});
var gutterTotal = numGutters * minGutter;
// Make gutters small enough to fit but bigger than natural gap between inline-blocks (normally 4px)
- if(gutterTotal > availableWidth) {
+ if (gutterTotal > availableWidth) {
gutterTotal = numGutters * 5;
}
//fb('Gutter total = ' + gutterTotal);
availableWidth -= gutterTotal; // Take fixed gutters away from available space
//fb('Total img width = ' + totalWidth);
- if(totalWidth > availableWidth) {
+ if (totalWidth > availableWidth) {
var scale = availableWidth / totalWidth;
//fb('Scale factor: ' + Math.round(scale * 100) + '%');