lide\').click(function() {
$(\'#contact-slide-form\').slideToggle(\'slow\', function() {
// Animation complete.
});
});
// contact form on business pages
$(\'#related-articles-more\').click(function() {
$(\'#related-articles-more-container\').slideToggle(\'slow\', function() {
// Animation complete.
});
});
// business images
$("ul.business-gallery li a").click(function() {
var main = $(this).attr(\'rel\');
var large = $(this).attr(\'href\');
var title = $(this).children(\'img\').attr(\'title\');
//Set main image tags
$("#business-image-container a:first").attr(\'href\', large);
$("#business-image").attr(\'src\', main);
$("#business-image").attr(\'alt\', title);
$("#business-image").attr(\'title\', title);
$("p[class=\'caption\']").text(title);
return false;
});
// product images
$("ul.prodgallery li a").click(function() {
var main = $(this).attr(\'rel\');
var large = $(this).attr(\'href\');
var title = $(this).children(\'img\').attr(\'title\');
//Set main image tags
$("#prodcontainer a:first").attr(\'href\', large);
$("#prodimg").attr(\'src\', main);
$("#prodimg").attr(\'alt\', title);
$("#prodimg").attr(\'title\', title);
$("p[class=\'caption\']").text(title);
return false;
});
$(".product-enquiry-button").colorbox({transition:"elastic", width:"500", height: "700"});
$("a#share-this-page").colorbox({transition:"elastic", width:"600", height:"600", overlayClose:false});
$(\'.advert-tracking\').click(function(event) {
event.preventDefault();
var adId = this.id;
//alert(adId);
var adInfo = adId.split("_");// like ad,lc,g,25 = advert/leftcol/general advert/id of 25
$.get("/advert-tracker", { id: adInfo[3], section: adInfo[1], method: \'click\' },
function(data){
document.location.href = data;
// testing
// alert("Data Loaded: " + data);
}
);
});
// collect a list of adverts which have just been loaded and record the advert id\'s in the db
var adIds = [];
$(\'a.advert-tracking\').each(function(index) {
adIds[index] = $(this).attr(\'id\');
//alert(index + \': \' + $(this).attr(\'id\'));
});
$.get("/advert-tracker", { ids: adIds, method: \'display\' },
function(data){
//complete
}
);
});
'; ?>