var addthis_options = 'email, twitter, facebook, digg, google, delicious, stumbleupon, more', addthis_brand = "Cleaning 4U", addthis_config = {
    username: "Cleaning4U"
};

var myData, geoData = new Class({
    Implements: [Options, Events],
    options: {
        url: "http://geoip.pidgets.com/?format=json",
        callback: $empty
    },
    initialize: function(options) {
        this.setOptions(options);
        new Asset.javascript(this.options.url + "&callback=" + this.options.callback);
    },
    setData: function(data) {
        this.geoData = data;
        this.fireEvent("complete", data);
    },
    complete: function(data) {
        this.fireEvent("complete", data);
    }
});


var stacker = new Class({
    Implements: [Options, Events],
    initialize: function(el, options) {
        this.setOptions($merge({
            transitionDelay: 3,
            stackSelector: ".stackHolder" // seconds
        }, options));

        this.element = el;
        this.buildStacks();
    },
    buildStacks: function() {

        this.stacks = this.element.getElements(this.options.stackSelector);

        // make sure all but first one are hidden from user
        this.stacks.each(function(el, done) {
            if (done > 0) {
                el.setStyles({
                    display: "none"
                }).setOpacity(0);
            }
            else {
                el.setStyles({
                    display: "block"
                });
            }
        });

        this.active = 0;
        this.buildControls();
    },
    buildControls: function() {
        if (this.stacks.length < 2)
            return false;
        if (this.controls)
            this.controls.dispose();

        var coords = this.stacks[this.active].getCoordinates();

        this.controls = new Element("div", {
            id: "stackControl",
            "class": "hfloat",
            styles: {
                position: "absolute",
                top: coords.bottom - 30,
                zIndex: 10000,
                visibility: "hidden"
            },
            html: "<div id='nmore'>More offers &raquo;</div><div id='nleft'></div><div id='nmid'></div><div id='nright'>"
        }).inject(document.body);

        var _this = this;

        this.stacks.each(function(sel, done) {
            var className = (sel == _this.stacks[_this.active]) ? "ncontrol cur ncontrolSelected" : "ncontrol cur";
            new Element("div", {
                "class": className,
                rel: done,
                html: done + 1,
                events: {
                    click: function() {
                        if (this.hasClass("ncontrolSelected"))
                            return false;

                        // _this.active = _this.controls.getElement(".ncontrolSelected").get("rel").toInt();
                        $clear(_this.cyclePanes);
                        _this.stacks[_this.active].fade(1, 0).setStyles({
                            display: "none"
                        });

                        $$(".ncontrolSelected").removeClass("ncontrolSelected");
                        this.addClass("ncontrolSelected");

                        _this.stacks[this.get("rel").toInt()].setOpacity(0).setStyles({
                            display: "block"
                        }).fade(0, 1);
                        //_this.buildControls();

                        _this.active = this.get("rel").toInt();

                        _this.nextClick();
                    },
                    mouseenter: function() {
                        this.addClass("ncontrolOver");
                    },
                    mouseleave: function() {
                        this.removeClass("ncontrolOver");
                    }
                }
            }).inject($("nmid"));
        }); // each stack represented by a control.

        this.controls.setStyles({
            left: coords.right - this.controls.getStyle("width").toInt() - 10,
            visibility: "visible"
        });

        this.nextClick();

        window.addEvent("resize", function() {
            this.buildControls();
        }.bind(this));
    },
    nextClick: function() {
    	// done loop.
    	if (this.stacks.length > 1) {
    		var nextV = (this.active === this.stacks.length - 1) ? 0 : this.active+1;
    		var nextElement = this.controls.getElement(".ncontrol[rel="+nextV+"]");

    		if (nextElement) {


    			this.cyclePanes = (function() {
    				if (this.controls.getElement("div.ncontrolOver"))
    					return false;

        			nextElement.fireEvent("click");
    			}).periodical(this.options.transitionDelay * 1000, this);
    		}
    	}
	}
});



