﻿
function removeCrLf(data) {
    return data.split('\r').join('').split('\n').join('');
}

function getitemcontainer(element) {
    return $(element).parents().filter(".itemcontainer");
}

function ajaxCall(url, data, callback) {
    $.get(url, data + '&ms=' + new Date().getTime(), callback);
}

function ajaxCallJson(url, data, callback) {
    $.getJSON(url, data + '&ms=' + new Date().getTime(), callback);
}

$(document).ready(function() {
    $('#breadcrumbs .before').mouseover(function() { $(this).addClass('hover'); });
    $('#breadcrumbs .before').mouseout(function() { $(this).removeClass('hover'); });
    if ($('#alertheader .box').length > 0)
        $('#alertheader .box').corner('15px');
    if ($('#errorheader .box').length > 0)
        $('#errorheader .box').corner('15px');
});

function showExternalCatalogue(url) {
    var catWin;
    catWin = window.open(url,
					'OfficeworksCatalogue',
					'width=1000,height=900,location=no,status=no,menubar=no,toolbar=no,scrollbars=yes');
    return false;
}

