$(document).ready(function(){
$('#koodoz').wrapInner('<a href="http://www.koodoz.com.au" target="_blank" />');
$('#koodoz a a').each(function(){ $(this).replaceWith($(this).html()); });
$('a[rel*=external]').attr('target','_blank');
$('a[rel*=print]').click(function() { window.print(); return false; }).css({'cursor':'pointer'});
$('li.listItem:nth-child(4n)').css({'padding-right':'0'});
$('li.listItem:first, li.listItem:nth-child(5n)').css({'padding-left':'0'});
$('.common .promoSqr:last').addClass('last');
$('input[type=text], input[type=password], textarea').not('.noLin').labelsInInputs({ color: '#444', blur_color: '#CCC', top: '10px', left: '5px', font_size: '14px' });
$('#keyword').labelsInInputs({ color: '#444', blur_color: '#CCC', top: '10px', left: '40px', font_size: '14px' });
$('select:not(#country_id, #shipping_country_id)').labelsInSelects();
$('label[for=country_id], label[for=shipping_country_id]').hide();
$('html:not(.ie7) select').makeNiceSelects();
$('input[type*=text]').addClass('inputText');
// fix webkit image resizing by using da'SVGs.
if ($.browser.webkit) {
$('#mainNav img').each(function(i) {
$(this).attr('src', $(this).attr('src').replace('png','png'));
});
}
// cart checkout slidey element
$('#cartInfo, #extraCart').hover(
function() {
$('#extraCart').stop(true, true).slideDown();
},
function() {
$('#extraCart').stop(true, true).delay(1500).slideUp();
}
);
//animate menu items
$('html:not(.ie7) #mainNav a').hover(function() {
$(this).find('img').animate({'height':'100%'},'fast');
}, function() {
$(this).find('img').animate({'height':'30px'},'fast');
});
$('html.ie7 #mainNav img').css({'height':'100%'});
// slide stuff around
$(".slider").slides({
generatePagination:false, //plugin chokes without this option --daniel
play: 5500,
fadeSpeed: 350,
effect: 'fade'
});
$('.man-slider').scrollElement();
//modal box wherever it's needed
$('.box').colorbox();
//nice animations for error and warning messages
$('.warning, .error').css({'display':'none'}).slideDown('slow');
$('span.error').parent('p').addClass('error');
// bring left column down to same height as pagination
the_height = $('#listContent').outerHeight(true) - ( parseInt($('#listPromo').css('margin-top')) + parseInt($('#listPromo').css('padding-top')) + parseInt($('#listPromo').css('padding-bottom')) );
$('#listPromo').css({'min-height': the_height + 'px' });
//take whatever is in the .full div and place it outside columns in information pages
$('#contentWrap .full').insertBefore('#contentWrap').wrap('<div class="wrapper" />');
});
