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

$('#videos a, .scrollable img, .latestlisting img, .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});	
});

$(".btn-slide").click(function(){
$("#slide-panel").slideToggle("slow");
});


$('#social a').tipsy({gravity: 's', fade: true});

$('#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. 


$('#dsidx-disclaimer + p').addClass('disclaimer');

$('#dsidx-property-types').prependTo('#dsidx-description');
$('[name=idx-q-BedsMin], [name=idx-q-BathsMin]').after('&nbsp;&nbsp;');



		 
// 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, .dsidx-address, .address");

// 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"));
});

$(".dsidx-listing").append("<div class='shadow-small'></div>");

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

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

$(".agentresult:nth-child(3n+2)").addClass("norightmargin");
$(".agentresult:nth-child(3n+3)").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=idx-q-PropertyTypes], [name=idx-q-Cities], [name=idx-q-Communities], [name=idx-q-Tracts], [name=idx-q-PriceMin], [name=idx-q-PriceMax], [name=idx-q-BedsMin], [name=idx-q-BathsMin] ' );



});

/* ]]> */

