
/* <![CDATA[ */  
$(document).ready(function() {

$('#videos a, .scrollable img, .latestlisting a, .searchresult img:not(.icon)').hover(function() {
	$(this).stop().animate({"opacity" : .7});									
}, function(){
	$(this).stop().animate({"opacity" : 1});	
});


$('#prev, #next').animate({"opacity" : 0});
$('#slider').hover(function() {
	$('#prev, #next').stop().animate({"opacity" : .5});									
}, function(){
	$('#prev, #next').stop().animate({"opacity" : 0});	
});




$('#colorschemechanger .button').click(function() {
	var colorscheme = $('#color').val();
	$.cookie("color", colorscheme);
	window.location.href="http://www.informatik.com/themeforest/openhouse";
});

$('#resetcolorscheme').click(function() {
	$.cookie("color", null);
	window.location.href="http://www.informatik.com/themeforest/openhouse";
});




//dropdown menu
 $("ul.sf-menu").supersubs({ 
	minWidth:    12,   // minimum width of sub-menus in em units 
	maxWidth:    35,   // maximum width of sub-menus in em units 
	extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
					   // due to slight rounding differences and font-family 
}).superfish();  // call supersubs first, then superfish, so that subs are 
				 // not display:none when measuring. Call before initialising 
				 // containing tabs for same reason. 
				 
// cufon font replacement
Cufon.replace("h1, h2, h3:not(#features h3), h4, h5, h6, a.readmore, a.button, .pullquote, .blockquote_left, .blockquote_right, span#phone");

// move "read more" link/button so it's inline with it's previous paragraph
$(".readmore").each(function(index) {
	$(this).appendTo($(this).parent("div").children("p:last"));
});



$('.comment-body').append("<div class='comment_pointer' />");

$(".searchresult:nth-child(3n+1)").addClass("norightmargin");
$(".searchresult:nth-child(3n+2)").addClass("clearleft");
   

//Hide (Collapse) the toggle containers on load
$(".toggle_container").hide(); 

//Switch the "Open" and "Close" state per click
$("h4.trigger").toggle(function(){
	$(this).addClass("active");
	}, function () {
	$(this).removeClass("active");
});

//Slide up and down on click
$("h4.trigger").click(function(){
	$(this).next(".toggle_container").slideToggle("slow");
});




function remember( selector ){
$(selector).each(
function(){
//if this item has been cookied, restore it
var name = $(this).attr('name');
if( $.cookie( name ) ){
$(this).val( $.cookie(name) );
}
//assign a change function to the item to cookie it
$(this).change(
function(){
$.cookie(name, $(this).val(), { path: '/', expires: 365 });
}
);
}
);
}
remember( '[name=beds],[name=baths], [name=minprice], [name=maxprice], [name=rentorbuy], [name=propertytype] ' );



});

/* ]]> */

