/*	George Brand jQuery	*/

$(document).ready(function(){
	var $j = jQuery.noConflict();

	/* Specials Banner Append */
	$j('li.lastminutespecials').append('<span class="horbanner"></span>');

	/* Front page horizontal image scroller */
	/* $j('#featuredmainimg-img').jparallax(); */

	/* jQuery DatePicker */
	$j("#dateto").datepicker();

	/* jQuery DatePicker */
	$j("#datefrom").datepicker();

	$j("#datefrom").attr("value","Select Date From");
	$j("#dateto").attr("value","Select Date To");

	/* Front page featured listings */
	$j('#home-property-features li').append('<span></span>');
	$j('#home-property-features li span').css({'display':'block'});
	$j('#home-property-features li').hover(function(){
		$j(this).children('span').stop().animate({'top':'20px'},600);
	},function(){
		$j(this).children('span').stop().animate({'top':'134px'},500);
	});

	$j('#home-property-features ul').innerfade({
		speed: 1000,
		timeout: 5000,
		type: 'sequence',
		containerheight: '134px'
	});

	$j('#featuredmainimg-img').innerfade({
		speed: 1000,
		timeout: 7000,
		type: 'sequence',
		containerheight: '462px'
	});

	/* Properties Slideshow */
	$j('#slideshow ul li a').attr("rel","georgebrandslide"); 
	$j("a[rel='example1']").colorbox();
	$j("a[rel='example2']").colorbox({transition:"fade"});
	$j("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
	$j("a[rel='georgebrandslide']").colorbox({slideshow:true, slideshowSpeed: 1500, opacity:0.95});
	$j(".single").colorbox({}, function(){
		alert('Howdy, this is an example callback.');
	});
	$j(".colorbox").colorbox();
	$j(".youtube").colorbox({iframe:true, width:650, height:550});
	$j(".inline").colorbox({width:"50%", inline:true, href:"#inline_example1"});

	$j(".search").colorbox({width:"900", height:"440", iframe:true});
	$j(".subscribe").colorbox({width:"900", height:"525", iframe:true});
	$j(".booking").colorbox({width:"900", height:"625", iframe:true});
	$j(".map").colorbox({width:"800", height:"600", iframe:true});
	$j(".allmaps").colorbox({width:"785", height:"680", iframe:true});
	$j(".bring").colorbox({width:"600", height:"420", iframe:true});
	$j(".terms").colorbox({width:"600", height:"600", iframe:true});
	$j(".small").colorbox({width:"600", height:"300", iframe:true});
//	$j(".boxbutton").colorbox({width:"600", height:"600", iframe:true});
//	$j(".boxbutton2").colorbox({width:"900", height:"600", iframe:true});
	
	//Example of preserving a JavaScript event for inline calls.
	$j("#click").click(function(){ 
		$j('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
		return false;
	});
});