var seo = new Class({
    Implements: [Events, Options],
    options: {
        description: $E("meta[name=description]").get("content"),
        keywords:  $E("meta[name=keywords]").get("content"),
        title: $E("title").get("text").replace(/ASAP Cleaners London - /i, "").clean(),
        id: $empty()
    },
    initialize: function(options) {
        this.setOptions(options);
        this.initPage();
    },
    initPage: function() {
        var _this = this;
        new Element("div", {
            "class": "cur",
            styles: {
                position: "absolute",
                top: 55,
                left: 45,
                width: 60,
                height: 20,
                padding: 2,
                border: "1px solid #000",
                background: "#ffffef"
            },
            events: {
                click: function() {
                    toggleModal("#fff", {
                        events: {
                            click: function() {
                                this.fade(0);
                                // $("editCont").fade(0);
                                (function() {
                                    this.dispose();
                                    // $("editCont").dispose();
                                }).delay(500, this);
                            }
                        },
                        zIndex: 10
                    }).set("html", "<strong>SEO direct edit mode</strong>");

                    var ct = centerBox(500, 500), metaData = _this.getLiveSEO();

                    var h1s = $$("h1");
                    var h2s = $$("h2");
                    var h3s = $$("h3");

                    var h1text = '';
                    h1s.each(function(h) {
                        h1text += '<div>'+h.get("text")+'</div>';
                    });

                    new Element("div", {
                        styles: {
                            border: "1px solid #000",
                            background: "#fff",
                            position: "absolute",
                            left: ct.x,
                            top: ct.y,
                            width: 500,
                            height: 500,
                            zIndex: 100
                        },
                        html: "<input type='text' value='"+metaData.title+"' id='title' style='width: 498px; background: #eee; border: 1px solid #000' /><br /><textarea id='override_keywords' style='padding: 1px; width: 90%; border: 1px solid #000; height: 120px; background: #ccc;'>" + metaData.keywords + "</textarea> <input type=submit class='saveOverride' rel='override_keywords' value=OK style='width: 8%' />"+h1text,
                        events: {
                            click: function() {
                                this.smartDispose();
                                $("modal").fireEvent("click");
                            }
                        }
                    }).injectAfter($("modal")).dropShadow({
                        zIndex: 99
                    });

                },
                mouseenter: function() {
                    this.tooltip("edit meta data");
                }
            },
            html: "<strong>SEO</strong>edit"

        }); // .inject(document.body).dropShadow();
    },
    getLiveSEO: function() {
        return {
            title: this.options.title,
            headings: $$("h1 h2 h3 h4 h5"),
            keywords: this.options.keywords,
            description: this.options.description
        }
    }
});

var checkPostCode = function(toCheck) {
    var alpha1 = "[abcdefghijklmnoprstuwyz]";                       // Character 1
    var alpha2 = "[abcdefghklmnopqrstuvwxy]";                       // Character 2
    var alpha3 = "[abcdefghjkstuw]";                                // Character 3
    var alpha4 = "[abehmnprvwxy]";                                  // Character 4
    var alpha5 = "[abdefghjlnpqrstuwxyz]";                          // Character 5
    var pcexp = new Array ();
    pcexp.push (new RegExp ("^(" + alpha1 + "{1}" + alpha2 + "?[0-9]{1,2})(\\s*)([0-9]{1}" + alpha5 + "{2})$","i"));
    pcexp.push (new RegExp ("^(" + alpha1 + "{1}[0-9]{1}" + alpha3 + "{1})(\\s*)([0-9]{1}" + alpha5 + "{2})$","i"));
    pcexp.push (new RegExp ("^(" + alpha1 + "{1}" + alpha2 + "?[0-9]{1}" + alpha4 +"{1})(\\s*)([0-9]{1}" + alpha5 + "{2})$","i"));
    pcexp.push (/^(GIR)(\s*)(0AA)$/i);
    pcexp.push (/^(bfpo)(\s*)([0-9]{1,4})$/i);
    pcexp.push (/^(bfpo)(\s*)(c\/o\s*[0-9]{1,3})$/i);
    var postCode = toCheck;
    var valid = false;
    for ( var i=0; i<pcexp.length; i++) {
        if (pcexp[i].test(postCode)) {
            pcexp[i].exec(postCode);
            postCode = RegExp.$1.toUpperCase() + " " + RegExp.$3.toUpperCase();
            postCode = postCode.replace (/C\/O\s*/,"c/o ");
            valid = true;
            break;
        }
    }

    if (valid)
        return postCode;
    else
        return false;
};

