// JavaScript Document
	document.createElement('header');
	document.createElement('nav');
	document.createElement('section');
	document.createElement('article');
	document.createElement('aside');
	document.createElement('footer');

	var j = jQuery.noConflict();		
	
//ticker begin
	var leftrightslide = new Array()
	var finalslide = ''
	var slidesspace = parseInt ('9')
	var sliderwidth = "710px"
	var sliderheight = "20px"
	var slidebgcolor = ""
	var stopslide = ""
	var imagegap = "&nbsp;"
	var slidespeed = 1
//ticker end


	j(document).ready(function(){

		j('#mainlevel ul li:last-child').addClass('last');	
		j('#mainlevel ul li:first-child').addClass('first');
		j('.sidebarmenu #mainlevel li:last-child').addClass('last');		
							   
//insert calltoaction into article
		j('.cta script').remove()
		var calltoaction = j('.cta').html();
		j('#page .middle').prepend(calltoaction);	
		j('.cta').remove();
//insert calltoaction into article END
		
//Modify blog read more link
	j('a.readonpressrelease').text('Read more ...');
	j('a.readonpropertynews').text('Read more ...');
//Modify blog read more link END

//Testimonials 
	
	j('.container').serialScroll({
	  items: 'div', // Selector to the items ( relative to the matched elements)
	  axis: 'y', // The default is 'y'
	  duration: 1200, // Length of the animation (if you scroll 2 axes and use queue, then each axis take half this time)
	  interval: 20000, // It's the number of milliseconds to automatically go to the next
	  cycle: true, // Cycle endlessly ( constant velocity, true is the default )
	  force:true, // Force a scroll to the element specified by 'start' (some browsers don't reset on refreshes)
	  constant:false
	  
	    //queue:false,// We scroll on both axes, scroll both at the same time.
		//event:'click',// On which event to react (click is the default, you probably won't need to specify it)
		//stop:false,// Each click will stop any previous animations of the target. (false by default)
		//lock:true, // Ignore events if already animating (true by default)		
		//start: 0, // On which element (index) to begin ( 0 is the default, redundant in this case )		
		//step:1, // How many items to scroll each time ( 1 is the default, no need to specify )
		//jump:false, // If true, items become clickable (or w/e 'event' is, and when activated, the pane scrolls to them)
		//lazy:false,// (default) if true, the plugin looks for the items on each event(allows AJAX or JS content, or reordering)
 		//constant:true, // constant speed
  
	  
	});
	j('.container').trigger('next');
		


//home page login box password	
							   
/*	j('#passwd_text').focus(function(){
	  j(this).hide();
	  j('#passwd').show().focus();
	});
	j('#passwd').blur(function(){
	  if(this.value == ''){
		j(this).hide();
		j('#passwd_text').show();
	  }
	});  
    j('#passwd').hide();
	j('#passwd_text').show();*/


<!--//--><![CDATA[//><!--

sfHover = function() {
	var sfEls = document.getElementById("mainlevel").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>

});	
//===================Document ready function ENDS=================

function slideSwitch() {
	var active = j('#slideshow DIV.active');
	
	if ( active.length == 0 ) active = j('#slideshow DIV:last');
	
	// use this to pull the divs in the order they appear in the markup
	var next =  active.next().length ? active.next()
		: j('#slideshow DIV:first');
	
	// uncomment below to pull the divs randomly
	// var $sibs  = $active.siblings();
	// var rndNum = Math.floor(Math.random() * $sibs.length );
	// var $next  = $( $sibs[ rndNum ] );
	
	active.addClass('last-active');
	
	next.css({opacity: 0.0})
	.addClass('active')
	.animate({opacity: 1.0}, 5000, function() {
		active.removeClass('active last-active')
		active.css('opacity','0');
	});
};
	
	j(function(){
		if (!navigator.userAgent.match(/iPad/i)) setInterval( "slideSwitch()", 9000 ); //make this banner animation not run on the ipad.
	});
	
//rss feed begin
// taken from: http://www.zazar.net/developers/zrssfeed/
(function($){$.fn.rssfeed=function(url,options,fn){var defaults={limit:10,header:true,titletag:'h4',date:true,content:true,snippet:true,showerror:true,errormsg:'',key:null,ssl:false,linktarget:'_self'};var options=$.extend(defaults,options);return this.each(function(i,e){var $e=$(e);var s='';if(options.ssl)s='s';if(!$e.hasClass('rssFeed'))$e.addClass('rssFeed');if(url==null)return false;var api="http"+s+"://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q="+encodeURIComponent(url);if(options.limit!=null)api+="&num="+options.limit;if(options.key!=null)api+="&key="+options.key;api+="&output=json_xml"
$.getJSON(api,function(data){if(data.responseStatus==200){_process(e,data.responseData,options);if($.isFunction(fn))fn.call(this,$e);}else{if(options.showerror)
if(options.errormsg!=''){var msg=options.errormsg;}else{var msg=data.responseDetails;};$(e).html('<div class="rssError"><p>'+msg+'</p></div>');};});});};var _process=function(e,data,options){var feeds=data.feed;if(!feeds){return false;}
var html='';var row='odd';var xml=getXMLDocument(data.xmlString);var xmlEntries=xml.getElementsByTagName('item');if(options.header)
html+='<div class="rssHeader">'+'<a href="'+feeds.link+'" title="'+feeds.description+'">'+feeds.title+'</a>'+'</div>';html+='<div class="rssBody">'+'<ul>';for(var i=0;i<feeds.entries.length;i++){var entry=feeds.entries[i];var entryDate=new Date(entry.publishedDate);var pubDate=entryDate.toDateString();html+='<li class="rssRow '+row+'">'+'<'+options.titletag+'><a href="'+entry.link+'" title="View this feed at '+feeds.title+'" target="'+options.linktarget+'">'+entry.title+'</a></'+options.titletag+'>'
if(options.date)html+='<div class="pubDate">'+pubDate+'</div><div class="readMore"><a href="'+entry.link+'" title="View this feed at '+feeds.title+'" target="'+options.linktarget+'">Read more...</a></div>'
if(options.content){if(options.snippet&&entry.contentSnippet!=''){var content=entry.contentSnippet;}else{var content=entry.content;}
html+='<p>'+content+'</p>'}
if(xmlEntries.length>0){var xmlMedia=xmlEntries[i].getElementsByTagName('enclosure');if(xmlMedia.length>0){html+='<div class="rssMedia"><div>Media files</div><ul>'
for(var m=0;m<xmlMedia.length;m++){var xmlUrl=xmlMedia[m].getAttribute("url");var xmlType=xmlMedia[m].getAttribute("type");var xmlSize=xmlMedia[m].getAttribute("length");html+='<li><a href="'+xmlUrl+'" title="Download this media">'+xmlUrl.split('/').pop()+'</a> ('+xmlType+', '+formatFilesize(xmlSize)+')</li>';}
html+='</ul></div>'}
html+='</li>';}
if(row=='odd'){row='even';}else{row='odd';}}
html+='</ul>'+'</div>'
$(e).html(html);};function formatFilesize(bytes){var s=['bytes','kb','MB','GB','TB','PB'];var e=Math.floor(Math.log(bytes)/Math.log(1024));return(bytes/Math.pow(1024,Math.floor(e))).toFixed(2)+" "+s[e];}
function getXMLDocument(string){var browser=navigator.appName;var xml;if(browser=='Microsoft Internet Explorer'){xml=new ActiveXObject('Microsoft.XMLDOM');xml.async='false'
xml.loadXML(string);}else{xml=(new DOMParser()).parseFromString(string,'text/xml');}
return xml;}})(jQuery);
//rss feed end
