
/* <![CDATA[ */  
jQuery(document).ready(function() {

jQuery('#videos a, .scrollable img, .latestlisting a, .searchresult img:not(.icon)').hover(function() {
	jQuery(this).stop().animate({"opacity" : .7});									
}, function(){
	jQuery(this).stop().animate({"opacity" : 1});	
});


jQuery('#prev, #next').animate({"opacity" : 0});
jQuery('#slider').hover(function() {
	jQuery('#prev, #next').stop().animate({"opacity" : .5});									
}, function(){
	jQuery('#prev, #next').stop().animate({"opacity" : 0});	
});

jQuery(".btn-slide").click(function(){
jQuery("#slide-panel").slideToggle("slow");
});


jQuery('#social a').tipsy({gravity: 's', fade: true});

jQuery('#colorschemechanger .button').click(function() {
	var colorscheme = jQuery('#color').val();
	jQuery.cookie("color", colorscheme);
	window.location.href="http://www.informatik.com/themeforest/openhouse";
});

jQuery('#resetcolorscheme').click(function() {
	jQuery.cookie("color", null);
	window.location.href="http://www.informatik.com/themeforest/openhouse";
});


jQuery('#dsidx-disclaimer + p').addClass('disclaimer');

jQuery('#dsidx-property-types').prependTo('#dsidx-description');

// remove based on spglistings plugin
//jQuery('[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, h7, a.readmore, .pullquote, .blockquote_left, .blockquote_right, span#phone, .dsidx-address, .address, #customsearch label");

// move "read more" link/button so it's inline with it's previous paragraph
jQuery(".readmore").each(function(index) {
	jQuery(this).appendTo(jQuery(this).parent("div").children("p:last"));
});

jQuery(".dsidx-listing").append("<div class='shadow-small'></div>");

jQuery('.comment-body').append("<div class='comment_pointer' />");

jQuery(".searchresult:nth-child(3n+1)").addClass("norightmargin");
jQuery(".searchresult:nth-child(3n+2)").addClass("clearleft");
   

//Hide (Collapse) the toggle containers on load
jQuery(".toggle_container").hide(); 

//Switch the "Open" and "Close" state per click
jQuery("h4.trigger").toggle(function(){
	jQuery(this).addClass("active");
	}, function () {
	jQuery(this).removeClass("active");
});

//Slide up and down on click
jQuery("h4.trigger").click(function(){
	jQuery(this).next(".toggle_container").slideToggle("slow");
});




function remember( selector ){
jQuery(selector).each(
function(){
//if this item has been cookied, restore it
var name = jQuery(this).attr('name');
if( jQuery.cookie( name ) ){
jQuery(this).val( jQuery.cookie(name) );
}
//assign a change function to the item to cookie it
jQuery(this).change(
function(){
jQuery.cookie(name, jQuery(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] ' );



});

/* ]]> */

