$(document).ready(function(){
	// IE Hover fix
    ieHover('.navigation li');
	ieHover('#offersContainer .offer');
	
	// changing news
    $('ul.newschanger').bxSlider({
		mode: 'fade',
		controls: false,
		auto: true,
		pause: 10000
    });
	
	// startpage logos
    $('ul.logos').bxSlider({
        ticker: true,
        tickerSpeed: 500,
		displaySlideQty: 10,
		moveSlideQty: 10
    });
	
	// iphone + ipad corrections
	if((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) { 
		$('#footerWrapper').css('position', 'static');
		$('#wrapper').css('background', 'none');
	}
	
	$('input.text').click(function() {
		$(this).attr('value', '');
	});
	
	// rounded news corners for ie
	/*$('.newsItem .preview.border').corner('round 10px');*/
});

function ieHover(h_list) {
	$(h_list).hover(function() {
		$(this).addClass('hover');
	}, function() {
		$(this).removeClass('hover');
	});
}

function scrollTop() {
	window.scrollTo(0, 0);
}

function resizeIframe(height) {
	$('iframe').css('height', height+'px');
}

