$(document).ready(function(){ 
  //lightbox styles
			$(".iframe").colorbox({width:"80%", height:"80%", iframe:true});
			$(".iframebig").colorbox({width:"95%", height:"95%", iframe:true});
			$(".iframesmall").colorbox({width:"300px", height:"350px", iframe: true});
			$(".iframevideo").colorbox({width:"310px", height:"230px", iframe: true});
  //Set opacity on each span to 0%
  $(".rollover").css({'opacity':'0'});
	
  // Home Announcements
  $('a.homeAnnounceFade').hover(
    function() {
      $(this).find('.rollover').stop().fadeTo(150, 1);
    },
    function() {
      $(this).find('.rollover').stop().fadeTo(50, 0);
    }
  )
	
	//tabs
	$("#subVertTabs").verticaltabs({speed: 005,slideShow: false,activeIndex: 0});

	//jquery PNG fadeout/fadein bug fix for Hero Section
	if($.browser.msie && $.browser.version< 9) {
		$('.hero-content').css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#01FFFFFF,endColorstr=#01FFFFFF)');
	}
	
	$("#showcase").awShowcase(
	{
		content_width:			960,
		content_height:			182,
		fit_to_parent:			false,
		auto:					true,
		interval:				6000,
		continuous:				true,
		loading:				true,
		tooltip_width:			120,
		tooltip_icon_width:		32,
		tooltip_icon_height:	32,
		tooltip_offsetx:		18,
		tooltip_offsety:		0,
		arrows:					false,
		buttons:				true,
		btn_numbers:			true,
		keybord_keys:			true,
		mousetrace:				false, /* Trace x and y coordinates for the mouse */
		pauseonover:			true,
		stoponclick:			false,
		transition:				'fade', /* hslide/vslide/fade */
		transition_delay:		0,
		transition_speed:		700,
		show_caption:			'onload', /* onload/onhover/show */
		thumbnails:				false,
		thumbnails_position:	'outside-last', /* outside-last/outside-first/inside-last/inside-first */
		thumbnails_direction:	'vertical', /* vertical/horizontal */
		thumbnails_slidex:		1, /* 0 = auto / 1 = slide one thumbnail / 2 = slide two thumbnails / etc. */
		dynamic_height:			false, /* For dynamic height to work in webkit you need to set the width and height of images in the source. Usually works to only set the dimension of 		the first slide in the showcase. */
		speed_change:			true, /* Set to true to prevent users from swithing more then one slide at once. */
		viewline:				false, /* If set to true content_width, thumbnails, transition and dynamic_height will be disabled. As for dynamic height you need to set the width and height of images in the source. */
		custom_function:		null /* Define a custom function that runs on content change */
	});	
	

	//clearinput
	  $("input.clearinput").clearInput();


  
  // Rollover for toolbar download button
  $('a.jqfade').hover(
    function() {
      $(this).find('.rollover').stop().fadeTo(150, 1);
    },
    function() {
      $(this).find('.rollover').stop().fadeTo(600, 0);
    }
  )
  
  	//CUFON CALLS
	Cufon.replace('#navbar-content ul li a, #home-action-cap h3, #home-action-left h2, .subHoverBtn h3, .verticalslider_tabs a h2, .verticalslider_contents h3, #home-action-left h4, #home-action-right h4, #floor h4', { fontFamily: 'uni-67-cndbld' });
	
	Cufon.replace('#home-action-left h3', { fontFamily: 'uni-47-cndlt' });
	Cufon.replace('#breadcrumbs, .verticalslider_tabs a h2 span', { fontFamily: 'uni-57-cndrom' });

//HOME ACTION BOX ROLLOVER

var hoverColour = "#039fb0";
//var hoverColor2 = "#a9f0f8";
//when the dom has loaded
$(function(){
        //display the hover div
        $("div.hoverBtn, div.subHoverBtn").show("fast", function() {
                //append the background div
                $(this).append("<div></div>");
                //on link hover
                $(this).children("a").hover(function(){
                        //store initial link colour
                        if ($(this).attr("rel") == "") {
                                $(this).attr("rel", $(this).css("color"));
                        }
                        //fade in the background
                        $(this).parent().children("div")
                                .stop()
                                .css({"display": "none", "opacity": "1"})
                                .fadeIn("fast");
                        //fade the colour
                        $(this) .stop()
                                .css({"color": $(this).attr("rel")})
                                .animate({"color": hoverColour}, 350);
                },function(){
                        //fade out the background
                        $(this).parent().children("div")
                                .stop()
                                .fadeOut("slow");
                        //fade the colour
                        $(this) .stop()
                                .animate({"color": $(this).attr("rel")}, 250);
                });
        });

});


  		//current year
		
		var currentYear = (new Date).getFullYear();	
		$("span.currentYear").text( (new Date).getFullYear() );
  
});







