﻿var ForSaleNow = function (div) {
	this.div = $(div);
	this.init();
}

ForSaleNow.prototype = {
	div: null,
	init: function () {
		var self = this;


		self.div.find('.all').click(function () {
			window.location = "/till-salu/";
		});

		self.div.find('.vip').click(function () {
			window.location = "/till-salu/?vip=true";
		});

		self.div.find('.cmvilla').click(function () {
			window.location = "/till-salu/?restypes=CMVilla";
		});

		self.div.find('.cmbolgh').click(function () {
			window.location = "/till-salu/?restypes=CMBoLgh";
		});

		self.div.find('.cmfritidshus').click(function () {
			window.location = "/till-salu/?restypes=CMFritidshus";
		});

		self.div.find('.cmtomt').click(function () {
			window.location = "/till-salu/?restypes=CMTomt";
		});

		// some fun with hover //
		self.div.find('.bgPink1').hover(function () {
			$(this).css('background-color', '#ff99cc');
		}, function () {
			$(this).css('background-color', '#ff0099');
		});

		self.div.find('.bgPink2').hover(function () {
			$(this).css('background-color', '#ff0099');
		}, function () {
			$(this).css('background-color', '#ff99cc');
		});

	}


};

var ForSale = new ForSaleNow($('#right-now'));
