/*

TA Plastics 2010 (custom) Javascript
===============================================

Author:			John Metcalfe - john@discoverydesign.co.uk
Copyright:		2010 Discovery Design Ltd.
Description: 	Various effects for TA Plastics
Last Edit:		07/08/2010 by John Metcalfe

*/

/* SMOOTH SCROLL
=============================================== */
$(function() {
   $('a[href*=#]').click(function() {
      if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var $target = $(this.hash); $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']'); if ($target.length) { var targetOffset = $target.offset().top; $('html,body').animate({scrollTop: targetOffset}, 450); return false; } } }); });

/* LOGO FADE IN & OUT
=============================================== */
$(document).ready(function() {
   $("#container_logos img").fadeTo("slow", 0.7); $("#container_logos img").hover(function() {
      $(this).fadeTo("slow", 1.0); }
   , function() {
      $(this).fadeTo("slow", 0.7); }
   ); }
); 

/* DIALOG ~ TRADE & FABRICATION
=============================================== */
$().ready(function () {
    $('#site_choice_sbtrade').jqm({
		overlay: '85',
		target: '#site_choice_sbtrade',
		toTop: true,
		trigger: '.trade a'
    });

    $('#site_choice_sbfabrication').jqm({
		overlay: '85',										
        target: '#site_choice_sbfabrication',
		toTop: true,
		trigger: '.fabrication a'
    });
});
