// JavaScript Document
var currentBanner = 1;
var currenthash = window.location.hash.substring(1);
		
function updateIFrame() { 
	var hash = window.location.hash.substring(1);
	if(hash != currenthash && hash != '')
	{
		$('#blogframe').attr('src', 'http://rossmoney.co.uk/' + hash + '/?iframe=true');
		currenthash = hash;
	}
}

function changeTwitterWidget()
{
	var header = $('.twtr-hd');
	var footer = $('.twtr-ft');
	if(header != null && footer != null)
	{
		$('.twtr-ft a').attr('href', 'http://twitter.com/StrictlyWebs');
		$('.twtr-hd h3').html('Recent News From');
	} else {
		setTimeout('changeTwitterWidget()', 1000);
	}
}

function changeBanner(devtype)
{
	currentBanner++;
	if(currentBanner == 5) currentBanner = 1;
	if(devtype == 'mobile') $('#banner').css('background', 'url(images/banners/banner'+currentBanner+'_mob.jpg) no-repeat');
	if(devtype == 'screen') $('#banner').css('background', 'url(images/banners/banner'+currentBanner+'.jpg) no-repeat');
	switch(currentBanner)
	{
	case 1:
		$('#banner').attr('href', 'whatwedo#webdesign');
	break;
	case 2:
		$('#banner').attr('href', 'whatwedo#seo');
	break;
	case 3:
		$('#banner').attr('href', 'whatwedo#webapps');
	break;
	case 4:
		$('#banner').attr('href', 'contact#getquote');
	break;
	}
}
 
function updateProductsOnContactForm()
{
	var selectoptions = document.getElementById('products');
	selectoptions.options.length=0;
	switch($('#querytype').val())
	{
		case 'Website Design':
			selectoptions.options[0] = new Option("Existing Website Revamp", "Existing Website Revamp");
			selectoptions.options[1] = new Option("Small/Basic Website", "Basic Website");
			selectoptions.options[2] = new Option("Standard Website", "Standard Website");
			selectoptions.options[3] = new Option("Large Website", "Large Website");
			selectoptions.options[4] = new Option("User Editable Website", "User Editable Website");
			selectoptions.options[5] = new Option("New Website Wordpress Based", "New Website Wordpress Based");
		break;
		case 'Web Application Development':
			selectoptions.options[0] = new Option("N/A", "");
		break;
		case 'SEO':
			selectoptions.options[0] = new Option("Basic SEO Pack", "Basic SEO Pack");
			selectoptions.options[1] = new Option("Advanced SEO Pack", "Advanced SEO Pack");
			selectoptions.options[2] = new Option("Complete Advertising & SEO", "Complete Advertising And SEO");
		break;
	}
}

function applyCorners()
{
	  function initCorners() {
		var settings = {
		  tl: { radius: 30 },
		  tr: { radius: 30 },
		  bl: { radius: 0 },
		  br: { radius: 0 },
		  antiAlias: true
		}
	
		curvyCorners(settings, "#header");
		
		settings = {
		  tl: { radius: 0 },
		  tr: { radius: 0 },
		  bl: { radius: 30 },
		  br: { radius: 30 },
		  antiAlias: true
		}
		
		curvyCorners(settings, "#footer");
		
		settings = {
		  tl: { radius: 0 },
		  tr: { radius: 15 },
		  bl: { radius: 15 },
		  br: { radius: 0 },
		  antiAlias: true
		}
		
		curvyCorners(settings, "#quoteform");
		
	  }  
}
  
  
  