window.addEvent("domready", function() {
    var myFx;
    // new seo();

    new Asset.javascript("http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a32e50a6d8db98f", {
        onload: function() {
            (function() {
                $("addthis").fade(0,1).addEvents({
                    mouseenter: function() {
                        addthis_open(this, '', '[URL]', '[TITLE]');
                    },
                    mouseleave: addthis_close,
                    click: function(e) {
                        new Event(e).stop();
                        addthis_sendto();
                    }
                });
            }).delay(2000);
        }
    });


    if ($("stackHolder"))
         var st = new stacker($("stackHolder"));

    $$(".menu").each(function(el) {
        el.store("color", el.getStyle("color")).addEvents({
            mouseenter: function() {
                if (this.get("leaving") == true) {
                    $clear(myFx);
                }
                this.fade(1);
            },
            mouseleave: function() {
                this.set("leaving", true);
                myFx = (function() {
                    this.fade(.4).set("leaving", false);
                }).delay(150, this);
            }
        }).fade(.4).erase("title");

    });

    $("side").getElements("li.menuLI").addEvents({
        mouseenter: function() {
            this.addClass("selected");
            myFx = new Fx.Morph(this).start({
                "background-color": ["#EDEBEB", "#7F0C0C"],
                opacity: .7
            });
            if ($("currentFrame")) {
                $("currentFrame").fade(0);
            }
        },
        mouseleave: function() {
            if ($type(myFx) == "object")
            myFx.cancel();
            this.setStyles({
                "background-color": "transparent"
            }).fade(1).removeClass("selected");
            if ($("currentFrame")) {
                $("currentFrame").fade(1);
            }
        }

    });

    $$(".expander").addEvents({
        click: function() {
            var slider = this.getParent();
            if (slider.getStyle("width").toInt() == 25) {
                $$(".slider").each(function(el) {
                    // close down
                    if (el.getStyle("width").toInt() != 25) {
                        el.getLast().fade(0);
                        var fx2 = new Fx.Morph(el).start({
                            width: 25
                        });
                    }
                });
                $("phone").setStyle("display", "none").setOpacity(0);
                var fx = new Fx.Morph(slider).start({
                    width: 535
                }).chain(function() {
                    slider.getLast().fade(1);
                });


            } else {
                // close it.
                slider.getLast().fade(0);

                var fx = new Fx.Morph(slider).start({
                    width: 25
                }).chain(function() {
                    $("phone").setStyle("display", "inline").fade(1);
                });
            }


        },
        mouseenter: function() {
            this.fade(1);
        },
        mouseleave: function() {
            this.fade(.5);
        }
    }).setOpacity(.5).addClass("cur");



    $$(".container").setOpacity(0);

    $("phone").addEvents({
        mouseenter: function() {
            this.tooltip("click to phone via Skype", {topOffset: 16});
        },
        click: function() {
            window.location.href = "skype:+448001123430?call";
        }
    }).addClass("cur");

    $("callback").addEvents({
        mouseenter: function(e) {
            new Event(e).stop();
            this.getParent().fireEvent("mouseleave");
            // this.tooltip("let us phone you").fade(0.000001);
        },
        mouseleave: function() {
            // this.fade(.4);
        },
        click: function(e) {
            new Event(e).stop();
        }
    }).setOpacity(.4);

    // adjust page height.
    var coords = $("side").getCoordinates();
    var contCoords = $("main").getCoordinates();

    if (coords.height > contCoords.height)
        $("main").setStyle("height", coords.height);




    $("side").getElements("a").each(function(l) {
        if (l.get("href") == window.location.href && !l.hasClass("exempt")) {
            var coords = l.getParent().getParent().getCoordinates();

            new Element("div", {
                id: "currentFrame",
                styles: {
                    left: coords.left,
                    top: coords.top,
                    width: coords.width-2,
                    height: coords.height,
                    "border-left": "2px solid #000",
                    "border-bottom": "2px solid #fff",
                    position: "absolute",
                    opacity: .5
                }
            }).inject(document.body);
        }

        l.addEvents({
            click: function() {
                toggleModal("#fff");
            }
        });
    });

    $$("div.input_wrap").addEvents({
        mouseenter: function() {
            this.fade(1).setStyle("border", "1px solid #000");
        },
        mouseleave: function() {
            if (this.get("data-focused") != 1)
            this.fade(.6).setStyle("border", "1px solid #777");
        }
    }).setOpacity(.6);

    var lookupData = function(where) {
        new Request({
            method: "get",
            url: "/",
            evalResponse: true,
            onComplete: function() {

            }
        }).send("a=area&area=" +where);

    };


    if ($("areas")) {
        var AC = new Accordion($("areas"), "div.togglers","div.els", {
            opacity: false,
            alwaysHide: true,
            display: -1

        });

        $$("img.toggle").addEvents({
            click: function() {
                this.set("src", (this.get("src") == "/images/collapse.gif") ? "/images/expand.gif" : "/images/collapse.gif");
            }
        });

    }

    // google analytics via mootools / dom.
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    new Asset.javascript(gaJsHost + "google-analytics.com/ga.js", {
        onload: function() {
            var pageTracker = _gat._getTracker("UA-9186962-1");
            pageTracker._initData();
            pageTracker._trackPageview();
        }
    });

    if ($("search"))
    myData = new geoData({
        callback: "myData.setData" // needs to match instance name
    }).addEvents({
        "complete": function(data) {
            new Element("div", {
                styles: {
                    paddingTop: 20
                },
                html: "We think you may be in " + data.city + ", click <a href='#' id='usethis'>here</a> to use this"
            }).inject($("rightside"));

            $("usethis").addEvents({
                click: function(e) {
                    new Event(e).stop();

                    $("clean_by_post_code_search").set("value", data.city);
                    Cookie.write("area", data.city);
                    this.getParent().fade(0);
                }
            });
        }
    });

	// fix images
	//$("main").getElements("img[align=left]").addClass("leftImg");
    // callback
    if ($("callback"))
    $("callback").set({
        styles: {
            "background": "white"
        },
        opacity: 0.0009,
        events: {
            click: function() {
                var quotedata = JSON.decode(this.get("data-set"));

                var modalBox = new mOOdalBox(this, {
                    title: "Request a callback",
                    movable: true,
                    text: "Loading...",
                    width: 760,
                    height: 315,
                    scroll: !true,
                    onClose: function() {
                    	$$(".tooltip").smartDispose();
                	},
                    onComplete: function() {
    					_this = this;
                        new Request({
                            url: "index.php",
                            method: "get",
                            onComplete: function() {
                                modalBox.setHTML(this.response.text);
                                window.myData = new geoData({
                                    callback: "window.myData.setData" // needs to match instance name
                                }).addEvents({
                                    "complete": function(data) {
                                        $("think").set({
                                            html: "We think you may be in " + data.city + ", click <a href='#' id='usethis'>here</a> to use this"
                                        });

                                        $("usethis").addEvents({
                                            click: function(e) {
                                                new Event(e).stop();

                                                $("location").set("value", data.city);
                                                this.getParent().fade(0);
                                                (function() {
                                                    this.getParent().dispose();
                                                }).delay(500, this);
                                            }
                                        });


                                        $("contact").addEvents({
                                        	submit: function(e) {
                                        		e.preventDefault();

                                        		// go through required and stuff.
                                        		var dodgy = [];
                                        		this.getElements(".required").each(function(inp) {
                                        			if (!inp.get("value").trim().length){
                                        				inp.addClass("error");
                                        				dodgy.push(inp);
                                    				}
                                        		});

                                        		if (dodgy.length) {
                                        			dodgy[0].slidingTip("Make sure that you <br />fill in all required fields.", {
                                        				topOffset: 84,
                                        				opacity: .95,
                                        				eventEnd: "focus"
                                    				});
                                    				return false;
                                				}

                                				var validEmailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;


                                				if ($("email").get("value").trim().length && !$("email").get("value").trim().match(validEmailRegex)) {
                                					$("email").addClass("error").slidingTip("Make sure that you enter <br />a valid email address", {
                                        				topOffset: 84,
                                        				opacity: .95,
                                        				eventEnd: "focus"
                                    				});
                                					return false;
                                				}

                                				var DATA = [], qstr = "a=reqCallback&"
                                				qstr += $("contact").toQueryString();


                                				new Request({
                                					url: "/index.php",
                                					method: "post",
                                					onComplete: function(resp) {
                                						_this.close();
                                						var modalBox = new mOOdalBox($("callback"), {
            								                title: "Callback request complete",
            								                movable: true,
            								                text: "Loading...",
            								                width: 460,
            								                height: 120,
            								                scroll: !true,
            								                onComplete: function(){
            								                	this.setHTML(resp)
            								                	$("close2").addEvents({
            	                    								click: function(){
            		                    								this.close();
            		                    							}.bind(this)
            		                							});
            								                }
            							                });


                                					}
                            					}).send(qstr);
                                            }
                                        });
                                    }
                                });

                            }
                        }).send("a=getcallback");
                    }
                });
            } // end click
        }
    });


    if ($("get_free_quote"))
    $("get_free_quote").addEvents({
        click: function() {

            var quotedata = JSON.decode(this.get("data-set"));

            var modalBox = new mOOdalBox(this, {
                title: "Get a quote for " + quotedata.title,
                movable: true,
                text: "Loading...",
                width: 760,
                height: 540,
                scroll: !true,
                onClose: function() {
                	$$(".tooltip").smartDispose();
            	},
                onComplete: function() {
					_this = this;
                    new Request({
                        url: "index.php",
                        method: "get",
                        onComplete: function() {

                            modalBox.setHTML(this.response.text);

                            $("showAcceptable").addEvents({
                                click: function() {
                                    $("acceptable").setStyle("display", ($("acceptable").getStyle("display") == "block") ? "none" : "block");
                                    $("contact").setStyle("display", ($("acceptable").getStyle("display") == "block") ? "none" : "block");
                                    huhOOman.drag.stop();
                                }

                            });

                            $("top_contact").getElements("input[type=text]").addEvents({
                                focus: function() {
                                    this.removeClass("plain").removeClass("error").addClass("focused");
                                },
                                blur: function() {
                                    this.removeClass("focused").addClass("plain");
                                }
                            });

                            $$("div.tag").addEvents({
                                click: function() {
                                	$$(".tooltip").smartDispose();
                                    $("acceptable").setStyle("display", ($("acceptable").getStyle("display") == "block") ? "none" : "block");
                                    $("contact").setStyle("display", ($("acceptable").getStyle("display") == "block") ? "none" : "block");

                                    $("postcode").set("value", this.get("text") + " ").focus();
                                    $$("div.tag").setOpacity(1);
                                    this.fade(1, .4).fireEvent("mouseleave");
                                },
                                mouseenter: function() {
                                    this.tooltip(this.get("rel"));
                                }
                            });


                            $$("div.checkbox").each(function(el){
                                el.addClass("cur").addEvents({
                                    click: function() {
                                        this.toggleClass("checked");
                                    }
                                })

                            });

                            var lbls = $("bottom_contact").getElements("label");
                            lbls.addClass("cur");

                            if (!Browser.Engine.trident)
                            lbls.addEvents({
                                click: function(e) {
                                	new Event(e).stop();
                                    this.getPrevious().fireEvent("click");
                                }
                            });


                            $E("label[for=insurance_letter]").addEvents({
                            	mouseenter: function() {
                            		this.tooltip("Important for successful claims");
                            	}
                            });

                            $("contact").addEvents({
                            	submit: function(e) {
                            		e.preventDefault();


                            		if (!huhOOman.human) {
                            			$("human").slidingTip("Please prove you're not <br />a spam bot first!", {
                            				topOffset: 83,
                            				opacity: .95
                        				});
                            			return false;
                        			}
                            		// go through required and stuff.
                            		var dodgy = [];
                            		this.getElements(".required").each(function(inp) {
                            			if (!inp.get("value").trim().length){
                            				inp.addClass("error");
                            				dodgy.push(inp);
                        				}
                            		});

                            		if (dodgy.length) {
                            			dodgy[0].slidingTip("Make sure that you <br />fill in all required fields.", {
                            				topOffset: 84,
                            				opacity: .95,
                            				eventEnd: "focus"
                        				});
                        				return false;
                    				}

                    				var validEmailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
                    				if (!$("email").get("value").trim().match(validEmailRegex)) {
                    					$("email").addClass("error").slidingTip("Make sure that you enter <br />a valid email address", {
                            				topOffset: 84,
                            				opacity: .95,
                            				eventEnd: "focus"
                        				});
                    					return false;
                    				}

                    				if (!checkPostCode($("postcode").get("value"))) {
                    					$("postcode").addClass("error").slidingTip("Make sure that you enter <br />a valid postcode", {
                            				topOffset: 84,
                            				opacity: .95,
                            				eventEnd: "change"
                        				});
                    					return false;
                    				}

                    				var DATA = [], qstr = "a=setQuote&serviceId=" + quotedata.sid + "&service=" + quotedata.title + "&area=" + quotedata.area + "&";
                    				qstr += $("contact").toQueryString();

                    				$$("div.checked").each(function(el) {
                						DATA.push(el.id + "=yes");
                    				});

                    				if (DATA.length)
                    					qstr += "&" + DATA.join("&");

                    				new Request({
                    					url: "/index.php",
                    					method: "post",
                    					onComplete: function(resp) {
                    						_this.close();
                    						var modalBox = new mOOdalBox($("get_free_quote"), {
								                title: "Quote request complete",
								                movable: true,
								                text: "Loading...",
								                width: 460,
								                height: 120,
								                scroll: !true,
								                onComplete: function(){
								                	this.setHTML(resp)
								                	$("close2").addEvents({
	                    								click: function(){
		                    								this.close();
		                    							}.bind(this)
		                							});
								                }
							                });


                    					}
                					}).send(qstr);
                            	}
                        	});

                        	$("send_quote").fade(.4);
                            var huhOOman = new hOOmanTest($("human"), {
                                callback: function(state) {
                                    if (state){
                                        $("send_quote").fade("in");
                                        this.instructions.set("html", "We appreciate it, you can now continue and submit the form.");
                                        (function() {
                                            this.container.fade("out");
                                        }).delay(3000, this);
                                    }
                                    else
                                        this.instructions.set("html", "Not quite! Drag and drop the <strong>"+this.mover.name+"</strong> into the BOX!");
                                }
                            });


                        }
                    }).send("a=getcontact&id="+quotedata.sid+"&title=" + quotedata.title + "&area=" + quotedata.area);
                }
            });
        }
    });

var sdata = [
    {image: 'bbc.gif',url: '', title: 'BBC'},
    {image: 'harrods.gif',url: '', title: 'Harrods London'},
    {image: 'carphone-warehouse.gif',url: '', title: 'Carphone Warehouse'},
    {image: 'united-house.gif',url: '', title: 'United House'},
    {image: 'hedsor-house.gif',url: '', title: 'Hedsor House'},
    {image: 'shaw-trust.gif',url: '', title: 'The Shaw Trust'},
    {image: 'salvation-army.gif',url: '', title: 'The Salvation Army'},
    {image: 'gallup.gif',url: '', title: 'Gallup Group'},
    {image: 'newham-council.gif',url: '', title: 'Newham Council'},
    {image: 'damaris.gif',url: '', title: 'Damaris Lingerie'},
    {image: 'moss-rid.gif',url: '', title: 'MOSS RID'},
    {image: 'mjm.gif',url: '', title: 'MJM Group'},
    {image: 'citroen.gif',url: '', title: 'Citroen'},
    {image: 'loft-lets.gif',url: '', title: 'Loft Lets'},
    {image: 'kytton-barton-beef.gif',url: '', title: 'Kytton Barton Beef'},
    {image: 'keatons.gif',url: '', title: 'Keatons.com'},
    {image: 'kcb.gif',url: '', title: 'KCB'},
    {image: 'aba-research.gif',url: '', title: 'ABA research'},
    {image: 'homes-and-co.gif',url: '', title: 'Homes & Co'},
    {image: 'green_locations.gif',url: '', title: 'Green Locations'},
    {image: 'chase-devonshire.gif',url: '', title: 'ChaseDevonshire'},
    {image: 'webtogs.gif',url: '', title: 'WebTogs'},
    {image: 'boundary-house.gif',url: '', title: 'Boundary House'},
    {image: 'anderson-reece.gif',url: '', title: 'Anderson Reece'},
    {image: 'snow-and-rock.gif',url: '', title: 'Snow + Rock'}
];


	if ($("scr"))
	var mc = new ImageScrOOler(sdata, {
		imagePath: "/images/logos/",
		imageHeight: 85,
		targetElement: $("scr"),
		defaultMessage: "&nbsp;",
		carousel: !true,
		clickEvent: function(obj) {
			return false;
		},
		showProgress: !false
	});

	largerBox.init();

    largerBox.init({
        selector: "a.newimage",
        useModal: true,
        useShadow: true,
        colourModal: "#fff",
        styleBorder: "1px solid #000"
    });

    $("cleaning_logo").addEvent("click", function() {
        toggleModal("#fff");
        window.location.href = "http://www.cleaning-4u.co.uk/";
    });

    /*var gaySnow = new mooSnow({
        container: "cleaning_logo"
    });*/
});

