/**
 * Mutes firebug console code and errors on browsers where firebug is not installed
 */
if (!window.console || !console.firebug) {
    var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", 
	"groupCollapsed", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
    window.console = {};
    for (var i = 0; i < names.length; ++i) {
        window.console[names[i]] = function() {};
	}
}
///**
// * Mutes google analytics event tracking. GA won't be present on the admin side, so pageTracker._trackEvent will throw errors.
// */
//if (!window.pageTracker) {
//	var trackers = ["_trackEvent"];
//	window.pageTracker = {};
//	for (var i = 0; i < trackers.length; ++i) {
//		window.pageTracker[trackers[i]] = function() {};
//	}
//}

console.log('Running /static/js/category/mvtests.js')

/*	SECTION 1: H1 variations
-------------------------------------------------------------- */
function section1(variation) {
	
	if (variation == 'variation1') {
		console.log('SECTION 1 - VARIATION 1 = Book Movers Online');
		$('h1').text('Book Movers Online');
	}
	else if (variation == 'variation2') {
		console.log('SECTION 1 - VARIATION 2 = Movers and Moving Labor');
		$('h1').text('Movers and Moving Labor');
	}
	else if (variation == 'variation3') {
		console.log('SECTION 1 - VARIATION 3 = Movers');
		$('h1').text('Movers');
	}
	else if (variation == 'variation4') {
		console.log('SECTION 1 - VARIATION 4 = Moving Labor');
		$('h1').text('Moving Labor');
	}
	
}

/*	SECTION 2: Postit Heading
-------------------------------------------------------------- */
function section2(variation) {
	
	if (variation == 'variation1') {
		console.log('SECTION 2 - VARIATION 1 = View Movers Prices');
		$('#postit h2').text('View Movers Prices');
	}
	else if (variation == 'variation2') {
		console.log('SECTION 2 - VARIATION 2 = Compare Moving Companies');
		$('#postit h2').text('Compare Moving Companies').css('fontSize','20px')
	}
	else if (variation == 'variation3') {
		console.log('SECTION 2 - VARIATION 3 = Compare Movers');
		$('#postit h2').text('Compare Movers');
	}
	
}

/*	SECTION 3: Postit Note Button
-------------------------------------------------------------- */
function section3(variation) {
	
	if (variation == 'variation1') {
		console.log('SECTION 3 - VARIATION 1 = Search Movers');
		$('.mainCTASubmit').css('backgroundImage','url(/static/img/category/mainCTA2.png)');
	}
	else if (variation == 'variation2') {
		console.log('SECTION 3 - VARIATION 2 = Book Online');
		$('.mainCTASubmit').css('backgroundImage','url(/static/img/category/mainCTA3.png)');
	}
	else if (variation == 'variation3') {
		console.log('SECTION 3 - VARIATION 3 = View Movers');
		$('.mainCTASubmit').css('backgroundImage','url(/static/img/category/mainCTA4.png)');
	}
	else if (variation == 'variation4') {
		console.log('SECTION 3 - VARIATION 4 = Compare Movers');
		$('.mainCTASubmit').css('backgroundImage','url(/static/img/category/mainCTA5.png)');
	}
	
}


