///
var modalizer;
//DOM Ready
jQuery(document).ready(function() {
positionSite();
jQuery(window).resize(function() {
positionSite();
});
addGenericEvents();
});
function getFlashPage(pageName) {
showModalizer(jQuery(".content-wrapper"));
jQuery("#content").load(pageName, function() {
if (status == "error") {
var msg = "Sorry but there was an error: ";
jQuery("#content").html(msg + xhr.status + " " + xhr.statusText);
}
hideModalizer();
});
}
function showModalizer(jq_target) {
modalizer = jQuery("
Loading Page
");
modalizer.addClass("modalizer");
var top = jq_target.offset().top;
var height = jq_target.height();
var width = jq_target.width();
modalizer.css("top", top);
modalizer.height(height);
modalizer.width(width);
modalizer.appendTo(jq_target);
}
function hideModalizer() {
jQuery(".modalizer").remove();
}
function addGenericEvents() {
jQuery("#HomeButton").click(function() {
document.location = "Default.aspx";
});
jQuery("#AboutUsButton").click(function() {
document.location = "About.aspx";
});
jQuery("#ContactUsButton").click(function() {
document.location = "Contact.aspx";
});
jQuery("#TransmissionProductsButton").click(function() {
document.location = "Transmission.aspx";
});
jQuery("#RubberConveyorButton").click(function() {
document.location = "RubberConveyor.aspx";
});
jQuery("#PVCPUConveyorButton").click(function() {
document.location = "PVCPU.aspx";
});
jQuery("#ModularBeltingButton").click(function() {
document.location = "ModularBelting.aspx";
});
jQuery("#IndustrialHosingButton").click(function() {
document.location = "IndustrialHosing.aspx";
});
jQuery("#ServiceProductsButton").click(function() {
document.location = "ServiceProducts.aspx";
});
}
function positionSite() {
var screenWidth = 0;
var siteWrapperWidth = jQuery(".site-wrapper").outerWidth();
if (jQuery.browser.msie) {
screenWidth = jQuery(document).width();
}
else {
screenWidth = jQuery(document).width();
}
var siteLeft = ((screenWidth - siteWrapperWidth) / 2);
jQuery(".site-wrapper").css("left", siteLeft);
jQuery(".site-wrapper").css("top", "0");
}