File: D:/HostingSpaces/SBogers10/kms.komma.pro/wwwroot/public/js/basic_page.js
// Objects
var $switch = $('.switch');
var $info = $('.info');
var $file_bar = $('.file_bar');
// Call init
initPage();
function initPage()
{
// Make an AJAX call when clicked on switch
handleSwitch();
// Make sure planes are the right height
preparePlanes();
// Create a scroll bar on the planes
initScrollPane($info);
initScrollPane($file_bar);
}
/*
* Make an AJAX call when clicked on switch
*/
function handleSwitch()
{
$switch.click(function()
{
$(this).toggleClass('on');
});
}
/*
* Prepare planes for resizing
*/
function preparePlanes()
{
// Call resize function once and on window-resize
$window.resize(resizePlanes);
resizePlanes();
}
/*
* Resize planes
*/
function resizePlanes()
{
var $planes = $('#item .info,#item .file_bar')
if($planes.size() > 0)
{
var h = $window.height() - $planes.offset().top;
$planes.height(h);
}
}